• 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: BOOL parameter passed as nil object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BOOL parameter passed as nil object


  • Subject: Re: BOOL parameter passed as nil object
  • From: Quincey Morris <email@hidden>
  • Date: Fri, 22 Apr 2016 14:57:36 -0700
  • Feedback-id: 167118m:167118agrif8a:167118svv7-RW2Xn:SMTPCORP

On Apr 22, 2016, at 14:48 , Carl Hoefs <email@hidden> wrote:
>
>  does this mean that there is no inherent way to handle the 1000s of Foundation and AppKit method signatures which don't specify an object but a value parameter? There is no recommended way to have them performed on the main thread?

The recommended way to have them performed on the main thread is to use a block and GCD dispatch_async (dispatch_get_main_queue (), …).

The recommended way to use performSelector these days is, in effect, not to use it. There are situations where it doesn’t satisfy the ARC memory management safety guarantees. In almost all cases, the GCD+block solution is simpler and better.

If you must use performSelector, then you can write your own glue method that takes an object parameter and invokes the API that takes the scalar parameter.



_______________________________________________

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: BOOL parameter passed as nil object
      • From: Carl Hoefs <email@hidden>
    • Re: BOOL parameter passed as nil object
      • From: Carl Hoefs <email@hidden>
References: 
 >BOOL parameter passed as nil object (From: Carl Hoefs <email@hidden>)
 >Re: BOOL parameter passed as nil object (From: Alex Zavatone <email@hidden>)
 >Re: BOOL parameter passed as nil object (From: Jens Alfke <email@hidden>)
 >Re: BOOL parameter passed as nil object (From: Greg Parker <email@hidden>)
 >Re: BOOL parameter passed as nil object (From: Alex Zavatone <email@hidden>)
 >Re: BOOL parameter passed as nil object (From: John McCall <email@hidden>)
 >Re: BOOL parameter passed as nil object (From: Carl Hoefs <email@hidden>)

  • Prev by Date: Re: BOOL parameter passed as nil object
  • Next by Date: Re: BOOL parameter passed as nil object
  • Previous by thread: Re: BOOL parameter passed as nil object
  • Next by thread: Re: BOOL parameter passed as nil object
  • Index(es):
    • Date
    • Thread