janschenkel at yahoo.com
Sat Oct 4 14:22:02 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...
Try this :
put the text of btn "Foo" into tMenuText
-- strip off the elading tabs for submenus
replace tab with empty in tMenuText
-- now filter out the divider lines
repeat for each line tMenuLine in tMenuText
if tMenuLine is not among the items of "-,(-"
then put tMenuLine & return after tStrippedList
-- finally clean up the trailing return
delete char -1 of tStrippedList
Then the variable tStrippedList should contain what
you want. I was looking for a way to "filter" instead
of the "repeat" loop but didn't find one right away.
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