View Single Post
01-31-12, 05:24 PM   #22
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Originally Posted by Grimsin View Post
Neither of the or'ing methods work it always trys to hook to the first frame passed and when it finds its not a frame it errors.

doing a frame =~ nil did work
Then you asked the wrong question. You asked if a frame had been created yet. If a frame has not been created, then it is nil - assuming that you used a unique name or unique global variable for it. If it is nil, then my line will pass through the or. If, as you say, it throws an error saying that it's not a table, then it's not nil. It's equal to something else. Meaning that you are using the same variable name for multiple things.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote