Thread Tools Display Modes
Prev Previous Post   Next Post Next
12-06-13, 01:27 PM   #1
MoonWitch
A Firelord
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 455
I admit defeat

I haven't a clue why all of the sudden it no longer makes sense to me, but after more than a year away - I can't seem to write lua anymore.

It refuses to register in my thick skull, leaving me feeling rather inadequate right now (Ok, I have the flu together with abdo flu, so I am feeling quite down.) I've been trying to wrap my head around how others do the scope, event handling, module setup, but it seems to elude me.
Say, p3lim, he handles it well I think, but I just don't understand : https://github.com/p3lim-wow/Inomena...er/Inomena.lua (I am certain if I understand it, I am saved)

Basically; here's what I've been trying to achieve :
- Have my basic UI setup in one add-on, which I had working - but then I made the feverish decision to redo the entire thing.
-- I was going to have it modular again, as it was. -- this is no longer working of course.
-- I wanted to have my core.lua contain the event handlers and utility functions

core.lua is setup and works, however, I seem to have lost the "module" effect, and I can't seem to figure it out. I looked at various other add ons written by people whom I greatly admire - but I just am not seeing the light. Not when it comes to the modular nature, not when it comes to event handling.

It's set up as follows :
Code:
Eavu.toc
cvars.lua -- just cvar edits and setting the UI scale, is actually self sufficient
Eavu.lua -- contains the config, createPanel fund and event handler (which should have been usable by the modules)
modules/autorepair.lua -- works when I include the frame:SetScript(event, method), when I try to get it to fall back on the event handler of eavu.lua - it won't work. I'm also calling a function Eavu.print() which is defined in eavu.lua - but alas. 
modules/panels.lua -- works again
modules/broker.lua -- uses LibCargoShip, doesn't use anything of eavu, positioning is based on panels.lua, so that it can read fine
modules/.... -- haven't gotten to the others
for those interested: https://github.com/moonwitch/Eavu

Last edited by MoonWitch : 12-06-13 at 01:46 PM. Reason: also -- cairenn, can ya move this to Lua? I posted in the wrong section...
  Reply With Quote
 

WoWInterface » Developer Discussions » General Authoring Discussion » I admit defeat


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