• 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: initWithObject Confusion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: initWithObject Confusion


  • Subject: Re: initWithObject Confusion
  • From: John Nairn <email@hidden>
  • Date: Thu, 8 Apr 2010 16:03:04 -0700

On Apr 8, 2010, at 2:10 PM, Kyle Sluder wrote:

2. Even if it compiles, how can it run in Snow Leopard when there is no
initWithObject: selector for NSArray (or at least according to the NSArray
docmentation there isn't one)?

Have you checked your console output? Or there might be a private -initWithObject: method and you happened to get lucky.


Yes I did check console and that is how I finally solved the problem. On Leopard and Tiger it would correctly (IMHO) report something like

     [NSPlaceHolderArray initWithObject:] selector not recognized

and would then crash.

In Snow Leopard, however, there was no message and it worked fine as if Snow Leopard read my mind and realized I wanted to create an array with a single object. But, I am nervous about relying on the OS to read my mind (or even have an idea of how it did that)?

---------------
John Nairn (1-541-737-4265, FAX:1-541-737-3385)
Professor and Richardson Chair
Web Page: http://www.cof.orst.edu/cof/wse/faculty/Nairn/
FEA/MPM Web Page: http://oregonstate.edu/~nairnj




_______________________________________________

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: initWithObject Confusion
      • From: Nick Zitzmann <email@hidden>
References: 
 >initWithObject Confusion (From: John Nairn <email@hidden>)
 >Re: initWithObject Confusion (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: ATSApplicationFontsPath "just doesn't work" Was: Can I add my own chars...?
  • Next by Date: Re: ATSApplicationFontsPath "just doesn't work" Was: Can I add my own chars...?
  • Previous by thread: Re: initWithObject Confusion
  • Next by thread: Re: initWithObject Confusion
  • Index(es):
    • Date
    • Thread