[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
GDL2 on Mac OS X, stage two
From: |
Markus Hitter |
Subject: |
GDL2 on Mac OS X, stage two |
Date: |
Sat, 28 Dec 2002 21:05:54 +0100 |
Hi,
after some back and forth when trying to find a solution for writing an
Cocoa App to modify my little Database, I decided to give GDL2 a try on
OS X. Always better than reinventing it even in small parts.
Here's what I did:
- Got a copy of the official CVS Tree of GDL2
- Set up a Project with ProjectBuilder to build my App. OK, there are
only 10 lines at the moment ... Named "Buchhaltung".
- Imported the EOAdaptors, EOAccess and EOControl directories into this
project and set them up to build as a own framework each. Applied the
necessary tweaks for build dependencies etc. You should still be able
to do a CVS update in these three dirs.
- Fetched the GNUstep.h file for compatibility between GNUstep and
Cocoa, stored it in the project, too. This file needed additions as the
project evolved. No framework this time.
- Set up yet another framework from scratch and added a few
GNUstep-only extensions to NSObject, like -notImplemented or
-subclassResponsibility.
- Last not least I added four files from GNUstep-base to support the
GC* classes. Into an own framework, too.
- Looked into Apple's WebObjects Documentation and kludged together a
simple sample app (which is all I have for now. But it works!). Had to
translate it from Java to ObjC.
- Disabled all source files for all frameworks except the PostgreSQL
Adaptor. Then, added subsequently source files as needed to fill in the
linking failures.
- Heavily reviewed Header file inclusion. Added inclusions for the
compatibility header and for the NSObject extensions. Maybe it was
almost OK before I started editing but suddenly nothing was like it was
before ;-)
- Commented out some of the debugging code since it wouldn't even
compile.
- Resolved the "behaviour adding" issue of the GC* classes by copying
each method into each class. There is a protocol "GarbageCollecting"
now. This is simple and works for now. There were some other
suggestions but none of them looked like a better solution to me.
- As nobody could confirm the actual need of Garbage Collection (sample
code anybody?), I disabled all the GC stuff after half-fixing it. To be
ported in the future ... From what I've seen in the source, there is no
functional difference to the Autorelease stuff. Maybe I'm blind, maybe
I really need an example to understand it.
- Added the (disabled) GarbageCollecting protocol to a few EO classes,
too.
- Fixed code in a few places. Mostly where GNUstep extensions were used.
- Continued until the App compiled. To make it work, I had to review
the framework loading code (search path etc.). No surprise. Filled the
gap at -[EOAdaptorChannel describeTableNames].
Result: A Sample App with a built-in GDL2 framework. About 70% of the
GDL2 files are currently compiled in. No dependency of EOControl on
EOAccess for now, they are two separate frameworks. No need to install
anything, it's all in the App's bundle. You just need your own
PostgreSQL DB and ProjectBuilder.
If you want to confirm/look yourself/extract patches, look at
http://www.jump-ing.de/, then click "Projekte", then "GDL2" or directly
http://www.jump-ing.de/proj/files/Buchhaltung.tar.gz (Not sure wether
the latter works).
There's no binary since an App with hardcoded user names isn't that
useful, is it?
Have fun,
Markus
P.S.: The future? Get more in sync with the original sources. Any
suggestions on how to do that?
- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/
- GDL2 on Mac OS X, stage two,
Markus Hitter <=