• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
descriptions not called 100%
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: descriptions not called 100%
      • From: Allan Odgaard <email@hidden>
  • Prev by Date: Re: [little OT] Licensing/Implementing in Cocoa/Obj-C
  • Next by Date: delayed read-only bindings (suggestions/hints) ?
  • Previous by thread: Re: Grabbing key presses in NSTableView
  • Next by thread: Re: descriptions not called 100%
  • Index(es):
    • Date
    • Thread