FROM : Tod Cunningham
DATE : Mon Nov 22 19:09:36 2004
You can send NSObject the message className:
[self className]
However, to see of an object is a particular class you should use:
if( [obj1 isKindOfClass:[SomeClass class]] )
for example:
if( [sender isKindOfClass:[NSPopUpButton class]] )
{
...
}
- Tod
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>
>
DATE : Mon Nov 22 19:09:36 2004
You can send NSObject the message className:
[self className]
However, to see of an object is a particular class you should use:
if( [obj1 isKindOfClass:[SomeClass class]] )
for example:
if( [sender isKindOfClass:[NSPopUpButton class]] )
{
...
}
- Tod
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 mails | Author | Date |
|---|---|---|
| alex | Nov 22, 18:42 | |
| Scott Stevenson | Nov 22, 19:02 | |
| Tod Cunningham | Nov 22, 19:09 | |
| Ricky Sharp | Nov 22, 19:09 | |
| Ricky Sharp | Nov 22, 19:13 | |
| Daniel DeCovnick | Nov 22, 19:13 | |
| John C. Randolph | Nov 22, 20:13 | |
| Sherm Pendley | Nov 22, 20:30 | |
| Shawn Erickson | Nov 22, 20:43 |






Cocoa mail archive

