• 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: ANE <email@hidden>
  • Date: Wed, 22 Apr 2009 16:39:15 +0200

If you have a class called Fraction, you can overwrite the - (NSString*)description method like this:

- (NSString *)description
{
return [NSString stringWithFormat:@"%i / %i" , [self numerator], [self denominator]];
}


Then NSLog(@"%@", FractionInstance); should work...


Am 22.04.2009 um 15:04 schrieb Sandy Santra:

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

-- Dr. Volker Thieme Rochlitzstraße 65 Leipzig 04229 Germany

volker.thieme_(at)_mac.com



_______________________________________________
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: How does Xcode preserve SCM meta-data?
  • Next by Date: Code Signing and Replacement Certificates?
  • Previous by thread: Re: Looking for NSLog help
  • Next by thread: Re: Looking for NSLog help
  • Index(es):
    • Date
    • Thread