Popup menus with several layers of sub-choices

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

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

Re: Popup menus with several layers of sub-choices

Post by danielrr » Sat Mar 23, 2013 10:21 am

Hi,

This looks like the right way to go, but as it stands, the "menupick" seem not to be able to choose the right picking (it does return a choice form the menu, but usually not the right one)

Klaus
Posts: 14194
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Popup menus with several layers of sub-choices

Post by Klaus » Sat Mar 23, 2013 10:46 am

Hi Daniel,

well that is a hack, but a clever one :D

And is, as I said, probably NOT what most useres are exspecting!
At least I would be heavily surprised by that 8)

Better stick with standards!


Best

Klaus

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

Re: Popup menus with several layers of sub-choices

Post by danielrr » Sat Mar 23, 2013 11:16 am

I understand what you say, Klaus, and this is probably the right frame of mind for most occasions, but in other cases I think it depends on context.
Say you've made an app to classify every object crossing the road on wheels (you're a cop with too much free time). You choose from a cascade menu like this one (Don't worry about the rationality of the rationality of the classification approach, I just made up the example; in real life you'd probably use another way to classify things)

Car
Berlina
Ford
Mondego
Diessel
...
...
Mercedes
Honda
SUV
Toyota
...
Bicicle
Mountain Bike
Titanium chasis bike
Race BIke
Motorcicle
Trial
Motocross
...
Truck
...

Did I mentioned you had too much idle time?
Well the point is that you want to be as specific as you can but you can't hope to cover all the possibilities, so that the subchoices, at least in some cases, does not exhaust all the possibilities. When the user understand that point I don't think he or she will find a bug if the app accepts as a valid selection a picking that is below the last degree of specificity. Well, that was the idea at least. I'll have another look at mwieder's clever hack and see if I can fix it!

Klaus
Posts: 14194
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Popup menus with several layers of sub-choices

Post by Klaus » Sat Mar 23, 2013 11:43 am

Hi Daniel,

yep, I understand that there might be some non-standard requirements!
(you're a cop with too much free time)
Oh well, I SURE know what you mean here :D


Best

Klaus

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: Popup menus with several layers of sub-choices

Post by sturgis » Sat Mar 23, 2013 4:30 pm

Also keep in mind you can add a menu entry wherever you need it that does NOT have subchoices, and this will help a) keep the format as expected for UI standards. (overriding standards as you say though might work better for your purposes, just mentioning an option here)

So that you have

car
truck
boat
rv
plane

And inside car
Current Level
chevy
ford
lincoln

If they choose current level it will return Car|Current Level (or whatever you want to call your special entry) check for Current level in your menupick and act accordingly. The downside of course is that you could greatly expand the number of entries in your menu depending on what you actually need to do. The other method is a really snazzy way to avoid that issue.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10045
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Popup menus with several layers of sub-choices

Post by FourthWorld » Sat Mar 23, 2013 6:14 pm

danielrr wrote:Say you've made an app to classify every object crossing the road on wheels (you're a cop with too much free time). You choose from a cascade menu...
Ouch. Makes my hand hurt just thinking about trying to mouse through so many long and deeply nested menus. :)

Klaus was merely being helpful. Even the Apple HIG notes that hierarchical menus are physically difficult to use.

With so much data to navigate, have you considered Miller columns instead? Simpler to code, and much simpler to use for large hierarchies.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: Popup menus with several layers of sub-choices

Post by sturgis » Sat Mar 23, 2013 6:36 pm


With so much data to navigate, have you considered Miller columns instead? Simpler to code, and much simpler to use for large hierarchies.
As much as I personally dislike nested menus, if it were me ^^^^^^ sounds like a great solution.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Popup menus with several layers of sub-choices

Post by mwieder » Sat Mar 23, 2013 7:37 pm

"Simpler to code"? Do you have sample code (especially as a generic form)?
I like the idea, but I haven't tried to implement Miller columns.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10045
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Popup menus with several layers of sub-choices

Post by FourthWorld » Sun Mar 24, 2013 10:57 pm

I suppose I should qualify "eaiser to build": they're easier if you're handling a knonw number of levels. Working with single-object trees like hierarchical menus require that you're able to build everything out at once, but with Miller columns you only need to build the next level when an item in the previous level is selected. Really good for file systems (why they've been popular in NeXT and OS X), and other large collections.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply