gnustep / libs-gui

The GNUstep gui library is a library of graphical user interface classes written completely in the Objective-C language; the classes are based upon Apple's Cocoa framework (which came from the OpenStep specification). *** Larger patches require copyright assignment to FSF. please file bugs here. ***
http://www.gnustep.org
GNU General Public License v3.0
279 stars 103 forks source link

NSView is missing a dummy implementation of awakeFromNib #194

Closed gcasa closed 1 year ago

gcasa commented 1 year ago

On Cocoa/MacOS there is apparently a dummy implementation of awakeFromNib. When we load a custom view that calls [super awakeFromNib] in GS we get...

** Build Succeeded
[heron@mother NSView_subclass_awakeFromNib_test] % ./build/NSView_subclass_awakeFromNib_test/Products/NSView_subclass_awakeFromNib_test.app/NSView_subclass_awakeFromNib_test
2023-08-31 15:41:41.401 NSView_subclass_awakeFromNib_test[222229:222229] Exception occurred while loading model: MyView(instance) does not recognize awakeFromNib
2023-08-31 15:41:41.402 NSView_subclass_awakeFromNib_test[222229:222229] Failed to load Xib
2023-08-31 15:41:41.402 NSView_subclass_awakeFromNib_test[222229:222229] Cannot load the main model file 'MainMenu'

On macOS this DOES NOT HAPPEN. I am going to add an awakeFromNib method in NSView that does nothing.

gcasa commented 1 year ago

https://github.com/gcasa/NSView_subclass_awakeFromNib_test