• 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: Obtaining class of key at runtime
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Obtaining class of key at runtime


  • Subject: Re: Obtaining class of key at runtime
  • From: Jens Alfke <email@hidden>
  • Date: Mon, 06 Oct 2014 09:38:11 -0700

> On Oct 6, 2014, at 7:43 AM, Devarshi Kulshreshtha <email@hidden> wrote:
>
> Scenario 1: Do not initialize instance variables in initWithPlist method
>
> In this case if I try to log class of key in setValue:forKey method,
> it prints nil

That doesn't make any sense — it's illegal to pass a nil key to setValue:ForKey:. Who is calling this method?

> Is there any way to achieve the same result in 'Scenario 1', may be by
> using any API from objective c runtime?

Again, who is supposed to be calling setValue:forKey: if your init method isn't calling it?
And why do you want to know the class of the key if it's clearly declared as NSString already? It's always going to be a string.

—Jens
_______________________________________________

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: Obtaining class of key at runtime
      • From: Devarshi Kulshreshtha <email@hidden>
References: 
 >Obtaining class of key at runtime (From: Devarshi Kulshreshtha <email@hidden>)

  • Prev by Date: Obtaining class of key at runtime
  • Next by Date: Re: Obtaining class of key at runtime
  • Previous by thread: Obtaining class of key at runtime
  • Next by thread: Re: Obtaining class of key at runtime
  • Index(es):
    • Date
    • Thread