discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: porting from Cocoa help


From: Fred Kiefer
Subject: Re: porting from Cocoa help
Date: Sat, 11 Mar 2006 00:22:10 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050921

Hi Anurodh,

due to problems with our mailing lists your mail did only get through today.
Adrian and Saso already have answered most of your questions I try to
add to that.

Anurodh Pokharel wrote:
> 
> Well, it's been exactly since i last posted about porting a cocoa app. I
> tried again today an was actually able to compile everything in
> ProjectCenter with a few changes. The main change on my end was that apple got
> rid of the dock in mail.app so i got rid of it too. That made porting a
> lot easier. 
>  The app i am porting is OSXnews  ( http://osxnews.sf.net )
> 
> I have a few questions. 
> 1. does  NSAlert exist in gnustep? I had to comment out every instance
> to get it to compile

NSAlert is there in GNUstep, but it is not fully working. Currently
NSAlert uses the old code from GSAlertPanel to do its task, which wont
be enough for many important cases. Structuring the code the other way
(and extending it) wont be to hard a problem, but nobody is working on
it at the moment.
If you are lucky the current NSAlert implementation will work for youm,
otherwise state your problem and perhaps somebody will look into it.

> 2. I know that @try{} catch does not work in the version of gcc that
> ships with non Darwin systems. How do you guys get around it? I commented
> every instance, but that will limit the stability of the application

You have to answers to that already.

> 3. How do you give the application an icon? does it take icns files?
> 
GNUstep does not support icns files, but mySTEP a fork of GNUstep has
support for that format. If you really need it, we could try to bring
this over.

> 4.  NStoolbar uses @selector to specify the action, i had to comment out
> all of that too. How is this done in gnustep. 

As stated by the others @selector should work. Comparing selectors is
different between the Apple and the GNU runtime though.

> 5. i have the old style (non XML ) nib files. What should i use to
> convert them to gorm?

Using nib2gmodel on an Apple computer should work. You may also use the
Apple system to convert this nib file to the newer format and wait for
the keyed-coding stuff in GNUstep to show up on the main branch.

> 6. Webkit, where can i get a copy of the gnustep version. The app uses
> webkit to display newsgroup postings in a nice formatted way. I can live
> without it, but it would be nice to have simply to keep the source in
> the OSX and GS versions similar. 
> 
You have an answer for this.

> beyond that, the application now compiles (without the nib files, yay!
> late binding!)  on linux with gnustep and hopefully, we will have GSNews,
> a small fast NNTP newsreader for gnustep 
> ====
> Oh yeah, for anyone who might see this in the future via google gorups,
> to get round the missing  coca.h thing, make a folder called Cocoa in
> the project directory and create a file there called Cocoa.h with the
> following contents:
> 
> #import <Foundation/Foundation.h>
> #import <AppKit/AppKit.h>
> 
> typedef BOOL bool;
> 
> #define  true YES;
> #define false NO; 
> 
> 
> 
> this  makes Cocoa apps a lot easier to port to GNUStep since it requires
> no changes to the headers included and fixes the bool issue. 
> 
This header is already there in GNUstep. I added it almost two years
ago. What error messages did you get when trying to import that file?
Perhaps it does not get installed properly?

Cheers
Fred




reply via email to

[Prev in Thread] Current Thread [Next in Thread]