Hello,

please excuse the lousy error description. I must have been in a mood.

What does not work is that no menu items are displayed. The function
correctly returns an NSArray containing NSStrings. But despite of the
bindings the menu is always empty.

What do you mean by KVO compliant? I already have added a
setControlTypes function, this was not necessary in Leopard and also
does not fix the bug in Snow Leopard.

I am pretty clueless and about to change the code and use the
NSPopUpButtonWillPopUpNotification to assemble the menu correctly
before it is displayed. Maybe thats more advisable?

Thanks very much, ALEXander.


On Mon, Sep 14, 2009 at 7:26 PM, Quincey Morris
<quinceymor...@earthlink.net> wrote:
> 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/alexander%40wackazong.com
>
> This email sent to alexan...@wackazong.com
>
_______________________________________________

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