Re: NSArrayController, NSPopupMenu, defaults and arrangedObjects
Re: NSArrayController, NSPopupMenu, defaults and arrangedObjects
- Subject: Re: NSArrayController, NSPopupMenu, defaults and arrangedObjects
- From: Steven Hamilton <email@hidden>
- Date: Fri, 12 Dec 2008 05:16:01 +1000
Great stuff. Thanks Guys. What I've done is register as an observer of
the arrangedObjects keypath in my windowDidLoad method. Then when it
changes I set the correct selectedIncomeEnvelope and remove the
observer. Job done.
On 09/12/2008, at 9:51 PM, Volker in Lists wrote:
Hi Steven,
as far as I know, the fect happens in the next run loop. So you
would need to set the selection then. This is possible for example
via the performSelector:withObject:afterDelay: and a delay of 0.0 on
self (?).
Cheers,
Volker
Ah, I understand. I've implemented the correct property now but I
still have the problem of arrangedObjects returning an empty array
when called in windowDidLoad. So I can't set my property as I have
nothing to set it with. Any ideas why arrangedObjects would return
zero? It's like the window and controls and initialised before Core
Data can return the fetch.
_______________________________________________
_______________________________________________
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