• 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: Namespace clash problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Namespace clash problem


  • Subject: Re: Namespace clash problem
  • From: Kyle Sluder <email@hidden>
  • Date: Thu, 13 Oct 2011 18:51:37 -0700

On Thu, Oct 13, 2011 at 6:32 PM, Graham Cox <email@hidden> wrote:
> The object in question is actually a class, where it has a class method +style. But the class is passed as the 'object' parameter of a notification, which has type id. How do I typecast that to the precise class type I'm expecting? Using (MyClass*) doesn't work because that is an instance. It's probably obvious, but I'm not stumbling upon it...

Cast it to Class. There's no way to specify "the type of an instance
of the metaclass MyClass."

--Kyle Sluder
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Namespace clash problem
      • From: Graham Cox <email@hidden>
References: 
 >Namespace clash problem (From: Graham Cox <email@hidden>)
 >Re: Namespace clash problem (From: Jens Alfke <email@hidden>)
 >Re: Namespace clash problem (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: Namespace clash problem
  • Next by Date: Re: Namespace clash problem
  • Previous by thread: Re: Namespace clash problem
  • Next by thread: Re: Namespace clash problem
  • Index(es):
    • Date
    • Thread