I have been able to get to the point of defining menu buttons defined
via scripts, but I have not been able to get the resulting button
group defined as the menu bar on the Macintosh side. On the PC side
all I need to do is put the resulting group at the upper left of the
stack and it should look like a menu built with the Menu Builder.
I'm not sure whether I am heading down the right path or not, or for
example whether it would make more sense to have the buttons created
in the preOpenStack routine, then make them invisible so they do not
appear in the card but only in the menubar, or whether I can create
them as invisible in the first place etc.
If anyone can give a pointer , then that would be very usefull to me.
I am happy for the final (working!) scripted menu creation/template
using code to be included as sample code in RunRev/MC if this is not
already available somewhere else.
Cheers,
Mark
on openstack
if there is no button "My Menu" then new button "My Menu"
put "Line 1" & return & "Line 2" & return & "-" & return & "Line
3" & return & "-" & return & "Quit &q" into button "My Menu"
set the script of button "My Menu" to "on menuPick which" & return
& "switch which" & return\
& "case " & quote & "Line 1" & quote & return & "beep"\
& return & "break" & return & "case " & quote & "Line 2" &
quote & return & "beep"\
& return & "break" & return & "default" & return & "beep"\
& return & "break" & return & "end switch" & return & "end menuPick"
set the style of button "My Menu" of this stack to "menu"
set the menumode of button "My Menu" of this stack to popup
if there is no button "My About" then new button "My About"
set the style of button "My About" of this stack to "menu"
set the menumode of button "My About" of this stack to popup
put "About This Stack &A" into button "My About"
set the width of button "My About" to 50
set the width of button "My Menu" to 50
set the left of button "My About" to the right of button "My Menu"
set the name of the templateGroup to "my menus"
select button "File" and button "My About"
group
-- wasn't sure whether the following line, or the one after would
define the group as a menu,
-- so I tried both, but neither worked :-(
--set the defaultMenubar to the short name of group "my menus" of this stack
set the menubar to the short name of group "my menus" of this stack
end openstack
Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.