Re: bindings via file's owner don't update
Re: bindings via file's owner don't update
- Subject: Re: bindings via file's owner don't update
- From: Quincey Morris <email@hidden>
- Date: Mon, 29 Nov 2010 12:59:23 -0800
On Nov 29, 2010, at 08:10, Mikkel Eide Eriksen wrote:
> Reading up on the documentation, I guess what I should do in my Document init is this:
>
> if (![self loadingWindowController])
> [self setLoadingWindowController:[[MyLoadingWindowController alloc] init]];
> [self addWindowController:loadingWindowController];
Probably not. Adding the window controller to the document's window controller list has side effects (such as making your window appear in the Window menu, which likely isn't desirable). Your original approach seems like the more natural design.
Regarding your problem, you didn't by chance forget to uncheck "visible at launch" in the nib file that contains your "loading" window? That could produce the sort of results you're seeing.
Alternatively, there could be a problem with the KVO compliance of your document's "objectCount" property. Are you certain it's compliant?
Alternatively, you might be reading the document contents on a background thread, and therefore triggering "objectCount" KVO notifications in that thread. For the user interface to work, the KVO notifications need to be issued on the main thread.
_______________________________________________
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