[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: NSWindowController should be a NSResponder
From: |
Wolfgang Lux |
Subject: |
Re: NSWindowController should be a NSResponder |
Date: |
Thu, 23 Oct 2008 19:24:25 +0200 |
David Ayers wrote:
The change is good and correct for trunk but what's more
interesting ist
that you probably have to consider NSCoding implication for non-keyed
un/archivers... this seems non trivial to fix.
Archiving, oh yes. Thanks for pointing out that I have overlooked
archiving. By chance, (un)archiving simply continued to work because
the current implementations of -initWithCoder: and -encodeWithCoder:
sloppily do not call their superclass implementations (-inithWithCoder:
uses -init instead). So, we loose the ability to archive the inherited
interfaceStyle and menu attributes of the window controller. When keyed
archiving is used this is trivially fixed by calling the super class
implementations. In order to get non-keyed archiving to work we'll have
to increase the class version number of NSWindowController and depending
on the version used during (un)archiving either call the super class
implementation or use the old implementation, i.e., effectively do
nothing. I have attached a patch below.
Apparently, Gorm must be changed as well to take care of writing
backward compatible archives for older gui versions. Someone out
there willing to implement that before I delve into Gorm's sources?
Wolfgang
wincontr2.patch
Description: Binary data