• 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
Key value binding to "class" of object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Key value binding to "class" of object


  • Subject: Key value binding to "class" of object
  • From: Daniel Jalkut <email@hidden>
  • Date: Thu, 27 Apr 2006 13:38:49 -0400


In an application I'm working on, it is very useful for me to bind to the class object of a given instance object. I thought I could use a binding with a keypath like:


myObject.class

But this generates a runtime error complaining that the object is not key-value compliant for the key 'class'.

I worked around the problem by defining my own method "objectClass" that simply returns [self class].

Is there some reason why it's a bad idea for the object's class to be exposed as a keyed value, or is this just an oversight?

Thanks for the hints,
Daniel

_______________________________________________
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


  • Follow-Ups:
    • Re: Key value binding to "class" of object
      • From: Bill Bumgarner <email@hidden>
  • Prev by Date: Re: Recursive functions and stack overload
  • Next by Date: Re: NSTableView app design
  • Previous by thread: Re: NSTableView app design
  • Next by thread: Re: Key value binding to "class" of object
  • Index(es):
    • Date
    • Thread