• 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: [NSPointerArray copy] problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [NSPointerArray copy] problem


  • Subject: Re: [NSPointerArray copy] problem
  • From: Graham Cox <email@hidden>
  • Date: Sat, 08 Feb 2014 11:17:25 +1100

Darn.

What about -allObjects? Is that OK on <10.7? I don't care about any NULLs, so that should give me a functional copy.

--Graham



On 8 Feb 2014, at 9:45 am, Greg Parker <email@hidden> wrote:

> On Feb 7, 2014, at 4:26 AM, Graham Cox <email@hidden> wrote:
>> I'm using NSPointerArray to hold a list of weak references.
>>
>> In one case, I need to enumerate these in a mutation-safe way, so I make a copy of the pointer array before iterating it. That works fine on 10.7 and later, but on 10.6.x, I get a runtime exception that [NSConcretePointerArray copyWithZone:] is abstract*. NSPointerArray documentation says that it supports NSCopying and is available from 10.5 and later. Was -copy not properly implemented until 10.7? How can I workaround this?
>
> -[NSPointerArray copyWithZone:] was not implemented until 10.7. The alternative is to duplicate the contents of the array manually.
>
>
> --
> Greg Parker     email@hidden     Runtime Wrangler
>
>


_______________________________________________

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: 
 >[NSPointerArray copy] problem (From: Graham Cox <email@hidden>)
 >Re: [NSPointerArray copy] problem (From: Greg Parker <email@hidden>)

  • Prev by Date: Re: NSToolbar delegate -toolbarAllowedItemIdentifiers:
  • Next by Date: Can I Hide / Show an NSTextField / NSSecureTextField in Cocoa?
  • Previous by thread: Re: [NSPointerArray copy] problem
  • Next by thread: NSToolbar delegate -toolbarAllowedItemIdentifiers not getting called, other delegate methods are
  • Index(es):
    • Date
    • Thread