Thread Tools Display Modes
10-29-09, 07:35 AM   #1
Soeters
A Warpwood Thunder Caller
 
Soeters's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 97
EasyMenu and submenus

Hi, today I was trying to make a LDB feed so that we don't need to open the tradeskill window to craft things.
So the best way is to use dropdowns. The dropdowns I already did were simple and only had a single level, but here I need to do a first level with the different tradeskill, then a second level with the different headers for a better organisation.
So here's my addon code and what the table looks like for the dropdown.

I got this error
Code:
[14:34:02] Interface\FrameXML\EasyMenu.lua:26: attempt to get length of local 'menuList' (a nil value)
[C]: ?
Interface\FrameXML\EasyMenu.lua:26: in function `initFunction'
Interface\FrameXML\UIDropDownMenu.lua:69: in function `UIDropDownMenu_Initialize'
Interface\FrameXML\UIDropDownMenu.lua:715: in function `ToggleDropDownMenu'
[string "*:OnEnter"]:5: in function <[string "*:OnEnter"]:1>
Does anyone have an idea of how I could implement submenus using EasyMenu or where does the problem come from.
__________________
  Reply With Quote
10-29-09, 07:38 AM   #2
p3lim
A Pyroguard Emberseer
 
p3lim's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,710
Well written guide found at the WowAce forums:

http://forums.wowace.com/showthread.php?t=15763
  Reply With Quote
10-29-09, 09:28 AM   #3
Soeters
A Warpwood Thunder Caller
 
Soeters's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 97
I've tried using the basic UIDropDownMenu but I still get odd results.
I dumped the table to see what's in, and I can see extra things I haven't asked for in the dropdown.
I get things so unbelievable that I stopped using this, and I'm trying to find a way using EasyMenu.
__________________
  Reply With Quote
10-29-09, 04:30 PM   #4
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,196
Just look at how I handled it in Revelation.
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of NPCScan and many other AddOns.
  Reply With Quote
10-30-09, 02:47 AM   #5
Soeters
A Warpwood Thunder Caller
 
Soeters's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 97
Thanks a lot Torhal, it checked a your code and adapted it for my needs and that's perfect
__________________
  Reply With Quote
10-30-09, 12:22 PM   #6
Torhal
A Pyroguard Emberseer
 
Torhal's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 1,196
Good deal!
__________________
Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Author of NPCScan and many other AddOns.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » EasyMenu and submenus


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off