janschenkel at yahoo.com
Sun Oct 5 08:19:00 EDT 2003
--- FlexibleLearning at aol.com wrote:
> Aaaargh! Me brain's gone west and taken me
> intelligence with it....
> Does anyone have a function that parses out only the
> active menuitems from a menuList? Feel free to mail
> me off-list as I am on digest. Thank you!
> Would return...
Blegh, looks like my brain went out for a trip to the
Carribean as well (not me, unfortunately). Here's one
better suited to your purposes :
put the text of btn "Foobar" into tMenuText
put 0 into tLastNumTabs
repeat for each line tMenuItem in tMenuText
if tMenuItem is empty or \
tMenuItem is among the items of "-,(-"
then next repeat
put 0 into tNumTabs
repeat until char 1 of tMenuItem is not tab
add 1 to tNumTabs
delete char 1 of tMenuItem
if tNumTabs > tLastNumTabs
then delete line -1 of tStrippedList
put tNumTabs into tLastNumTabs
put return & tMenuItem after tStrippedList
if char 1 of tStrippedList is return
then delete char 1 of tStrippedList
And now tStrippedList should be what you wanted.
Hope this helped,
"As we grow older, we grow both wiser and more foolish at the same time." (La Rochefoucauld)
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
More information about the Use-livecode