Re: NSLog format
Re: NSLog format
- Subject: Re: NSLog format
- From: Alex Rice <email@hidden>
- Date: Sat, 1 Feb 2003 18:04:39 -0700
On Saturday, February 1, 2003, at 05:47 PM, Denis Stanton wrote:
NSString *myLabel = [(Block *)[blocks objectAtIndex: index]
lab];
NSLog( myLabel );
This does nothing. No line is produced.
If I remember correctly, Java will cast anything to a string for you.
Objective-C behaves a little differently. I've gotten into the habit of
doing this:
NSLog(@"blah blah = %@", someObj);
What happens with this syntax is while formatting the NSString, it will
call [someObj description] and put that into the message in place of %@.
Alex Rice <email@hidden> | Mindlube Software |
http://mindlube.com
what a waste of thumbs that are opposable
to make machines that are disposable -Ani DiFranco
_______________________________________________
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.
References: | |
| >NSLog format (From: Denis Stanton <email@hidden>) |