View Single Post
03-10-21, 05:35 PM   #2
Kanegasi
A Molten Giant
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 666
A few issues:

1. The second argument of CreateFrame is the global name of the frame. You do not want to create global objects named "btn1" etc. Choose a unique name.

2. Line 5, you're missing "local" in front of "button".

3. Your thread's issue is because you're attempting to index the parent DeathKnightSpellList table at the same time you're trying to index the spellChatList child table.

The first button: DeathKnightSpellList[1].spellChatList[1]
The second button: DeathKnightSpellList[2].spellChatList[2]

And so on. I also don't see where the index key in the button's table is getting its value in the code you shared, so self.index should be nil.
  Reply With Quote