Small OSX GUI apps

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Small OSX GUI apps

Jon-159
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



_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Small OSX GUI apps

Jonas Maebe-2

On 15 Sep 2008, at 21:52, Jon wrote:

> 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
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Small OSX GUI apps

Jonas Maebe-2
In reply to this post by Jon-159

On 15 Sep 2008, at 21:52, Jon wrote:

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

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


Jonas
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Small OSX GUI apps

Jon-159
In reply to this post by Jonas Maebe-2
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



_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Small OSX GUI apps

Jonas Maebe-2

On 17 Sep 2008, at 01:58, Jon wrote:

>> 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.

>>> 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
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Small OSX GUI apps

Felipe Monteiro de Carvalho
In reply to this post by Jon-159
On Tue, Sep 16, 2008 at 9:58 PM, Jon <[hidden email]> 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
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Small OSX GUI apps

Ingemar Ragnemalm
In reply to this post by Jon-159
Jon <[hidden email]> wrote:

> 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.

>>> 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.

>>> - 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

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal