[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with NSProcessInfo (?)
From: |
Nicola Pero |
Subject: |
Re: Problem with NSProcessInfo (?) |
Date: |
Tue, 20 May 2003 19:00:39 +0100 (BST) |
> > Does your +load method have any Objective-C code in it? Any
> > Objective-C code could trigger an +initialize call, which might
> > eventually lead to calling +[NSProcessInfo initialize] before the
> > internal veriables have been set up.
>
> I've played around a bit (using gcc32, no gcc33 here), if +load
> - is completely empty, it works
> - only has plain C code, it works
> - has any kind of ObjC code, even a simple NSLog(@"foo"), it fails.
Which seems correct. :-)
A "simple NSLog ()" is not that simple I guess. :-)
It's generally better to leave +load alone - it's useful in exceptional
cases such as NSProcessInfo, where there really is no other way of
executing code before main (). In those exceptional cases usually you're
struggling with low level issues anyway, and using C code is Ok.
- Problem with NSProcessInfo (?), Chris B. Vetter, 2003/05/19
- Re: Problem with NSProcessInfo (?), Richard Frith-Macdonald, 2003/05/20
- Message not available
- Re: Problem with NSProcessInfo (?), Chris B. Vetter, 2003/05/20
- Re: Problem with NSProcessInfo (?), Adam Fedor, 2003/05/20
- Re: Problem with NSProcessInfo (?), Chris B. Vetter, 2003/05/20
- Re: Problem with NSProcessInfo (?), Chris B. Vetter, 2003/05/20
- Re: Problem with NSProcessInfo (?), Nicola Pero, 2003/05/20
- Re: Problem with NSProcessInfo (?), Adam Fedor, 2003/05/26