Poster: Anduinlothar at 9/29/2005 9:30:59 PM PDT Subject: GetScript Error suggestion for Slouken |
| |
So I've pretty much mastered frame script element hooking, however there's no good way to check if the script element exists. Currently if you do a GetScript on a frame that doesn't have that particular script element it errors.
Ex: Frame doesn't have a "OnClick" script.
Why doesn't it just return nil? that would be easy to check in code and make my life easier. Either that or have a HasScript function that returns 1/0 or true/false.
-AnduinLothar
http://www.wowwiki.com/User:KarlKFI
|
| | http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=231140&p=#post231140 |
| |
Poster: slouken at 9/30/2005 10:14:52 AM PDT Subject: Re: GetScript Error suggestion for Slouken |
| |
By the way, SetScript() will give you the same error, if you try to set a script which doesn't exist for that frame.
Why would you be getting scripts from arbitrary frames without knowing what they are and what they do, anyway?
|
| | http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=231140&p=#post231379 |
Poster: slouken at 9/30/2005 11:18:49 AM PDT Subject: Re: GetScript Error suggestion for Slouken |
| |
Q u o t e: A Frame:GetType() method would be extremly useful in AceGUI.
Remind me in the 1.9 Upcoming Changes thread when it gets started. It's something I'd definitely like to add.
|
| | http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=231140&p=#post231426 |
Poster: slouken at 9/30/2005 4:10:35 PM PDT Subject: Re: GetScript Error suggestion for Slouken |
| |
Q u o t e: Well, my original reasoning for wanting to be able to tell if a frame could use that particular script elemt is for abstraction.
Okay, I added Frame:HasScript("scripttype");
Q u o t e:
And maybe I'm getting carried away but what about Frame:SetFrameType("frameType") is that even feasable
You can't change a frame type.[ post edited by slouken ]
|
| | http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=231140&p=#post231728 |
Poster: slouken at 9/30/2005 4:13:26 PM PDT Subject: Re: GetScript Error suggestion for Slouken |
| |
Yes, for the next test server update.
|
| | http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=231140&p=#post231731 |
Poster: slouken at 9/30/2005 10:10:24 PM PDT Subject: Re: GetScript Error suggestion for Slouken |
| |
Feel free, I'll ignore any that are of dubious worth or time consuming to implement.
|
| | http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=231140&p=#post231920 |
Poster: slouken at 10/1/2005 12:03:38 PM PDT Subject: Re: GetScript Error suggestion for Slouken |
| |
*nod* Good point, although it's probably too late to change at this point.
|
| | http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=231140&p=#post232103 |
Poster: slouken at 10/1/2005 7:01:49 PM PDT Subject: Re: GetScript Error suggestion for Slouken |
| |
Heheh, the confusing name. The functionality is what you asked for.
|
| | http://forums.worldofwarcraft.com/thread.aspx?fn=wow-interface-customization&t=231140&p=#post232318 |