Im wondering what everyone's using to create the FrameXML files. Tho i guess it's pretty easy to create these by hand, i know there are also a few wysiwyg editors out there. Just want your thoughts on these and perhaps some links to their websites.
Most of us don't use XML files. We create the actual frames in Lua. XML is far too verbose, about 20 lines of text that can be replaced with 3-4 lines of Lua code.
If you insist though, just use an editor with proper syntax highlighting (defined for XML files at least) and you will be fine.
Personally I do all my editing with UltraEdit,
but it's just a text editor with a few extras.
(syntax highlighting, code folding, autocomplete to name a few)
I like Microsoft's "Addon Studio for World of Warcraft" over at CodePlex for Lua and XML-editing. But as Xinhuan mentioned, it's shite as a wysiwyg-editor compared to what you can do in Lua.
Ok cheers, i think ill stick to creating the gui using the lua calls. That allows me to only create the frames when they're actually needed.
A little extra question tho. I read somewhere that frames won't get collected as garbage and i should always try to reuse any frames i create. Is this correct?
My advice would be to only use XML to declare Templates, not actual frames. I think that XML templates may be not much slower than lua code to instantiate, or even faster. I personnaly never use XML, I even sometimes rewrite a perfectly good frame template written by Blizzard in lua. There is only one time where I needed to use XML, and that's because the Cooldown has no :SetEdge() method, and the corresponding attribute has to be set via XML. (well, last time I checked).
A little extra question tho. I read somewhere that frames won't get collected as garbage and i should always try to reuse any frames i create. Is this correct?
Yes. Frames are not garbage collected. The default UI use a lot of frames, though (even more if you count regions).
I, personally, just find it easier to do with lua. Even though xml has everything laid out hierarchically, it always seems like more than my head can wrap around. Though it has been getting easier to read through xml lately.
Other than personal preference, is there any reason not to use XML. To me its just "in vogue" to use Lua.
edit: besides dynamically created frames of course.
- Lua errors in code is far easier to debug than XML errors.
- Lua code that does things like SetPoint(), SetHeight() etc, can just be directly cut and pasted into wow and /run to do minor adjustments on screen.
- Using XML forces you to have named frames. If you didn't set the name= attribute, it will be unnamed, but you will have difficulty (though not impossible) obtaining a frame handle to it.
- Many frames will share the same OnFoo functions. Unless created from a virtual template, they will each have its own OnFoo function. The typical one is OnLeave where you simply do GameTooltip:Hide(), which can be shared across lots of frames in Lua, instead of defining each one separately. Yes, you can setscript later as well, but that brings back to the named frames difficulty above.
- Using XML results in an extra file to read, more file i/o makes loading wow slower.
XML is the spawn of Satan, the whore of Babylon, the straw that broke the camel's back, the final countdown, the opiate of the masses, the elephant in the room, the emperor's new clothes, the black sheep, the nightmare on elm street, the silent fart, the premature ejaculation, the wrath of khan, that which knows no name, the ! of ?, the last supper, the rotten core, the eleventh hour, the bottom of the barrel, last place you looked, the bad aftertaste, the annoying drunk, the bastard son, the dark shadow of corruption itself that feeds upon your living soul and infects the dying core of your being while you while you lie asleep at night.
Talking about Frames in XML vs. LUA: Is there a good "reference implementation" of a LUA GUI aka a mod which uses LUA to make the frames that isn't totally overwhelming for somebody just starting out with addon programming?
XML is the spawn of Satan, the whore of Babylon, the straw that broke the camel's back, the final countdown, the opiate of the masses, the elephant in the room, the emperor's new clothes, the black sheep, the nightmare on elm street, the silent fart, the premature ejaculation, the wrath of khan, that which knows no name, the ! of ?, the last supper, the rotten core, the eleventh hour, the bottom of the barrel, last place you looked, the bad aftertaste, the annoying drunk, the bastard son, the dark shadow of corruption itself that feeds upon your living soul and infects the dying core of your being while you while you lie asleep at night.
Yes, that L20 UD Rogue on Hellscream EU named Wintrow that is making me rename my beloved L70 Druid on Aggramar also named Wintrow if I wanna hook up with my brother and friends on there.
L20 and his profile is empty on eu.wowarmory.com. SO 9/10 he's an abandoned alt or worse... a 10-day trial tossed aside after reaching L20 and not having the money or inclination to continue the game...
Damn all UD Rogues to hell and back !!
*shakes fist*
XML is the spawn of Satan, the whore of Babylon, the straw that broke the camel's back, the final countdown, the opiate of the masses, the elephant in the room, the emperor's new clothes, the black sheep, the nightmare on elm street, the silent fart, the premature ejaculation, the wrath of khan, that which knows no name, the ! of ?, the last supper, the rotten core, the eleventh hour, the bottom of the barrel, last place you looked, the bad aftertaste, the annoying drunk, the bastard son, the dark shadow of corruption itself that feeds upon your living soul and infects the dying core of your being while you while you lie asleep at night.
Run! Run while you still can!
Tell us how you REALLY feel :)
At work, I use XML to pass data between systems all the time. This is because we have a zillion different systems written in a lot of differnet lanugages ( PHP, Perl, Python, C#, Java, etc ). We also have several flavors of databases (MS SQL, MySql, & Oracle), and to get all these different things talking to each other, sometimes passing data as xml is the best route... SOAP Web services rule.
XML is a wonderful way to communicate structured data across different systems/architectures, but I really don't like the idea of using it for laying out GUIs either. When coding for WoW, doing it in LUA is my first choice.
Im wondering what everyone's using to create the FrameXML files. Tho i guess it's pretty easy to create these by hand, i know there are also a few wysiwyg editors out there. Just want your thoughts on these and perhaps some links to their websites.
Thanks
If you insist though, just use an editor with proper syntax highlighting (defined for XML files at least) and you will be fine.
A few years back at work we used to use XMLSpy by Altova. (payware)
No xml editor is wysiwyg without an xslt though.
Freeware alternatives that I've used and are decent are XML Copy Editor
and XMLPad3
Personally I do all my editing with UltraEdit,
but it's just a text editor with a few extras.
(syntax highlighting, code folding, autocomplete to name a few)
A little extra question tho. I read somewhere that frames won't get collected as garbage and i should always try to reuse any frames i create. Is this correct?
Yes. Frames are not garbage collected. The default UI use a lot of frames, though (even more if you count regions).
edit: besides dynamically created frames of course.
- Lua errors in code is far easier to debug than XML errors.
- Lua code that does things like SetPoint(), SetHeight() etc, can just be directly cut and pasted into wow and /run to do minor adjustments on screen.
- Using XML forces you to have named frames. If you didn't set the name= attribute, it will be unnamed, but you will have difficulty (though not impossible) obtaining a frame handle to it.
- Many frames will share the same OnFoo functions. Unless created from a virtual template, they will each have its own OnFoo function. The typical one is OnLeave where you simply do GameTooltip:Hide(), which can be shared across lots of frames in Lua, instead of defining each one separately. Yes, you can setscript later as well, but that brings back to the named frames difficulty above.
- Using XML results in an extra file to read, more file i/o makes loading wow slower.
Run! Run while you still can!
Lol, point made... i guess :P
L20 and his profile is empty on eu.wowarmory.com. SO 9/10 he's an abandoned alt or worse... a 10-day trial tossed aside after reaching L20 and not having the money or inclination to continue the game...
Damn all UD Rogues to hell and back !!
*shakes fist*
Tell us how you REALLY feel :)
At work, I use XML to pass data between systems all the time. This is because we have a zillion different systems written in a lot of differnet lanugages ( PHP, Perl, Python, C#, Java, etc ). We also have several flavors of databases (MS SQL, MySql, & Oracle), and to get all these different things talking to each other, sometimes passing data as xml is the best route... SOAP Web services rule.
XML is a wonderful way to communicate structured data across different systems/architectures, but I really don't like the idea of using it for laying out GUIs either. When coding for WoW, doing it in LUA is my first choice.