Thread Tools Display Modes
12-16-05, 05:38 AM   #1
Ravendwyr
A Flamescale Wyrmkin
 
Ravendwyr's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2005
Posts: 139
LUA Comments in XML files

I know that to make a comment in an XML file you surround it with <!-- text -->, but what about comments with "--" before them?

f.i.
Code:
<Scripts>
 <OnLoad>
  -- call the On Load function
  TestMod_OnLoad();
 </OnLoad>
 <OnEvent>
  -- call the On Event function
  TestMod_OnEvent(event);
 </OnEvent>
</Scripts>
Are they legit comments? If so, is it possible to make them appear green, like the other comments?
If they're not comments, then I'd better get rid of them
__________________
Twitter | GitHub
  Reply With Quote
12-16-05, 05:53 AM   #2
Nulkris
A Cobalt Mageweaver
 
Nulkris's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2005
Posts: 214
They are legitimate. I have started writing a new syntax highlighter for handling Lua in XML, but actually getting it in and working is somewhere behind Lua autocomplete, editor enhancements, UI designer Undo and other stuff I can't think of atm....

So just pretend its green for now, thanks.
__________________
Nulkris - A80 Rogue - Proudmoore
(Also Drukris, Hamkris on Proudmoore; Hulkris on Jubei'Thos & Khaz Modan)
  Reply With Quote
12-16-05, 11:05 AM   #3
Gaal
A Fallenroot Satyr
Join Date: Mar 2005
Posts: 22
Yes, you can use the comment handler at least for most of the XML lines as well, providing you're referencing a LUA file (I believe). I've only had a few cases where this didn't work, and that's when not using a LUA file on the side. I also found the LUA commenter doesn't seem to work in the middle of XML items like it does in real LUA files.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » LUA Comments in XML files

Thread Tools
Display Modes

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