discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: empty document at Graphos startup


From: Wolfgang Lux
Subject: Re: empty document at Graphos startup
Date: Wed, 21 Dec 2011 11:08:47 +0100

Riccardo Mottola wrote:

> On Mac and Linux/Debian I now get consistently new, shiny, empty documents, 
> no double initializations.

Maybe nitpicking, but these were never double initializations. You were 
creating two distinct instances.

> On NetBSD not, I still get a document without view.
> 
> Somehow I managed however to break one important functionality this way: 
> Existing fiels do not get opened. On Linux I get no warning, but they don't 
> open. On mac I get a generic alert panel.

Yes. I guess it's because GRDocument -loadDataRepresentation:ofType: calls 
-createObjectsFromDictionary: on the docView attribute, but that attribute 
might be nil. The problem would be that the NSDocument framework loads the 
document's contents before creating the UI and hence the attribute has not been 
initialized. That would explain why you were creating a fresh GRDocView in 
-init. 

> 
>>> 3) I also get "Scanner initialised with nil string", I haven't debugged yet 
>>> where it is coming from.
> Does that happen for me only? I can't reproduce this on the mac. it may be 
> cause of the problem.

Set a breakpoint on NSScanner -initWithString: in gdb with condition aString = 
nil. It should tell you when this happens. I got this message myself but it 
vanished after I fixed my printer setup. So I'd expect this happens in some 
code that is called from -updatePrintInfo:.

Wolfgang




reply via email to

[Prev in Thread] Current Thread [Next in Thread]