Carbon...
I actually tried to build a carbon program today. It's been an experience. I'm a little unwilling to go down the objectionableC/cocoa route, since, well, I'm a C programmer at heart. But nearly all the carbon documentation assumes you'll be using the GUI Interface Builder and nib files. I don't want to do that (at least not yet), so it's an uphil struggle. Has really no-one done this? And I like emacs, so have inbuilt reluctance to go with Xcode, too.
When I learned gtk+, there were a few tutorials to follow, and that was enough to get me going.
Anyway, I managed the following short piece of code:
#include <Dialogs.h>
int main(void)
{
DialogRef theItem;
DialogItemIndex itemIndex;
CreateStandardAlert(kAlertStopAlert,
CFSTR("Here be titles..."),
CFSTR("Hello, world!"),
NULL,
&theItem);
RunStandardAlert (theItem, NULL, &itemIndex);
}
And managed to get it to build with:
gcc test.c -framework carbon -I /Developer/Headers/FlatCarbon -o test
...not much for a lot of work, is it? The button doesn't even work...
no subject
no subject
(Anonymous) 2005-03-17 04:39 pm (UTC)(link)(S)
no subject
no subject
However, the CFSTR's indicate that we're not in Kansas anymore. You might need to do something with CFRunLoop, or something like that.
no subject
(Anonymous) 2005-03-18 10:33 am (UTC)(link)no subject
no subject
(Anonymous) 2005-03-18 10:53 am (UTC)(link)I don't believe you know me or that i know you, but I believe we both know Abi. I'm a friend of her's at Cambridge.