|
09-08-08, 01:27 PM | #1 |
Send selected option to chat
Hello,
I'm trying to make a simple addon for WoW, but I'm a bit stuck at the moment. I will keep it simple I have a dropdown menu with the following options: Option 1 Option 2 Option 3 Below that is a button: Send to Chat. If Option 1 is selected, option 1 has to be sent to the chat box. I know the command for that. But how can I get the selected option usable for further using? I tried the getglobal command, but that is not working: Code:
chattext = getglobal("RaidHelperForm".."ComboBox1".."Label"); SendChatMessage("..."..chattext.."...", "SAY", this.language); Thank you, Glenn |
|
09-08-08, 01:30 PM | #2 |
Could you please post the full lua and xml code and the toc?
Thx |
|
09-08-08, 01:34 PM | #3 | ||
I'm using the Program WoW UI Designer:
LUA Code:
function RaidHelper_OnLoad() SLASH_RAIDHELPER1 = "/raidhelper"; SLASH_RAIDHELPER2 = "/rh"; SlashCmdList["RAIDHELPER"] = RaidHelper_SlashCmdHandler; end function RaidHelper_SlashCmdHandler() RaidHelperForm:Show(); end function RaidHelperRaidChat() local skull; skull = getglobal("RaidHelperForm".."ComboBox1".."Label"); SendChatMessage("..."..skull.."...", "SAY", this.language); end
|
|||
09-08-08, 01:58 PM | #4 |
Thank you. But ... what a wall of text.
I am awfully sorry, but I can't help you with this. I'm pretty sure that this is not the "help" you expected ... but I kindly suggest to learn at least the lua/xml/programming basics and to develop some simple addons without the ui designer. |
|
09-08-08, 02:20 PM | #5 | |
|
||
05-31-09, 06:46 PM | #6 |
If you aren't experienced in using LUA and XML from base, then it's a bad idea to use a designer. As you've discovered, if something goes wrong you'll have no idea how to fix it.
In the meantime, please repost your code above at pastey.net and link it. It'll be a lot easier for people to read and help troubleshoot. |
|
05-31-09, 07:55 PM | #7 |
I think what you want to use is UIDropDownMenu_GetSelectedValue() or UIDropDownMenu_GetText().
Trouble is you need to supply them with your actual UIDropDownMenu object, which I can't locate in the XML you posted. I think it's RaidHelperFormButton as that has the ToggleDropDownMenu call and all the setup stuff. i.e. chattext = UIDropDownMenu_GetText(RaidHelperFormButton); |
|
06-04-09, 09:28 PM | #8 |
Send selected option to chat
Do some of the chat rooms out there allow you to create a private room, i.e., one where you specify who can and can not come in? Which ones? What are the advantages/disadvantages to moving to a chat room site with the people we like here? Are there any sites similiar to Askville that allow you to select who you interact with and don't interact with? Tell me!!!! PLEASE!!
__________________
Blog Apostille |
|
06-05-09, 07:47 AM | #9 | |
irc.freenode.net #wowuidev #wowace #curseforge Both the wowuidev channel and the wowace channel are pretty good. Join both and post in one or both and you should get an answer pretty quickly I can't connect from work as I suspect they block it I can connect with mibbit but then I get d/ced a few minutes after connetiong (yes my nick is registered and all that) http://www.mibbit.com/chat/ Is the site for mibbit
__________________
tuba_man on Apple test labs : "I imagine a brushed-aluminum room with a floor made of keyboards, each one plugged into a different test box somewhere. Someone is tasked with tossing a box full of cats (all wearing turtlenecks) into this room. If none of the systems catch fire within 30 minutes, testing is complete. Someone else must remove the cats. All have iPods." (http://community.livejournal.com/tec...t/2018070.html) |
||
WoWInterface » Developer Discussions » Lua/XML Help » Send selected option to chat |
«
Previous Thread
|
Next Thread
»
|
Display Modes |
Switch to Linear Mode |
Hybrid Mode |
Switch to Threaded Mode |
|
|