WoWInterface - View Single Post - setText or setFormattedText or ?
View Single Post
10-17-16, 05:09 PM   #9
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
This is from the XML you posted:

<Frame name="QuestGuru" parent="UIParent" ...>
         <Button parentKey="TrackButton" inherits="MagicButtonTemplate" text="TRACK_QUEST_ABBREV">
Based on that, the button's parent is the frame with the global name "QuestGuru" and the button's parentKey is "TrackButton", which means it's available as "QuestGuru.TrackButton".

The only ways that "QuestGuru.TrackButton" can be nil are:

1. The code you posted is not your real code.

2. Some other code (that you didn't post) overrides the "QuestGuru" global with some other object that isn't the frame created by your XML, so there's no longer any global reference to the frame or anything (like the button) attached to it.

Again, this is why you should post your entire, actual code when you're asking for help. It doesn't matter if it's 50 lines or 50,000,000 lines -- we're not going to read through every line, we're going to search for specific parts that are related to the issue at hand. Without being able to do that, all we can do is throw out random guesses that may or may not be useful.

The only difference between 50 lines and 50,000,000 lines is that you should not embed the latter in a forum post; use pastebin or gist for longer pieces of code.
Author/maintainer of Grid, PhanxChat, oUF_Phanx, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
  Reply With Quote