• 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: Bridging (was Re: A CFStringRef that throws EXC_BAD_ACCESS)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bridging (was Re: A CFStringRef that throws EXC_BAD_ACCESS)


  • Subject: Re: Bridging (was Re: A CFStringRef that throws EXC_BAD_ACCESS)
  • From: Finlay Dobbie <email@hidden>
  • Date: Sun, 20 Oct 2002 10:25:28 +0100

On Sunday, October 20, 2002, at 02:19 am, Timothy Ritchey wrote:

So, the CFXMLNode you are given is already set up to be used as a full-fledged class in Objective-C, since the _isa pointer is the only thing needed to make a structure into an Obj-C class.

Okeydokey. That's out then. Poop.

CFXMLNode has all the fix'ns for bridging. You would have to create your own class definition that had the right instance variables to match the existing CF structure.

This is not how bridging is accomplished in CoreFoundation/Foundation, as far as I can see.

All the other CF classes have funky stuff all over them to cope with the bridging, like CF_OBJC_FUNCDISPATCH0 and CF_IS_OBJC. I still don't quite grok how all the bridging works, but it's definitely a scary beast. From a brief perusal of the CFURL sources it looks like, in some cases, there is a check for CF_IS_OBJC, and if there is, it creates a real CF copy of the URL and manipulates that, and in other cases, CF_OBJC_FUNCDISPATCH is used to call the equivalent obj-c method if it exists. In fact, it looks like in a lot of cases, there are *STILL* two implementations of methods: one on the obj-c object, and one in the CF function, with the CF function just calling the obj-c method if the object supplied is an obj-c object. Yuck.

-- Finlay
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Bridging
      • From: Timothy Ritchey <email@hidden>
    • Re: Bridging (was Re: A CFStringRef that throws EXC_BAD_ACCESS)
      • From: Simon Stapleton <email@hidden>
References: 
 >Re: Bridging (was Re: A CFStringRef that throws EXC_BAD_ACCESS) (From: Timothy Ritchey <email@hidden>)

  • Prev by Date: Re: Correctly entering AM/PM using NSDateFormatter
  • Next by Date: Re: NSTableView displaying a coordinate pair
  • Previous by thread: Re: Bridging (was Re: A CFStringRef that throws EXC_BAD_ACCESS)
  • Next by thread: Re: Bridging (was Re: A CFStringRef that throws EXC_BAD_ACCESS)
  • Index(es):
    • Date
    • Thread