On Thu, Dec 18, 2008 at 3:53 PM, Carter R. Harrison
<carterharri...@mac.com> wrote:
> Once again you have saved me from pulling my hair out.  Thank you once again
> for your assistance.  For the rest of the folks on the thread the solution
> was to remove the "&" from the front of all my pointers.

I'd suggest that your basic approach isn't really very good. For one
thing, it'll break on 64-bit (%x is an int, which is still 32-bit).
Even if you fix that, generating a string with a pointer value is a
pretty baroque way to do what you're doing.

If you can require 10.5, simply use NSMapTable. It works like an
NSDictionary but can take arbitrary (non-NSCopying) pointers as keys,
when properly configured.

If you must run on 10.4 or below, either use CFDictionary with
customized callbacks (and *don't* use the toll-free bridging support
if you do, TFB'd CFDictionaries will copy their keys even if you tell
them not to) or use [NSValue valueWithPointer:] to generate keys.

Mike
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to