• 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
Re: Looking for NSLog help
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Looking for NSLog help


  • Subject: Re: Looking for NSLog help
  • From: "Jeremy W. Sherman" <email@hidden>
  • Date: Wed, 22 Apr 2009 22:48:36 -0400

man 3 printf (x-man-page://3/printf) describes the format specifiers at length; K&R and the C standards documents also discuss them.

%@ works for any id or CFTypeRef, and inserts the result of -description or CFCopyDescription().

Never heard of a Fraction, but if you're talking about Fract, you'll want to use:

Fract f;
NSLog(@"My fraction: %g", Frac2X(f));

—Jeremy

On Wed, Apr 22, 2009 at 9:04 AM, Sandy Santra <email@hidden> wrote:
Very confused about Help in Xcode.  Need information on NSLog and can't find it.

So I'm offline.  I want to use some type of research/help tool in Xcode Help to find out what all the "switches" are for NSLog.  I know some of them: 

%d is for displaying an interger
%f is for displaying a float
%@ is for displaying a textString

But what I need is the switch for displaying the variable type Fraction.  (Maybe such a thing doesn't exist?)

Where can I find this in Help?

As far as Doc Sets go, I'm pretty sure I have:

Mac OS X Leopard Core Library
WebObjects Library
Xcode 3.1 Developer Tools Library
iPhone OS Library (although this one says "This Is a Partial Documentation Set")

But after running a search with all API options active (C++, Java, Obj-C), I see some information on NSLog in the document entitled "Assertions and Logging" and a few other documents, but still can't find a list of the "switches."  I found NSLog listed in the document Foundation Functions Reference, but no list of of the switches.

The following I guess I haven't subscribed to yet, and hence can't access while offline:

Apple iPhone OS
Apple iPhone OS 2.1
Apple iPhone OS 2.2
Apple iPhone OS 2.2.1

Is the information I'm looking for in one of these Document Sets?

I also seem to recall there's some keyboard/mouse shortcut in Xcode that you can invoke when hovering over or after selecting a function (or method?) that takes you right to the documentation for that particular item, but I can't remember it.

It occurs to me that maybe there ISN'T a switch for fractions, since I see this line in the example code I'm studying:

NSLog (@"%i/%i", numerator, denominator)

but nevertheless, I'd still like to see a list of the available switches.

Thanks for any information.


--Sandy Santra




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Looking for NSLog help (From: Sandy Santra <email@hidden>)

  • Prev by Date: Re: Xcode project setup for GLFW library reference problem.
  • Next by Date: Re: Can't change the Active SDK back to iphone 2.0 stuck on 3.0
  • Previous by thread: Re: Looking for NSLog help
  • Next by thread: Xcode project setup for GLFW library reference problem.
  • Index(es):
    • Date
    • Thread