• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: bindings via file's owner don't update
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bindings via file's owner don't update


  • Subject: Re: bindings via file's owner don't update
  • From: Mikkel Eide Eriksen <email@hidden>
  • Date: Tue, 30 Nov 2010 06:36:21 +0100

On Nov 30, 2010, at 3:18 AM, Quincey Morris wrote:
> 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.

Yeah it turns out I had to jump through some hoops when I added it that way, so I'll probably put it back.

> 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.

"visible at launch" is unchecked (and the NSTextFields have "continuously updates value" checked).

> Alternatively, there could be a problem with the KVO compliance of your document's "objectCount" property. Are you certain it's compliant?

It's defined & implemented like this so I don't think there are any compliance issues:

@property (readwrite, assign) NSInteger objectCount;
@synthesize objectCount;

> 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.

I'm updating the objectCount property during readFromURL:ofType:error: - could that be it?

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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

  • Follow-Ups:
    • Re: bindings via file's owner don't update
      • From: Quincey Morris <email@hidden>
  • Prev by Date: [MEET] CocoaHeads Mac Developer Meetings
  • Next by Date: Re: Text colour button problem in Font Panel
  • Previous by thread: Re: bindings via file's owner don't update
  • Next by thread: Re: bindings via file's owner don't update
  • Index(es):
    • Date
    • Thread