• 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: Class name
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Class name


  • Subject: Re: Class name
  • From: Daniel DeCovnick <email@hidden>
  • Date: Mon, 22 Nov 2004 13:13:58 -0500

There's a couple of ways to do it, but in this case it seems like the easiest is to do

NSStringFromClass( [NSButton class] ); // In the Foundation functions - see Cocoa documentation.

However, unless you have a good reason for actually needing a string, this is a bad idea.

-Daniel DeCovnick
danhd123 AT mac DOT com
http://www.softyards.com

On Nov 22, 2004, at 12:42 PM, email@hidden wrote:

How can i get a name as a NSString of a Class Object?

ex:

Class	_someClass = (Class )NSButton;
NSString*	_className = [ _someClass ???? ];

thanks
Alex

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev 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. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Class name (From: email@hidden)

  • Prev by Date: Re: Class name
  • Next by Date: NSTextField binding problem
  • Previous by thread: Re: Class name
  • Next by thread: Re: Class name
  • Index(es):
    • Date
    • Thread