Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2008-09

Small OSX GUI apps

7 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Jon

Hi

I use KOL (http://kolmck.net) with FPC on Win32 to produce small (exe size) gui applications.

I am a complete newbie to all things Mac and OSX.
Is there a similar framework available for OSX?
Lazarus looks very big and bloated for my needs.
Are any *simple* examples available for creating OSX gui apps? Also, what is the difference between Carbon, Cocoa, etc - and which is best?

Many thanks in advance,

Jon

Jonas Maebe
to Jon
Jon wrote 5 lines
I use KOL (http://kolmck.net) with FPC on Win32 to produce small (exe size) gui applications. I am a complete newbie to all things Mac and OSX. Is there a similar framework available for OSX?

Not that I'm aware of.

Are any *simple* examples available for creating OSX gui apps?

There's one here (using Carbon): http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/packages/univint/examples/

Also, what is the difference between Carbon, Cocoa, etc

Any answer to that which is not a 10 page article or so will by definition be overly simplistic. Carbon is a procedural framework offering a rich api for creating Mac programs, Cocoa an Objective-C based framework offering a rich api for creating Mac (and NeXTStep/ GNUStep) programs. They largely overlap in terms of offered functionality, and are partially implemented on top of one another (and hence, no strict delimiting is possible of what functionality exactly is Carbon and what exactly is Cocoa).

- and which is best?

Depends on who you ask. But Apple has made it clear that they want to move forward primarily with Cocoa.

Jonas

Jon
to Jonas Maebe: Not that I'm aware of. There's one here (using Carbon):…

Thank you for your replies Jonas

if you're coming from Win32 programming, you may want to read this: http://developer.apple.com/documentation/Porting/Conceptual/win32porting/win32porting.html

Interesting document. Do I have to install Interface Builder and XCode to use FPC?

> Are any *simple* examples available for creating OSX gui apps? There's one here (using Carbon): http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/packages/univint/examples/

Excellent, just what I was after. Are there any more, especially Cocoa?

> - and which is best? Depends on who you ask. But Apple has made it clear that they want to move forward primarily with Cocoa.

How good is the FPC for each? Is there a separate install for both?

Best regards,

Jon

Jonas Maebe
to Jon
Jon wrote 5 lines
> if you're coming from Win32 programming, you may want to read this: > http://developer.apple.com/documentation/Porting/Conceptual/win32porting/win32porting.html Interesting document. Do I have to install Interface Builder and XCode to use FPC?

You have to install the Xcode tools, which comes with Interface Builder, gcc, assembler, linker, headers, documentation, examples etc.

Show quoted text 7 lines
>> Are any *simple* examples available for creating OSX gui apps? > > There's one here (using Carbon): > http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/packages/univint/examples/ Excellent, just what I was after. Are there any more, especially Cocoa?

You can find quite a few at http://www.pascal-central.com/

> Depends on who you ask. But Apple has made it clear that they want to > move forward primarily with Cocoa. How good is the FPC for each? Is there a separate install for both?

There is only one install, but currently FPC only ships with interfaces to Carbon routines (and other APIs that have procedural interfaces). Some people are also working on an interface to Cocoa, see http://wiki.freepascal.org/PasCocoa

Jonas

Felipe Monteiro de Carvalho
to Jon: Thank you for your replies Jonas Interesting document. Do I have to install Interface…
Jon wrote
> Depends on who you ask. But Apple has made it clear that they want to > move forward primarily with Cocoa. How good is the FPC for each? Is there a separate install for both?

Carbon is stable. Cocoa support is experimental. It needs more people using it to test it and find problems / request that more classes be added. For the first users it won't be that easy, but they will clear the path for the next ones =) http://wiki.freepascal.org/PasCocoa

If you can read german, there is an article in the german toolbox magazine about PasCocoa and Cocoa development in general: http://www.toolbox-mag.de/

The first part is in the latest edition. The second part will come in the next (it's a large article).

You can use Lazarus as just an IDE. And write Free Pascal application in it which link directly to Carbon/Cocoa instead of using the Lazarus Component Library.

Felipe Monteiro de Carvalho
Ingemar Ragnemalm
Jon wrote 9 lines
Thank you for your replies Jonas > if you're coming from Win32 programming, you may want to read this: > http://developer.apple.com/documentation/Porting/Conceptual/win32porting/win32porting.html > Interesting document. Do I have to install Interface Builder and XCode to use FPC?

You need some GCC tools that are installed with Xcode. It is possible to make installers for those only, but it is easier to install Xcode and then trash any unneeded apps.

Show quoted text 8 lines
>> Are any *simple* examples available for creating OSX gui apps? >> > There's one here (using Carbon): > http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/packages/univint/examples/ > Excellent, just what I was after. Are there any more, especially Cocoa?

Not much with Cocoa yet, but there is a whole bunch of Carbon-using examples here:

http://www.ragnemalm.se/lightweight

Check out distributions with all demos.

Show quoted text 8 lines
>> - and which is best? >> > Depends on who you ask. But Apple has made it clear that they want to > move forward primarily with Cocoa. > How good is the FPC for each? Is there a separate install for both?

Currently (unless I have missed some significant breakthoughs) FPC support for Carbon is excellent while Cocoa is more experimental/preliminary. We will have to move to Cocoa GUIs simply because Apple won't provide anything else, but I have some ideas about making a nicer layer for hiding that. In particular, a cross-platform layer.

/Ingemar