Community
Participate
Working Groups
Hi, I just found this Lua plugin for Eclipse and I'm totally happy, because the other plugins I've used so far are outdated and buggy. Thank you very much for this! :-) One thing I've found: It would be great, if the outline window also shows occurences with the following method syntax: function lootlog.LootLog:ChatCommand(msg) -- ... end Currently only local function like the following one are shown for me: local function _InitPatterns(self) -- ... end I'm using version "Lua Development Tools (Incubator) 0.1.0.201202031443"
Hi Marc, and sorry for answering a bit late! I think it is unlikely that we will be able to provide an outline for this syntax. I don't know much about the limitations that may exist in the Lua VM of WoW, but you may want to use clearly defined modules (see http://lua-users.org/wiki/ModuleDefinition ) On a related note, we have been working on a way to provide much better content assist for people developing modules ; this has been explained here: http://lua-list.2524044.n2.nabble.com/ANN-Koneki-LDT-smart-content-assist-available-in-beta-td7287990.html
Hi Benjamin, most of the WoW-Addons use this notation because of the widespread library Ace3. By using the colon one doesn't need to declare the "self" variable. But "function LootLog.ChatCommand(self, msg)" is also not accepted by the outline parser. We (the WoW authors) will probably not be able to change how our Modules/Classes are coded, as long as we don't rewrite at least the Ace3 library.
Created attachment 211678 [details] Lua-File without any outline Hi, I was able to produce a valid Lua file without any outline entries. Even the local functions are not shown, as they did before. Something is disturbing the outline-parser, although the file is valid. At least World of Warcraft doesn't complain. For me personally it would be enough, when the outline view just shows the first capture group of the patterns "function (.*\()\(". :-)
Hi Marc, In lines 323:325, you need to escape the backslashes. The Lua VM will print "c" on the console if you print("\a\bc") (i.e. it ignores characters that are not supposed to be escapable). The thing is Metalua (which we used to build the outline and stuff) is a bit more strict in its source code parsing, thus it failed at parsing the badly escaped strings. In this case it is your lucky day since it spotted a potential bug in your code! (even though maybe the WoW VM had treated the strings correctly in your case?).
Hi Benjamin, ah, thanks for the info. I remember days, where WoW didn't like the missing "\". But nowadays it doesn't complain about it and the referenced texture is shown without any problem. Perhaps the WoW-programmers also oftenly forget to add the second backslash. ;-)
Hi, We plan to work on an enhancement which may support this kind of notation ,even though supporting this way to declare a function is not a priority. *** This bug has been marked as a duplicate of bug 381671 ***