As of now I am in the stage that I know 95% of the plain LUA used in common addons and some WOW API stuff.
Right now I am trying to figure out how exactly the addon Gnomeworks works. Not at all the GUI stuff, but recipe queuing logic etc, the stuff that makes things work. Yes it's very simple to understand, but I cannot work effektively because looking things up is killing me, it's eating up ALOT of time.
The problem is trying to figure out how the tables in table variables are structured, or every variable for that matter. I have lots and lots of lua files open in Notepad++ from the addon and am finding myself constantly looking through the text files of the Gnomeworks directory for another mention of the variable in hope for a clue. Even with the directory find function in Notepad++ this is frustrating.
I'm coming along very slowly, just because of that. I would be great just to see at one glance what a table value looks like in all its subtrees (but THEN eventually looking at something like "itemid" instead of "34893" (for the itemid)).
I just want to work more effectively in figuring out someone elses code without constantly jumping around in the addon folder in frustration.
I know there is WOW UI Designer, but I think it is not up to date. I would also like to view the addon "in one single text file" to see all variables and functions at one glance in a listing, instead of per lua file.
Same thing with functions, in Notepad i can't just jump to the function definition with a hyperlink.
So the only thing this posting of me is asking you is: What addons and windows apps help you the most when going through someone elses code? Or any other tips you have for me?
There are no addons/windows apps for this. It's experience, knowledge of Lua and how the WoW API works, and assumptions on what the logic process of the author was.
Two addons could be functionally the same, yet their interiors look completely different based on the author's logic, code structure, variable choice, comments, etc.
Even with the directory find function in Notepad++ this is frustrating.
I've used Notepad++ only a handful of times, so I don't know how feature-rich its searching is. Most of my WoW coding was done using a Cygwin installation, because I grew up on Unix and am more comfortable using a powerful command line tool such as grep. (More recently I've been running different flavors of Linux inside a virtual machine running on my Windows desktop, and I do my addon coding inside the virtual machine.)
If you're reasonably familiar with regular expressions, a good recursive grep through an addon directory tree can be a gold mine of information.
I would be great just to see at one glance what a table value looks like in all its subtrees
If you're becoming familiar with Lua (note: it's Lua, not LUA) then I highly recommend installing a standalone interpreter. The default x86 binaries are for the Windows Command Shell (cmd.exe) only, as are the prebuilt Cygwin packages if you feel like running Lua from within Cygwin. There are also "LfW" packages, Lua for Windows, containing an interpreter and a metric assload of extra libraries. I don't know if those have a GUI or not.
With your own interpreter, you can pull in things like SavedVariables files and then display and/or manipulate the contents.
Also, from within WoW, you can use the builtin /dump command on a global variable to get it printed out. This includes tables, which will be printed recursively in much the same format that's used for storing savedvar files.
(but THEN eventually looking at something like "itemid" instead of "34893" (for the itemid)).
A Lua command-line interpreter piped through a good sed script can do that. :-)
Or, a Lua script to do the visualization and text replacement for you, might not be a bad side project.
Same thing with functions, in Notepad i can't just jump to the function definition with a hyperlink.
I haven't looked if the ctags program or any of its clones understand Lua syntax, but I'd be amazed if they didn't by now. With that you can build a cross-reference database that's readable by lots of popular text editors; I'd be equally amazed if Notepad++ couldn't parse that database format (it's been around since dirt). Then you have your jumping around references, which is where the "Visual ____" style IDEs got the idea from in the first place.
Right now I am trying to figure out how exactly the addon Gnomeworks works. Not at all the GUI stuff, but recipe queuing logic etc, the stuff that makes things work. Yes it's very simple to understand, but I cannot work effektively because looking things up is killing me, it's eating up ALOT of time.
The problem is trying to figure out how the tables in table variables are structured, or every variable for that matter. I have lots and lots of lua files open in Notepad++ from the addon and am finding myself constantly looking through the text files of the Gnomeworks directory for another mention of the variable in hope for a clue. Even with the directory find function in Notepad++ this is frustrating.
I'm coming along very slowly, just because of that. I would be great just to see at one glance what a table value looks like in all its subtrees (but THEN eventually looking at something like "itemid" instead of "34893" (for the itemid)).
I just want to work more effectively in figuring out someone elses code without constantly jumping around in the addon folder in frustration.
I know there is WOW UI Designer, but I think it is not up to date. I would also like to view the addon "in one single text file" to see all variables and functions at one glance in a listing, instead of per lua file.
Same thing with functions, in Notepad i can't just jump to the function definition with a hyperlink.
So the only thing this posting of me is asking you is: What addons and windows apps help you the most when going through someone elses code? Or any other tips you have for me?
Two addons could be functionally the same, yet their interiors look completely different based on the author's logic, code structure, variable choice, comments, etc.
I've used Notepad++ only a handful of times, so I don't know how feature-rich its searching is. Most of my WoW coding was done using a Cygwin installation, because I grew up on Unix and am more comfortable using a powerful command line tool such as grep. (More recently I've been running different flavors of Linux inside a virtual machine running on my Windows desktop, and I do my addon coding inside the virtual machine.)
If you're reasonably familiar with regular expressions, a good recursive grep through an addon directory tree can be a gold mine of information.
If you're becoming familiar with Lua (note: it's Lua, not LUA) then I highly recommend installing a standalone interpreter. The default x86 binaries are for the Windows Command Shell (cmd.exe) only, as are the prebuilt Cygwin packages if you feel like running Lua from within Cygwin. There are also "LfW" packages, Lua for Windows, containing an interpreter and a metric assload of extra libraries. I don't know if those have a GUI or not.
With your own interpreter, you can pull in things like SavedVariables files and then display and/or manipulate the contents.
Also, from within WoW, you can use the builtin /dump command on a global variable to get it printed out. This includes tables, which will be printed recursively in much the same format that's used for storing savedvar files.
A Lua command-line interpreter piped through a good sed script can do that. :-)
Or, a Lua script to do the visualization and text replacement for you, might not be a bad side project.
I haven't looked if the ctags program or any of its clones understand Lua syntax, but I'd be amazed if they didn't by now. With that you can build a cross-reference database that's readable by lots of popular text editors; I'd be equally amazed if Notepad++ couldn't parse that database format (it's been around since dirt). Then you have your jumping around references, which is where the "Visual ____" style IDEs got the idea from in the first place.