Skip navigation.
 
mlRe: Class name
FROM : Daniel DeCovnick
DATE : Mon Nov 22 19:13:58 2004

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_removed> 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_removed>)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/<email_removed>
>
> This email sent to <email_removed>

Related mailsAuthorDate
mlClass name alex Nov 22, 18:42
mlRe: Class name Scott Stevenson Nov 22, 19:02
mlRe: Class name Tod Cunningham Nov 22, 19:09
mlRe: Class name Ricky Sharp Nov 22, 19:09
mlRe: Class name Ricky Sharp Nov 22, 19:13
mlRe: Class name Daniel DeCovnick Nov 22, 19:13
mlRe: Class name John C. Randolph Nov 22, 20:13
mlRe: Class name Sherm Pendley Nov 22, 20:30
mlRe: Class name Shawn Erickson Nov 22, 20:43