• 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: Inserting a custom class into class hierarchy?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inserting a custom class into class hierarchy?


  • Subject: Re: Inserting a custom class into class hierarchy?
  • From: Shaun Wexler <email@hidden>
  • Date: Sat, 4 Dec 2004 05:12:34 -0800

On Dec 4, 2004, at 4:53 AM, The Karl Adam wrote:

hmm, according to the docs you are correct, the subclass cannot add
any instance variables, so you'd have to use the poseAsClass in
addition to the CustomIvarStruct or an NSHashMap, but however you
handle your added instance data, it iwould have to be external to the
MyObject class.

Well guys, I just made a test project and confirmed that this "hack" definitely works as I imagined! I'm now in the process of writing a custom CFAllocator. Posing as NSObject or NSResponder crashed, but all other non-toll-free-bridged objects seem to function normally... and are noticeably faster, because I incorporated an inline refcount. ;;))
--
Shaun Wexler
MacFOH
http://www.macfoh.com


_______________________________________________
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


References: 
 >Re: Inserting a custom class into class hierarchy? (From: Shaun Wexler <email@hidden>)
 >Re: Inserting a custom class into class hierarchy? (From: The Karl Adam <email@hidden>)
 >Re: Inserting a custom class into class hierarchy? (From: The Karl Adam <email@hidden>)

  • Prev by Date: Re: Inserting a custom class into class hierarchy?
  • Next by Date: Re: Legality of using Apple resources / icons?
  • Previous by thread: Re: Inserting a custom class into class hierarchy?
  • Next by thread: Re: Inserting a custom class into class hierarchy?
  • Index(es):
    • Date
    • Thread