Getting the line number from "on menupick"

Richard Miller wow at together.net
Fri Nov 13 05:43:53 EST 2009


Jacqueline,

In this situation, the instance of duplicate menu items actually serves 
the end user, as it encourages them to create more descriptive labels. 
These menu items are videos that have been imported into my program. The 
original video file names are just a series of numbers (like 
12453253.mov). When they get imported into my program, they are assigned 
a label, "un-named video". This label is what users see in the pulldown 
menu when they go to access one of these videos. So unless they've given 
the video a more descriptive label (they can label a video just about 
anything they want), the menu can display a list with some items of the 
same name.

Yes, I could automatically label each incoming video with a sequentially 
higher number, like "un-named video 11", "un-named video 12", etc., but 
that process actually gets rather messy in my program and tends to 
discourage people from relabeling the videos.

Richard Miller




J. Landman Gay wrote:
> DunbarX at aol.com wrote:
>> Jacque:
>>
>> I could not get a valid line number for a submenu. I understand using 
>> a secondary routine to find   the line number in the button contents, 
>> since I can find the menuPicked text, but are you saying you can get 
>> the line number directly?
>
> No, I was only saying what you describe -- getting the lineoffset of 
> the menupick param in the contents of the button. But that relies on 
> each menu item being different, which I don't see as a disadvantage. I 
> can't think of any software where duplicate menu items would be 
> considered okay.
>




More information about the use-livecode mailing list