Tab Menus

Sarah sarahr at genesearch.com.au
Wed Oct 9 17:18:00 EDT 2002


There is an even easier way:

on menuPick pNewItem
	put the menuHistory of me into tabNumber
	-- do stuff with it
end menuPick


On Thursday, October 10, 2002, at 12:25  am, Ken Ray wrote:

>> Just thought I'd add a little thing to the answers by
>> Ken and Jeanne.
>> If you want to make your stack multi-lingual at some
>> point in the future, it might be more interesting to
>> find out which button is pressed: the first, second,
>> third,...
>
> Excellent suggestion, Jan. Always good to think about this when 
> developing.
>
>> In such cases, the following piece of code comes in
>> handy:
>>   on menuPick pNewItem
>>     put return & (the text of me) & return into \
>>       tText
>>     put return & pNewItem & return into tNewItem
>>     go card lineOffset(tNewItem, tText)
>>   end menuPick
>> The whole trick with prepending and appending returns
>> is to ensure that if you have two items "History B"
>> and "History" it still picks the correct line.
>
> You can do this a bit easier by setting the "wholematches" property:
>
> on menuPick pNewItem
>   set the wholeMatches to true
>   go card lineOffset(tNewItem,the text of me)
> end menuPick
>
> Ken Ray
> Sons of Thunder Software
> Email: kray at sonsothunder.com
> Web Site: http://www.sonsothunder.com/
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>





More information about the use-livecode mailing list