Syntax for cascade menus?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
danielrr
Posts: 142
Joined: Mon Mar 04, 2013 4:03 pm

Syntax for cascade menus?

Post by danielrr » Sat Apr 27, 2013 5:27 pm

Is there a reference for the syntax of the cascade menus, or a stack with examples? The userguide is not exactly explicit about it.

Specifically, my current concern is this one. I have a list of names and numeric equivalent pairs. Each name can have multiple sub choices, etc. I'd like the user to see just the names, but the button should return both the name and the numeric identifier. The following form plays only the first half of the trick, but returns just the numeric identifier.

Code: Select all

Bob/|100230
Luis/|33489
<tab>Patrick/|89779
<tab>Bob/|6788
<tab><tab>Shirley/|90009

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10331
Joined: Wed May 06, 2009 2:28 pm

Re: Syntax for cascade menus?

Post by dunbarx » Sat Apr 27, 2013 8:42 pm

Hi.

I would place the corresponding pairs in a custom property of the menu.
Then when the user selects a name, the menuPick handler can find the associated number in the property, and send it along...

When you use tags, the menuPick handler will only return the tagged data, not the "parent".

Craig Newman

danielrr
Posts: 142
Joined: Mon Mar 04, 2013 4:03 pm

Re: Syntax for cascade menus?

Post by danielrr » Sun Apr 28, 2013 9:49 pm

OK, thanks. I though there would be a simpler way to do it, but this one is fine

Post Reply