Adjusting Edit Menu items

Peter Haworth pete at lcsql.com
Sun May 13 15:27:58 EDT 2012


Still working on getting my app ready to submit to the Apple Store and
paying some attention to the Edit menu.

Up to now, I've just left all items on it enabled but don't think that
would pass Apple guidelines.  So now I'm disabling/enabling the cut, copy,
paste, clear, and select all when appropriate.

What I have so far, which seems to work, is:

- on preOpenCard, check for the clipboard containing text and
enable/disable Paste accordingly

- a mouseMove handler for any editable fields that checks the selectedtext
and enables/disables the Edit menu cut/copy/clear items appropriately.

I guess I'm just wondering if mouseMove is the standard way to do this.  I
wanted to use mouseUp but apparently mouseUp doesn't get sent to unlocked
text fields.

If mouseMove is the best way to do it, I currently have a mouseMove handler
for each editable field.  If I try to avoid code duplication by moving the
handler up to some higher level, say the card, am I likely to run into any
performance issues?  Seems like mouseMove happens a lot and would go
through a card level handler in a lot of circumstances that I don't care
about.

Thanks,

Pete
lcSQL Software <http://www.lcsql.com>



More information about the use-livecode mailing list