Scripting Cut/Copy/Paste in custom menus
Bob Sneidar
bobsneidar at iotecdigital.com
Sat Sep 13 20:55:09 EDT 2014
Hi all.
As many know, creating a custom menu set on OS X (not sure about Windows) will typically add the File and Edit menus to your customer menu set. This has the net effect of *disabling* cut/copy/paste/clear. I can live with that, because I have scripted the necessary menus to mimic the behaviors of those actions, but I am finding some quirks.
First, if I cut or paste something in a field then tab out, closeField is not triggered. I assumed this was because the field was not getting selectionChanged, so I sent selectionChanged to the focusedObject after the cut/copy operations. Still, closeField does not get sent when I tab out of it. closeField DOES get sent if I simply edit the field then tab out.
So what gets sent to the engine exactly that lets it know that the contents of a field have changed, so that tabbing out generates the proper closeField message?
I suppose I could use textChanged to work around it, but frankly I would have to go through all my scripts which send a closeField to this object, and I’d rather not mess with what is already working.
Bob S
More information about the use-livecode
mailing list