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

2010-12-02 Thread Mikkel Eide Eriksen
On Dec 2, 2010, at 1:47 AM, Quincey Morris wrote: > On Dec 1, 2010, at 11:08, Mikkel Eide Eriksen wrote: > >> See line 48 & onwards below: >> >> http://code.google.com/p/cocoa-gedcom/source/browse/trunk/GCCoreData/src/GCDocument.m >> >> (there are probably lots of terribly ugly non-Cocoa things

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

2010-12-01 Thread Quincey Morris
On Dec 1, 2010, at 11:08, Mikkel Eide Eriksen wrote: > See line 48 & onwards below: > > http://code.google.com/p/cocoa-gedcom/source/browse/trunk/GCCoreData/src/GCDocument.m > > (there are probably lots of terribly ugly non-Cocoa things in here, I'm only > just starting out and come from a most

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

2010-12-01 Thread Mikkel Eide Eriksen
On Dec 1, 2010, at 7:41 PM, Kyle Sluder wrote: > On Wed, Dec 1, 2010 at 10:09 AM, Mikkel Eide Eriksen > wrote: >> >> Well I feel a little dumb now. After lots of debugging and digging at values >> that looked correct everywhere, checking object creating again & again, and >> what not, It turns

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

2010-12-01 Thread Kyle Sluder
On Wed, Dec 1, 2010 at 10:09 AM, Mikkel Eide Eriksen wrote: > > Well I feel a little dumb now. After lots of debugging and digging at values > that looked correct everywhere, checking object creating again & again, and > what not, It turns out I forgot to actually redraw the window: > > [[[self

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

2010-12-01 Thread Mikkel Eide Eriksen
Well I feel a little dumb now. After lots of debugging and digging at values that looked correct everywhere, checking object creating again & again, and what not, It turns out I forgot to actually redraw the window: [[[self loadingWindowController] window] display]; Everything worked all along

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

2010-11-30 Thread Mikkel Eide Eriksen
On Nov 30, 2010, at 5:34 PM, Quincey Morris wrote: > On Nov 29, 2010, at 21:36, Mikkel Eide Eriksen wrote: > >> I'm updating the objectCount property during readFromURL:ofType:error: - >> could that be it? > > No, that's a suitable method, but the question is whether it's running in the > main

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

2010-11-29 Thread Quincey Morris
On Nov 29, 2010, at 21:36, Mikkel Eide Eriksen wrote: > I'm updating the objectCount property during readFromURL:ofType:error: - > could that be it? No, that's a suitable method, but the question is whether it's running in the main thread or if the document initialization process got switched t

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

2010-11-29 Thread Mikkel Eide Eriksen
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:[[MyLoadin

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

2010-11-29 Thread Quincey Morris
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 addWindowContr

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

2010-11-29 Thread James Bucanek
Mikkel Eide Eriksen wrote (Monday, November 29, 2010 10:00 AM +0100): [[self loadingWindowController] setObjectCount:[[self loadingWindowController] objectCount]+1]; Still no go on the interface (I can tell via logs that controller.objectCount is incrementing

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

2010-11-29 Thread Mikkel Eide Eriksen
I just tried properly adding the loadingWindowController to NSDocument's windowControllers without any luck. Then I tried moving the @property objectCount to my loadingWindowController and updating it from NSDocument: [[self loadingWindowController] setObjectCount:[[self loadingWindowController]

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

2010-11-29 Thread Mikkel Eide Eriksen
I don't think I'm "replacing" the document per se. In my NSDocument init override, I do this (only relevant parts copied): if (![self loadingWindowController]) [self setLoadingWindowController:[[MyLoadingWindowController alloc] init]]; [[self loadingWindowController] setDocument:self];

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

2010-11-29 Thread James Bucanek
James Bucanek wrote (Monday, November 29, 2010 8:37 AM -0700): Basically, if I add an observer using the path "document.someProperty", KVO attaches the observer to the the someProperty object, not document. So if I change it (document.someProperty = newProperty)

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

2010-11-29 Thread James Bucanek
Mikkel Eide Eriksen wrote (Monday, November 29, 2010 6:00 AM +0100): When reading a file, my Document object tells LoadingWindowController to show its window & [loadingWindowController setDocument:self]; I'm not sure this is your problem (and I'm sure someone

bindings via file's owner don't update

2010-11-29 Thread Mikkel Eide Eriksen
Hi all, In a document-based app, I have the main Document xib & a "Loading" xib. The latter is shown while the program reads a file & closes after. When reading a file, my Document object tells LoadingWindowController to show its window & [loadingWindowController setDocument:self]; This is to