Cut,Copy,Paste menus

Jan Schenkel janschenkel at yahoo.com
Sat Feb 1 03:16:01 EST 2003


--- Ron <rbarber at yhb.att.ne.jp> wrote:
> Okay, a little progress. Instead of trying to fix my
> broken stack, I tried
> to break the simple stack using scripts from the
> broken one. It looks like
> I'm sending menumessages to a disabled menu and it
> doesn't respond (duh). So
> my question should be:
> 
> Where should scripts that control the
> enabling/disabling of menuitems be
> placed? Obviously, the menu's mousedown message is
> not the place because it
> is not activated until I click in the menubar.
> 
> All I'm trying to do is provide standard text editor
> behavior to the stack.
> Things including but not exclusively:
> 
> cursor in a fld - enable past
> selectedtext - enable cut,copy
> 
> Thanks
> Ron
> 

Hi Ron,

You could add openField and selectionChanged handlers
to your mainStack script to this effect.
You'll probably also want to trap the rawKeyDown
message because no selectionChanged is sent when you
use the arrowkeys.
If you also have list fields in your app, you might
want to add checks for that so things don't get messy.

Hope this helped,

Jan Schenkel.

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com



More information about the use-livecode mailing list