On Sep 13, 2009, at 15:11, ALEXander wrote:

1) in the File's Owner class I defined a function returning an NSArray:

- (NSArray*) controlTypes
{
        if ([[self selectedControls] count]) {
NSArray *returnArray = [NSArray arrayWithArray:[[[[self selectedControls] objectAtIndex:0] configTypes] allKeys]];
                return returnArray;
        } else {
                return nil;
        }
}


2) In the NIB, I made an NSPopUpbutton and bound Content, Content Objects and Content Values all to File's Owner with the model key path controlTypes.

This does not work any more in Snow Leopard. Any ideas what I have to change to make it work again?

What does "does not work" mean? We can't help unless you ask a meaningful question.

Typically, there's no need to make all 3 of those bindings if they're all the same array. IIRC, if your array is a list of the strings you want to see in the popup, then you just need the Content Values binding.

Also, note that (from the code snippet you've posted) the object is *not* KVO compliant for the "controlTypes" property. Depending on the order of object unarchiving at NIB loading time, it's possible that the lack of compliance accidentally didn't matter before but does now.


_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Reply via email to