discuss-gnustep
[Top][All Lists]
Advanced

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

Re: porting from Cocoa help


From: Adrian Robert
Subject: Re: porting from Cocoa help
Date: Fri, 10 Mar 2006 10:18:15 -0500


On Mar 5, 2006, at 12:38 AM, 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.

Hi,

The app sounds great.  I'll take a couple of the easy questions..

1. does  NSAlert exist in gnustep? I had to comment out every instance
to get it to compile2. 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

I haven't actually looked at ObjC try/catch, but the NS_DURING / NS_HANDLER construct provides similar functionality to try/catch in Java, used with the NSException class. (No 'finally' block though.) See

http://gnustep.org/resources/documentation/Developer/Base/ ProgrammingManual/manual_6.html#SEC80

Possibly you could do something with an #ifdef and some #defines in a header to use the same code in Cocoa and GNUstep..


3. How do you give the application an icon? does it take icns files?

If you are building with project center and you defined an "Application" project, there should be a way to set this through project properties. This gets placed inside the .app bundle when built. The long and short of it is you cannot use an icns, you use a fixed-resolution TIFF (perhaps other formats work, I'm not sure) set to something like 48x48.


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

I'm not sure what the problem is here, @selector works fine in gcc ObjC in my experience. Maybe post an example and the error msg?







reply via email to

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