Thread: new to lua/xml
View Single Post
07-04-05, 11:22 AM   #3
Littlejohn
A Warpwood Thunder Caller
AddOn Author - Click to view addons
Join Date: Jun 2005
Posts: 90
You have a lot of code there for trying an experiment. You might get a better response if you strip back the example to one really simple button.

I haven't done anything with button bars, but I see you're trying to use the standard action button framework. That probably won't work with check buttons because they don't derive from the ActionButton frame template.

Try writing your button to use a hard-coded CastSpellByName() instead of UseAction(). Once you get that working, then you can create an ActionCheckButton template and try to get it to behave enough like a normal ActionButton that the action button framework accepts it.

In my experience, it's best to learn by ripping out everything I don't understand, then add stuff back slowly as I learn. Many add-ons started out as a cut-and-paste from Blizz code and then accumulated extra features by experimenting with the API. (It's *amazing* how much stuff has been reverse engineered from Blizzard's undocumented code.) Starting from scratch is a slower path than the cut-paste-hack route, but you'll understand things a lot better in the end.
  Reply With Quote