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: Riccardo Mottola
Subject: Re: empty document at Graphos startup
Date: Thu, 22 Dec 2011 12:35:35 +0100
User-agent: Mozilla/5.0 (X11; NetBSD i386; rv:8.0) Gecko/20111219 Thunderbird/8.0

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

I fixed the initialization of the document view. it works now like a charme on Mac, where Graphos prints perfectly, and on Linux too: opening is reimplemented and the code is just cleaner.

On NetBSD I still get an empty document. i checked better (right now GDB is somehow not working with gnustep apps tehre, si I did some NSLog debugging).

The NSPrintinfo information is bogus, I get this:

invalid margin / paper size information. 36.000000 36.000000 0.000000 0.000000

that is, I get two margins (36) but height and width of the page are zero.
The returned print information however is not nil, thus some of the sanity checks were failing for me. I'll insert more checks, but I guess printing shouldn't return such stupid stuff, either a nil object or a usable page, right?

Riccardo



reply via email to

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