Getting the line number from "on menupick"
Richard Miller
wow at together.net
Thu Nov 12 16:02:01 EST 2009
I have a pulldown button with data in it that makes it act as a
cascading menu. When the user selects an item, I need to know which item
has been selected... not just the text, but the line number or some
other data that would let me know which item was selected, so I can get
more info about that item from an associated database.
The problem I have is that many of the lines in the cascading menu
appear identical by name, though they are not the same item. It's just
that the label assigned by the user is the same (they represent names of
videos.... and the user can name them any way they want, even though the
actual file names are different).
Any given line in the menu may be 5-10 words long... which as it is,
makes the menu rather wide. I could add an identifying tag after each
line [ such as (1), (2), etc.], but that's not very elegant (but perhaps
the only solution).
I tried using:
put the selectedlines of me
put the menuhistory of me
But these don't seem to work with cascading menus.
Any tricks here that would give me the line number selected?
Thanks.
Richard Miller
More information about the use-livecode
mailing list