[fpc-pascal] cocoa programming without objective-pascal mode

Jonas Maebe jonas.maebe at elis.ugent.be
Mon Nov 3 10:09:10 CET 2014

On 03/11/14 09:02, Bee wrote:
> If want to use a TObject, I want the
> exact same properties, exact same behavior, exact same declaration of
> TObject on everywhere else.

Then you are in luck, because that is exactly how it is today. (*)

> I don't care if beneath it acts as NSObject on OSX, or WinObject on
> Windows, or QTObject on QT, or whatever.

It will never act like any of those, beneath or otherwise.

As other people have said, use Lazarus if you want to abstract away the
APIs of GUI frameworks. If you want to directly program using Cocoa, Qt,
KDE, Win32, NativeNT or Metro, then you won't ever be able to directly
pass a TStringList to an API call in FPC on any platform.


> use RemObject's Oxygene

It doesn't do everything you summed up in your mail either, but it's
possible that it does offer transparent bridging in the specific case of
Objective-C classes (or at least for supported Cocoa classes) and e.g.
COM objects. I doubt you'll be able to directly pass Oxygene classes to
Qt API calls though.


(*) except on the JVM platform, where it is not technically possible to
declare your own class hierarchy.

More information about the fpc-pascal mailing list