|
From: | Adam Fedor |
Subject: | Re: Problem with NSProcessInfo (?) |
Date: | Mon, 26 May 2003 20:46:11 -0600 |
User-agent: | Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.1) Gecko/20020905 |
Chris B. Vetter wrote:
On Tue, 20 May 2003 11:56:49 -0600 Adam Fedor <fedor@doc.com> wrote:Yes. That's exactly what I would expect. +load methods should not have any ObjC code in them.Before you flame me for my previous post, I'm aware that NSLog involves a couple of objects and messages ... I meant that as a "I'm not doing anything fancy regarding objects right now". If, as you say, that +load should not have ObjC code in them, then we have a serious problem porting Apple/Cocoa code to GNUstep. Take a look at some of Apple's Cocoa examples. There's a couple of examples that do just what I was trying to do -- create a subclass and use +load to have it +poseAs: super ... *bummer*
I just tried a simple program, and I don't have any problems with NSLog. This may be due to the fact that there are several methods for NSProcessInfo to get the environment setup. On Linux, for instance, this happens in NSProcessInfo's +load method, so more than likely it gets called soon enough that it doesn't cause any problems.
On other systems, it can happen in the main method (which is usually soon enough, but does occur after all +load methods are called).
Apple, of course, doesn't have this problem because they can hack their compiler to provide the correct stuff to the program.
I don't know why it would have changed in your case. A gdb backtrace would help see why.
[Prev in Thread] | Current Thread | [Next in Thread] |