Value transformers applied to NSPopupButton have some idiosyncrasies.
http://stackoverflow.com/questions/12505764/nspopupbutton-bindings-with-value-transformer

I have applied a transformer to an NSPopupButton content values binding but the 
IB configured transformer does not seem to be applied.
I am not alone in this: http://macscripter.net/viewtopic.php?id=39496

If I log the binding the transformer is present.
However, if I enter an invalid transformer name the app does not raise (which 
it should).
If I then log the binding with the invalid name then it does raise.

Popup button bindings: {
    NSObservedKeyPath = "arrangedObjects.name";
    NSObservedObject = "<NSArrayController: 0xa5f7750>[object class: 
Data_PeriodType, number of selected objects: 1]";
    NSOptions =     {
        NSContentPlacementTag = 0;
        NSInsertsNullPlaceholder = 0;
        NSMultipleValuesPlaceholder = "<null>";
        NSNoSelectionPlaceholder = "<null>";
        NSNotApplicablePlaceholder = "<null>";
        NSNullPlaceholder = "No Value";
        NSRaisesForNotApplicableKeys = 1;
        NSValueTransformer = "<PeriodTypeTransformer: 0x213c070>";
        NSValueTransformerName = PeriodTypeTransformer;
    };
}

Jonathan











_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to