Not sure whether your approach is the right way to solve the issue. To me it rather looks like the way we implement things in gui makes it hard for subclasses to do the right thing.

If I remember correctly that extra flag in NSWidnowController was only there to avoid loading the same failing NIB file twice. Not sure whether that mechanism works at all after the change Jonathan Gillaspie did two years ago. We could remove that flag and just check whether _window is set. Or combine both and first check for _window being non-null and next for the nib_is_loaded if we ever want to make the functional again.

Any comments?

Fred


On 18.04.2012 22:31, Philippe Roussel wrote:
I'm not sure Nicola is still around reading his email so I'm posting
this here.

-------- Message original --------
Sujet: Renaissance and document based applications bug
Date : Tue, 17 Apr 2012 22:44:15 +0200
De : Philippe Roussel<[email protected]>
Pour : Nicola Pero<[email protected]>

Hi Nicola,

I'm trying to build a small document based application using Renaissance
and I ran into some problems : the title of a document window is
supposed to be automagically set when opening from or saving to a file.

I tried to reproduce the problem with Renaissance's version of Ink and
ran into another problem that you should be able to reproduce : when
opening a file, the document title isn't changed (expected) and the
content of the file isn't displayed in the window.

Long story short, it appears that NSWindowController uses a private flag
nib_is_loaded to indicate if the window is loaded.
GSMarkupWindowController methods don't (and can't) set this flag so some
code paths are never run when using Renaissance.

I'm not sure the following patch is correct but Ink seems to work
correctly with it.

What do you think ?

Thanks,
Philippe


_______________________________________________
Gnustep-dev mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to