views:

44

answers:

2

Hi there. I'm trying my best to figure out a succinct, straightforward widget, using standard UI widgets available in any toolkit (e.g., checkboxes, radio buttons, or listboxes), that could model a true/false/null value.

Why am I trying to do this? I'm storing a tree in a database (go ahead, criticise me for storing hierarchical information in a relational store) and the simple inheritance model is that if something doesn't have a value, it defaults to its parent's value.

What I have right now is two checkboxes:

[ ] Can custom-order    [ ] default (currently yes)

Checking 'default' will disable the first checkbox. Does that make sense though? I thought of another widget, which uses less scripting:

Can custom order:    ( ) yes    ( ) no    ( ) default (currently yes)

Which makes more sense to you? I'm starting to lean more towards the second. And if anyone has any other suggestions, I'd be grateful!

+1  A: 

I much prefer the second, which makes it clear that there are three values, and one of them is an inherited value. Two checkboxes logically provide four values.

The only thing I might add is something to indicate where the default is coming from. Since this might clutter up the page, it could be a tooltip on the default option.

JSBangs
I would only add that default might say inherit instead.
Byron Whitlock
Thanks! I'm surprised that everyone says 'inherit' is better, cuz to me it's such computery terminology, and the people who are using my web app aren't very computery.I get what you're saying about two checkboxes providing four values. As I mentioned, my code disabled the first when the second was checked, but it seemed ugly to me.
Paul d'Aoust
+2  A: 

To me, the second is more intuitive. And fwiw -- when we've set up similar controls at my firm we've used the label inherit (instead of default) for the pass-through setting.

Drew Wills
I'm out of votes for today or I'd vote this up for *inherit* -- much clearer terminology.
mwigdahl
Thanks! So you think 'inherit' is best too, eh? Well, inherit it is!
Paul d'Aoust