addressing menu items (was: Yet another menu question)

Ken Ray kray at
Mon Dec 30 11:14:01 EST 2002


> It seems that I have to
> a) refer to the menu as a button - bringing into question when one
> should use the word 'menu' as an object specifier and when not (and
> why);

This is part of the cross-platform learning experience. ;-) Basically in
Rev, menus *are* buttons; you create a group of buttons that have certain
menu properties and they work like menus. On the Mac, these are "converted"
to being "real" menu items in a "real" menubar, but the menu buttons are
still there in their group; it's just that Rev has hidden them to eliminate
confusion to the user. This way, when you take the program over to Windows
(which doesn't have a fixed menubar), the button group will be shown, and
the "in-window" menus can be used.

> b) set the whole text, not a line at a time

Actually, you can set it one line at a time, but you need to treat a
button's contents like you would a field. You can't say to a field:

  set line 1 of field 2 to "Fred"

you need to say:

  put "Fred" into line 1 of field 2

Similarly, for a button, you can say:

  put "Fred" into line 1 of button 1

and it will overwrite what is the first line of the button's contents (i.e.
the first menu item).

Hope this helps,

Ken Ray
Sons of Thunder Software
Email: kray at
Web Site:

More information about the Use-livecode mailing list