Wow, that fixed it. Thank you!
Can you add any information as to why this was breaking my script? Like is the "OnLoad" script of AddonParent not even getting called if it's not defined in XML?
I tried to do this with XML at first, but I kept getting an error like "method AddonParent_OnLoad not found in element OnLoad" for an XML like this.
Code:
<Ui>
<Script file="Addon.lua"/>
<Frame name="AddonParent">
<Scripts>
<OnLoad method="AddonParent_OnLoad"/>
</Scripts>
</Frame>
</Ui>
Addon.lua
Lua Code:
function AddonParent_OnLoad(self)
...
end