• 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
NSLog format
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSLog format


  • Subject: NSLog format
  • From: Denis Stanton <email@hidden>
  • Date: Sun, 2 Feb 2003 13:47:24 +1300

Hi

I'm stuck on a really basic piece of Obj-C syntax. Can you tell me how
to set up an NSLog message? I can find formal definitions that tell me
that I have to use stringWithFormat, but I can't find a single example
of a format for a string.
I have used one NSLog without a formatter that works and a very similar
one that doesn't

NSString *identifier = [tableColumn identifier];
NSLog( identifier );

This works. The identifier in this case is a "1". The NSLog message
writes out 1

NSString *myLabel = [(Block *)[blocks objectAtIndex: index]
lab];
NSLog( myLabel );

This does nothing. No line is produced. In Java I would write
System.out.println(" mylabel = " + myLabel)
How do I do the same in Obj-C?

Denis Stanton
email@hidden
Home: +64 9 533 0391
mobile: +64 21 1433622
_______________________________________________
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: NSLog format
      • From: "Steven M.Palm" <email@hidden>
    • Re: NSLog format
      • From: Alex Rice <email@hidden>
  • Prev by Date: Oddness with PB
  • Next by Date: Re: NSLog format
  • Previous by thread: Re: HI Guidelines: rounded text fields
  • Next by thread: Re: NSLog format
  • Index(es):
    • Date
    • Thread