descriptions not called 100%
descriptions not called 100%
- Subject: descriptions not called 100%
- From: Nicolas Berloquin <email@hidden>
- Date: Wed, 21 Apr 2004 11:34:53 +0200
Hello !
I have a few classes (derived directly from NSObject) for which I wrote
description methods
that return specific infos.
I'm observing some real strange behavior with those, which is that some
times my instances'
description seems not to be called, ie I see the standard (NSObject's)
description and not mine.
here's how I defined my description method (I tried two solutions) :
return [NSString stringWithFormat: @"<%@ <%@:%u>>", [super
description], IP, remotePort];
then
return [NSString stringWithFormat: @"<NBPeer 0x%lX <%@:%u>>", self,
IP, remotePort];
IP is an NSString and remotePort is UInt32.
and I call, from inside the instance itself, or from another object:
NSLog(@"bla bla bla %@", self);
or
NSLog(@"bla bla bla %@", myPeer); // (where myPeer is something like:
NBPeer *myPeer);
strange isn't it ?
What is really weird is that it sometimes shows my description, and
sometimes not, like :
2004-04-21 11:32:55.375 coolap[1472] bla bla bla <NBPeer: 0x62bf6a0>
//NOT working
2004-04-21 11:32:55.375 coolap[1472] bla bla bla <<NBPeer: 0x62bf6a0>
100.100.100.100:43212> //working
wth ???
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.