PDA

View Full Version : Starting from scratch


tosh_2006
2006.05.28, 11:18 AM
Hi all, i' m new in macos devloment, so i need some help

I'm a c++ devloper on win32, and now i need to be cross platform complilent.
I want to start an application from scratch (best for learning), so i think (correct me if i'm wrong), i will use core fundation api.

The first probleme for me is to create a simple window, i can't find tutorial about that, exept with hi level api...


If somone can help me, or have links for this, it could be greate

Thanks in advance (and sorry me for my poor english)

Cheers

szymczyk
2006.05.28, 04:51 PM
Core Foundation does not deal with user interface elements. You will not be able to create a window in Core Foundation. Mac applications normally use Interface Builder nib files for windows. You create the window in Interface Builder and your program loads the window from the nib file when the program starts.

Because you are posting on this site, I will assume you want to write games. I recommend SDL (http://www.libsdl.org) for cross-platform game development. SDL handles things like creating windows and reading input from the player. If you visit the link in my signature, you can read my tutorial introducing SDL. Included with the tutorial is a simple program that creates a window.

Blacktiger
2006.05.28, 05:02 PM
If you want to create a native Mac OS X window you need to use either the Carbon or the Cocoa api. Basically Carbon is for C and Cocoa is for Objective-C, but that's not the only difference. If you want to make GUIs lightning fast and get a lot of features for free (spell checking for example) you should learn Cocoa. A couple of reads for you...

Objective-C Developers are Spoiled:
http://theocacao.com/document.page/227

Working with Carbon Windows:
http://developer.apple.com/documentation/Carbon/Conceptual/HandlingWindowsControls/

Working with Cocoa Windows:
http://developer.apple.com/documentation/Cocoa/Conceptual/WinPanel/