Re: NSPopUpButton breaks in Snow Leopard
Re: NSPopUpButton breaks in Snow Leopard
- Subject: Re: NSPopUpButton breaks in Snow Leopard
- From: Quincey Morris <email@hidden>
- Date: Mon, 14 Sep 2009 10:26:05 -0700
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 (email@hidden)
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:
This email sent to email@hidden