[Top][All Lists]

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

Re: empty document at Graphos startup

From: Riccardo Mottola
Subject: Re: empty document at Graphos startup
Date: Wed, 21 Dec 2011 10:41:41 +0100
User-agent: Mozilla/5.0 (X11; NetBSD i386; rv:8.0) Gecko/20111219 Thunderbird/8.0

Hi Wolfgang,

Of course it gets called twice. Once for the GRDocView that you create in GRDocument's -init method and once for the GRDocView that is unarchived from the .gorm file. Since you don't create a window in the -init method, I think it is pointless to create a GRDocView there. You really should use the document view that is present in the gorm file (by linking it to the docView attribute of the document in Gorm). BTW, I've noticed this bogus code in the -init method: [super init]; if (self) This should read self = [super init]; if (self) or more compactly if ((self = [super init]) != nil)

I fixed the initializer and also leave all the initialization code in the interface file, the current code was unreliable on Mac too.

On Mac and Linux/Debian I now get consistently new, shiny, empty documents, no double initializations.
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.

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.


reply via email to

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