Me and target of script widgets

David Bovill david.bovill at gmail.com
Sun Oct 22 05:41:02 EDT 2023


Having my first go at script widgets. It appears that there is either an
issue (or it is a feature) with script widgets and "me"?

A handler like this:

*on* mouseUp

*## All references are to "inner" controls (ie the target) and not the
group*

*put* the short id of me into shortID

*put* the long id of the target into sName

*put* the long id of me into myID

*## Have to be explicit with messages*

*-- dispatch "menu_AskEdit" to me -- or the target does not work*

*dispatch* "menu_AskEdit" to this card with myID,shortID

*end* mouseUp

When inside a script only widget shows that would normally pass the long id
of the control clicked on within the group (script widget) with myID and
the short ID of the group (script widget) itself in shortID. However both
the target and me refer to the control and not the group / script widget.
It seems there is no easy way to find out a reference to "me" in a
script widget?

I've a lot of scripts that use "me" in behaviors for potential script
widgets - so looking for a short term and long term solution for this?


More information about the use-livecode mailing list