Disabling MenuItems
Rob Cozens
rcozens at pon.net
Wed Dec 7 15:03:48 EST 2005
Hi All,
Working on Win XP; RunRev 2.6.1,
if the platform is "MacOS" then
enable menuItem 11 of menu 1
enable menuItem 13 of menu 1
else
disable menuItem 11 of menu 1
disable menuItem 13 of menu 1
end if
does not disable menuItems 11 & 13 until the stack is opened a second
time in the Development environment, and _never_ seems to disable
them if opened from Rev's Plugins folder. OTOH,
if the platform is "MacOS" then
enable menuItem 11 of menu 1
enable menuItem 13 of menu 1
else
get the text of button id 1004 -- the first menu button
if char 1 of line 11 of it <> "(" then put "(" before line 11 of it
if char 1 of line 13 of it <> "(" then put "(" before line 13 of it
set the text of button id 1004 to it
end if
works the first time and every time in both circumstances.
Why? Must I apply a workaround globally? Eg:
on disableMenuItems menuButtonId, itemList
get the text of button id menuButtonId
repeat for each line menuItemNumber in itemList
if char 1 of line menuItemNumber of it <. "(" then put "("
before line menuItemNumber of it
end repeat
set the text of button id menuButtonId to it
end disableMenuItems
?
Rob Cozens, CCW
Serendipity Software Company
Vive R Revolution!
More information about the use-livecode
mailing list