• 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: CFRunLoopRef to NSRunLoop: how?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CFRunLoopRef to NSRunLoop: how?


  • Subject: Re: CFRunLoopRef to NSRunLoop: how?
  • From: Maxthon Chan <email@hidden>
  • Date: Sat, 22 Nov 2014 22:53:21 +0800

This library is designed to work with 3 implementations of Foundation with as few changes as possible: Apple’s Cocoa (No CFRunLoop-to-NSRunLoop conversion), Cocotron (built with CFLite, designed their NSRunLoop as toll-free bridged class) and GNUstep (CoreFoundation, optional and not installed by default, is built on top of Foundation)

> On Nov 22, 2014, at 14:52, Ken Thomases <email@hidden> wrote:
>
> On Nov 22, 2014, at 12:43 AM, ChanMaxthon <email@hidden> wrote:
>
>> Given that Apple's Foundation does not support getting NSRunLoop from CFRunLoopRef, Cocotron designed CFRunLoop using toll-free bridging from NSRunLoop and GNUstep have a NSRunLoopFromCFRunLoop() (and GNUstep have some some NSRunLoop extensions allowing implementing this mess without fussing with CF.) function in their CoreFoundation implementation, is it safe to pass whatever object I got from the underlying framework over to the upper layer, with proper warning in the documentation?
>
> It's not clear what you're asking.
>
> CFRunLoop and NSRunLoop are _not_ toll-free bridged.  If some code is written to expect an NSRunLoop, it is not safe to pass it a CFRunLoop.
>
> If the class's methods (designed to be overridden by subclasses) are written to take a CFRunLoop, all of your problems go away.  Why are you working so hard to avoid using CFRunLoop?
>
> Regards,
> Ken
>


_______________________________________________

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


References: 
 >CFRunLoopRef to NSRunLoop: how? (From: Maxthon Chan <email@hidden>)
 >Re: CFRunLoopRef to NSRunLoop: how? (From: ChanMaxthon <email@hidden>)
 >Re: CFRunLoopRef to NSRunLoop: how? (From: Ken Thomases <email@hidden>)

  • Prev by Date: Re: Binding a unique-selection checkbox in a table view?
  • Next by Date: Re: Swift Interface vs Implementation
  • Previous by thread: Re: CFRunLoopRef to NSRunLoop: how?
  • Next by thread: Still troubled by NSVisualEffectView
  • Index(es):
    • Date
    • Thread