-
Posted by galvin on Wed, 01 Sep 2010 23:08:32
I been working on this addon for around three weeks. And came up with what I think is rather fancy way of doing things. This addon keeps a list of frames it creates from a static table or doesn't use the static table if its loaded from disk. What I'm asking is if was a good way before I go deeper into the coding. Instead of posting my whole addon i'll try to post the key parts to get my point accross.
I been programming off and on sine 1984 in basic, then pascal, a tiny bit of C. So i'm not new to coding just to lua. Been studying lua all this year and 3 weeks ago felt I was ready to tackle a serious addon of my own.
This addon unless someone tells me a much better way to do it I probably wont make any major changes to whats already coded and just add new stuff.
http://pastey.net/140273-48bb
What I'm looking for is the way I handled events and status checking and just updating. I put a lot of hardwork into finding a way that is straight forward and logical and clean.
Reason for edit: using pastey.net for better feedback.
-
Posted by jnwhiteh on Thu, 02 Sep 2010 08:24:43
I'm not really sure I understand what you're saying about a static table and being loaded from disk. That being said, the addon code you've posted is incredibly well documented and clear, so I don't see any issues with what you've been doing. It seems a really disciplined way of writing addons, but without going through line-by-line I can't provide much more critique than that. Very clear, however!
-
Posted by galvin on Thu, 02 Sep 2010 19:40:41
Well I already added in ace3 DB, so I can use different profiles.
I wrote the code from the ground up to keep all the settings in one table. So that one table could be written or loaded. Yeah I learned a long time ago if you dont document a lot you forget how your own stuff works one day. Ive seen some addons that are coded so bad makes me cringe.
-
Posted by jnwhiteh on Thu, 02 Sep 2010 21:38:21
I'm guilty of that in quite a few of my addons. Unfortunately when you run out of time and have users to support, not everything can be done perfect. Alas =)