View Single Post
01-04-23, 12:07 PM   #4
Gello
A Molten Giant
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 521
Thanks for testing to confirm. Yeah even if the frame has no user-defined elements (<Frame parentKey="TestCrashBugChild"/>) it seems to crash for me. I can do all sorts of stuff in the OnEnter, but showing another frame seems to cause the crash. And if the frame gets hidden, like in the OnLeave, it seems fine.

I'm very excited to use these new script handler-enabled textures. I hope this bug (and the issues with textures not inheriting script handlers unless any are explicitly defined in XML) are sorted out soon.

One of my addons has an intrinsic button template called RematchCompositeButton that I've been using for some time that makes textures into buttons with their own OnEnter/OnLeave/OnClick behaviors. While the mouse is over a button it periodically checks if the mouse is over a texture in the ARTWORK layer and triggers a callback if the texture was registered for one. (This was to solve a crash issue on Macs due to having too many buttons ontop of buttons in my lists.)

Blizzard's implementation is better since the parent button also gets an OnLeave and such, promoting the textures to actual button/frame behavior. GetMouseFocus() even returns the texture under the mouse instead of the button which is kind of wild.

Last edited by Gello : 01-04-23 at 12:09 PM.
  Reply With Quote