• 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: NSArray's objectAtIndex compiles to objectAtIndexedSubscript?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSArray's objectAtIndex compiles to objectAtIndexedSubscript?


  • Subject: Re: NSArray's objectAtIndex compiles to objectAtIndexedSubscript?
  • From: Ken Thomases <email@hidden>
  • Date: Sun, 09 Mar 2014 07:31:48 -0500

On Mar 9, 2014, at 7:21 AM, Bill Cheeseman wrote:

>    NSArray *versionComponentStrings = [versionString componentsSeparatedByString:@"."];
> 	static unsigned long sBCDSystemVersion = 0;
>    SInt32 majorVersion = ([versionComponentStrings count] >= 1) ? [versionComponentStrings[0] intValue] : 0;
>    SInt32 minorVersion = ([versionComponentStrings count] >= 2) ? [versionComponentStrings[1] intValue] : 0;
>    SInt32 bugFixVersion = ([versionComponentStrings count] >= 3) ? [versionComponentStrings[2] intValue] : 0;

The above three lines use the new-style array subscripting syntax (e.g. versionComponentStrings[0]).  That's the source of the crash, since that support is not available in your deployment target.

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


  • Follow-Ups:
    • Re: NSArray's objectAtIndex compiles to objectAtIndexedSubscript?
      • From: Bill Cheeseman <email@hidden>
References: 
 >Re: NSArray's objectAtIndex compiles to objectAtIndexedSubscript? (From: Bill Cheeseman <email@hidden>)

  • Prev by Date: Re: NSArray's objectAtIndex compiles to objectAtIndexedSubscript?
  • Next by Date: Re: NSArray's objectAtIndex compiles to objectAtIndexedSubscript? SOLVED
  • Previous by thread: Re: NSArray's objectAtIndex compiles to objectAtIndexedSubscript?
  • Next by thread: Re: NSArray's objectAtIndex compiles to objectAtIndexedSubscript?
  • Index(es):
    • Date
    • Thread