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

BOOL parameter passed as nil object


  • Subject: BOOL parameter passed as nil object
  • From: Carl Hoefs <email@hidden>
  • Date: Mon, 18 Apr 2016 18:56:43 -0700

Suppose I have an object with a declared method signature:
  -(void)myMethod:(BOOL)a_bool;

Q1: If I invoke it like this:
  [self performSelector:@selector(myMethod:) withObject:nil];  // nil obj
Will argument a_bool end up with a 0 value assigned to it?

Q2: But if I invoke it like this:
  [self performSelector:@selector(myMethod:) withObject:someObj];  // valid obj
Will argument a_bool end up with a 1 value assigned to it?

-Carl


_______________________________________________

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: Greg Parker <email@hidden>
    • Re: BOOL parameter passed as nil object
      • From: Alex Zavatone <email@hidden>
    • Re: BOOL parameter passed as nil object
      • From: Sean McBride <email@hidden>
    • Re: BOOL parameter passed as nil object
      • From: M Pulis <email@hidden>
    • Re: BOOL parameter passed as nil object
      • From: Ken Thomases <email@hidden>
    • Re: BOOL parameter passed as nil object
      • From: Ryan Dignard <email@hidden>
  • Prev by Date: Re: Proper way to set up constants when building an iOS framework
  • Next by Date: Re: BOOL parameter passed as nil object
  • Previous by thread: Re: Using protocol extension to dismiss keyboard on outside tap
  • Next by thread: Re: BOOL parameter passed as nil object
  • Index(es):
    • Date
    • Thread