discuss-gnustep
[Top][All Lists]
Advanced

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

Re: has my bug report & fix been submitted (in NSProcessInfo.m)?


From: Lloyd Dupont
Subject: Re: has my bug report & fix been submitted (in NSProcessInfo.m)?
Date: Wed, 20 Jul 2005 09:01:55 +1000

I don't think this could possibly be the correct fix. This is just duct-taping a fix over something else which is obviously broken... Aren't + initialize methods only supposed to be called once?

so why is it that this test is done on Linux?
and why is it that NeXT documentation (last time I read them in.. uh.. 96?) stated to write your initialize method like that:
+ initialize
{
   static BOOL first = true;
   if(first)
   {
       first = false;
       // real init goes there...
   }
}

anyway if if it's "duct taping", it's absolutely not wrong, and it even solve a bug I had.

Now this method is called 3 times in my code, it maybe because I'm not using ObjectiveC at all (actuall my code is Managed C++, 100% un-compatible with ObjectiveC) and the runtime get confused (I'm just calling the IMPs, and initialized the runtime and classes as well as I could).


Just my two cents,
Andrew Ruder





reply via email to

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