View Single Post
02-03-12, 03:28 AM   #4
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 331
Originally Posted by Phanx View Post
This line is not valid Lua:
Code:
GameTimeCalendarInvitesGlow:Show() = GameTimeCalendarInvitesGlow:Hide()
It will first evaluate the right side of the equation, and come up with a nil value (since the Hide method on a frame does not return any values). Then it will try to assign that value to the left side of the equation, but since the left side is not a variable (but also a nil value) it will fail and trigger a Lua error. It's bascially the same as trying to do:
Code:
4 = 6
I think you meant to do this:
Code:
GameTimeCalendarInvitesGlow.Show = GameTimeCalendarInvitesGlow.Hide
... which will evaluate the right side to come up with the actual function that runs when you call the "Hide" method on the frame, and assign it to the "Show" method name on the same name, so that when you do call the "Show" method (or more likely, Blizzard's code calls it) you call the "Hide" method instead.
Derp, yea that's what I meant.
  Reply With Quote