Field visibleBinding* for non-empty text?

Posted on
Sun Jul 17, 2011 2:10 pm
Perry The Cynic offline
Posts: 836
Joined: Apr 07, 2008

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

Posted on
Sun Jul 17, 2011 3:13 pm
jay (support) offline
Site Admin
User avatar
Posts: 18236
Joined: Mar 19, 2008
Location: Austin, Texas

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)
Twitter | Facebook | LinkedIn

Posted on
Fri Sep 20, 2013 1:49 am
berkinet offline
User avatar
Posts: 3297
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Field visibleBinding* for non-empty text?

On Sun Jul 17, 2011 at 2:13 pm jay (support) wrote:
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...

Did this ever happen? (If it did, I couldn't find any documentation).

Posted on
Fri Sep 20, 2013 8:45 am
jay (support) offline
Site Admin
User avatar
Posts: 18236
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Field visibleBinding* for non-empty text?

Nope. It's on the request list but not very high priority.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests