Enabled Binding Bug

29 views
Skip to first unread message

Keary Suska

unread,
Jan 10, 2017, 7:29:44 PM1/10/17
to objec...@googlegroups.com
Before I file a bug report has anyone else noticed a recent issue where enabled bindings on buttons (including CPPopupButton) where if you are using NSIsNil or NSIsNotNil transformers, that the binding fails for null values unless you specify the null placeholder value?

Note that existing bindings seem to be fine, only new ones, and this seems to only have started happening since the update to latest master.

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"

Keary Suska

unread,
Jan 10, 2017, 7:56:58 PM1/10/17
to objec...@googlegroups.com
Actually, it is oddly not reproducible. It only happens with certain xibs and I can’t seem to find what is different. I’ll see if I can come up with a reduction.
> --
> You received this message because you are subscribed to the Google Groups "Cappuccino & Objective-J" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to objectivej+...@googlegroups.com.
> To post to this group, send email to objec...@googlegroups.com.
> Visit this group at https://groups.google.com/group/objectivej.
> For more options, visit https://groups.google.com/d/optout.

daboe01

unread,
Jan 11, 2017, 2:21:48 AM1/11/17
to Cappuccino & Objective-J, cappu...@esoteritech.com

Martin Carlberg

unread,
Jan 11, 2017, 4:13:18 AM1/11/17
to objec...@googlegroups.com
Hi,

Yes, I have seen this for many years. I go in and set the value two times to make sure the binding should do the right thing.

- Martin

From my code:
    // This is to go around some kind of bug in Cappuccino when enable binding, maybe with CPBooleanNegate transformer, is set wrong at the first time. Issue #1986 on http://github.com/cappuccino/cappuccino
    [theItem setValue:![theItem valueForKey:@"dontShowContactInformation"] forKey:@"dontShowContactInformation"];
    [theItem setValue:![theItem valueForKey:@"dontShowContactInformation"] forKey:@"dontShowContactInformation"];



Reply all
Reply to author
Forward
Message has been deleted
0 new messages