libs-gui icon indicating copy to clipboard operation
libs-gui copied to clipboard

NSWindow implements NSCoding - it shouldn't.

Open gcasa opened this issue 2 years ago • 0 comments

The issue here is this. Currently GS' implementation of NSWindow and NSPanel implement NSCoding and they shouldn't. This class is decoding in nib and xib files using NSWindowTemplate (a proxy) and NSClassSwapper. This makes it possible to implement a few features in Cocoa (and OPENSTEP) that GS currently doesn't support:

  • Deferred windows/panels - this is not very important now as this was done to save memory on older systems.
  • Allow IB/Gorm to switch subclasses easily so that an NSPanel or NSWindow could be changed to the other without any issues

It will be necessary to remove this implementation (or at least to deprecate it's use in Gorm and in .gorm files) to fix this issue. Currently this isn't super high priority as there are acceptable work-arounds for the NSPanel<->NSWindow issue and the deferred functionality isn't critical as memory is no longer a sparse resource.

Please see...this bug on savannah regarding the issue. GC

gcasa avatar Jan 01 '23 01:01 gcasa