Menu items
Cubist at aol.com
Cubist at aol.com
Thu Mar 25 23:05:24 EST 2004
sez hershrev at realtorsgroup.us
>I have an option button, the menu items needs to be editable, that if
>the list doesn't contain the necessary item the user should be able to
>add it. I used the "use stack menu" . I used menu pick to trigger the
> script when a user selects a menu item , It doesn't seem to determine
>different items ?
Not sure if this can do what you need, since it's just a button rather
than an honest-to-God *menu*, but hopefully it'll shed some light on your problem.
Given: an option-type button
Given: said button's (menu) contents include a number of arbitrary items, the
last one of which is "Edit me"
on mouseUp
put the selectedText of me into DisUn
switch DisUn
case (whatever Line 1 of the button is)
# code for handling the first option
break
case (whatever line 2 of the button is)
# code for handling the 2nd option
break
case "Edit me"
put me into Fred # save the current menu
ask "What new item would you like to add to this menu?"
put it into George
put George & return before the last line of Fred # the *last* line is
"Edit me", right?
# if you want to alphabetize the menu, or play other games with it, do so
here
put Fred into me
break
default
# code for handling anything not already taken care of
end switch
end mouseUp
Hope this helps...
More information about the use-livecode
mailing list