View unanswered posts | View active topics It is currently Wed Jun 19, 2013 4:10 am



Reply to topic  [ 2 posts ] 
 Field visibleBinding* for non-empty text? 
Author Message

Joined: Apr 07, 2008
Posts: 393
Post Field visibleBinding* for non-empty text?
I'm trying to build a chain of fields that appear as previous ones are filled in:
Code: Select all
     Host: [host device menu]
     Device Address: [device id on host menu]
Host is a menu of host devices already configured, and starts out with "- no selection -". I want the Device Address field to appear once Host is chosen. But the visibleBindingId/visibleBindingValue feature only seems to work for equality, not inequality - I want to say, "Make this field appear if the "host" field is not empty."

While we're at it, how about just adding a visibleBindingOperation so you can have equal, not-equal, empty, not empty, set, unset, etc.? You'll get out of the "was visibleBindingValue a false or a zero?" business, and visibleBindingValue only needs to be set for text comparisons.

Oh, and why is visibleBinding and enabledBinding not working the same? (Why is there a visibleBindingValue but no enabledBindingValue?) Shouldn't they be using exactly the same mechanism?

Cheers
-- perry


Sun Jul 17, 2011 2:10 pm
Profile
Site Admin
User avatar

Joined: Mar 19, 2008
Posts: 6848
Location: Austin, Texas
Post Re: Field visibleBinding* for non-empty text?
Perry The Cynic wrote:But the visibleBindingId/visibleBindingValue feature only seems to work for equality, not inequality - I want to say, "Make this field appear if the "host" field is not empty."


Yep, I ran across that myself. Maybe in the next version of the API.

Perry The Cynic wrote:While we're at it, how about just adding a visibleBindingOperation so you can have equal, not-equal, empty, not empty, set, unset, etc.? You'll get out of the "was visibleBindingValue a false or a zero?" business, and visibleBindingValue only needs to be set for text comparisons.


That's adding a bunch of sophistication in the binding process that we don't get for free using Cocoa Bindings - perhaps in the future.

Perry The Cynic wrote:Oh, and why is visibleBinding and enabledBinding not working the same? (Why is there a visibleBindingValue but no enabledBindingValue?) Shouldn't they be using exactly the same mechanism?


To annoy you... :P

Seriously, because the way it works now is based (somewhat) on how Cocoa Bindings work (and we rely on them for the implementation) and somewhat in an organically grown way - Enabling came first so it's not quite as full-featured as visibility. Future releases will flesh out the UI XML more based on developer feedback and our own experiences.

_________________
Jay (Indigo Support)
Image


Sun Jul 17, 2011 3:13 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.   Template designed by STSoftware.