OS X app in plain C
github.com
OS X app in plain C
1–10 of 157 posts
Re: OS X app in plain C
#2Re: OS X app in plain C
#3It's amazing and sad for computing that somehow managing to use a sane language to develop software for a very commonly used platform is seen as a serious feat of accomplishment.
Re: OS X app in plain C
#4This happens with Qt apps on OS X, as well, and it drives me bonkers. If you launch from the command line you have to command tab away and back for the menu to work
Re: OS X app in plain C
#5The ability to use a high-level, dynamic language (ObjC), C, and even inline assembly in a single source file is unique to Objective-C (at least among the "mainstream" languages), and something I think is often under-appreciated.
One comment on the code here: for message calls returning type 'id' (object type), you don't need to cast the dispatch function. It would make the code much more readable. For other return types, you need a cast, but I'd wrap it in a macro. You could even use a C11 generic macro to handle floating point return values (unfortunately necessary).
Re: OS X app in plain C
#6Re: OS X app in plain C
#7Re: OS X app in plain C
#8I don't buy the "plain C" claim, given the gratuitous use of objc_msgSend().
Re: OS X app in plain C
#9I don't buy the "plain C" claim, given the gratuitous use of objc_msgSend().
Any alternate method of finding and calling those functions would amount to simply reimplementing objc_msgSend()
Re: OS X app in plain C
#10It's amazing and sad for computing that somehow managing to use a sane language to develop software for a very commonly used platform is seen as a serious feat of accomplishment.