uliwitness / AppKitForClassic

Toy project that re-implements bits of AppKit for classic MacOS 9 on 680x0 (and emulated on PowerPC) using Metrowerks CodeWarrior Pro 6's MWObjC Objective-C compiler.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nib or xib file support?

programmingkidx opened this issue · comments

Thank you very much for starting this port of AppKit for the classic Mac OS. This is something the open source community should have done years ago.

I was wondering if nib and xib file support is planned?

Sadly, I haven't figured out how to implement NSClassFromString() for the Metrowerks compiler, so instantiating classes based on a class name in a XIB file is impossible without extra code that populates a string -> class lookup table. There's also no NIB/XIB editor for classic MacOS, and no built-in XML parser. So if I look more into UI serialization, I'd likely rather write code that takes DLOG/DITL resources that you can edit using ResEdit and uses those to create NSWindow and NSView instances from it.

Using DLOG/DITL to create NSWindows is a very interesting idea 👍.

There is a project that implements OpenStep called GNUStep: https://gnustep.github.io
I wonder now if it could be ported to Mac OS 9. It does come with an Interface Builder-like program called GORM.

GORM would need an AppKit to run on top of on MacOS 9. Would probably still require the XML parser too. GNUstep itself assumes it's running on a Linux, so I doubt much of it would be left to port over. They also probably expect a much more modern Objective-C compiler than what CodeWarrior has, and a fully functioning ObjC runtime.

So I think this project is likely the closest you'll get, unless you want to port clang to MacOS 9.