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

Re: NSOpenPanel problem


  • Subject: Re: NSOpenPanel problem
  • From: Ken Thomases <email@hidden>
  • Date: Mon, 23 Jan 2012 14:45:56 -0600

On Jan 23, 2012, at 12:22 PM, Jan E. Schotsman wrote:

> On Jan 23, 2012, at 5:08 PM, Ken Thomases wrote:
>
>> If you're supporting Leopard, then you can't use ARC and the original problem goes away.
>
> ??? I have set development target = 10.7 SDK,  deployment target = 10.5 and ARC is on.
> The compiler doesn't complain. I have clicked the "validate settings" button and no problems are reported. Latest Mac OS, latest Xcode.

I don't know about complaints from the compiler, but I'm certain that ARC can't be used with code deployed to Leopard.  ARC requires support from the runtime libraries and that support was never released for Leopard.

For example, the Transitioning to ARC Release Notes say, "ARC is supported in Xcode 4.2 for Mac OS X v10.6 and v10.7 (64-bit applications)".
http://developer.apple.com/library/mac/#releasenotes/ObjectiveC/RN-TransitioningToARC/_index.html


>> Also, serializing a string doesn't help because you still have a Cocoa object -- an NSData now instead of an NSString -- and you have to manage its memory just the same.
>
> That's what [data getBytes:length:] is for.

I can't imagine that allocating a heap buffer for a serialized string is the best way to get data into the handler.  If you are using ARC (which I believe you can't), then try CFBridgingRetain() balanced later with a CFRelease() or CFBridgingRelease().

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


References: 
 >NSOpenPanel problem (From: "Jan E. Schotsman" <email@hidden>)
 >Re: NSOpenPanel problem (From: Ken Thomases <email@hidden>)
 >Re: NSOpenPanel problem (From: "Jan E. Schotsman" <email@hidden>)
 >Re: NSOpenPanel problem (From: Conrad Shultz <email@hidden>)
 >Re: NSOpenPanel problem (From: "Jan E. Schotsman" <email@hidden>)
 >Re: NSOpenPanel problem (From: Ken Thomases <email@hidden>)
 >Re: NSOpenPanel problem (From: "Jan E. Schotsman" <email@hidden>)

  • Prev by Date: vForce Performance
  • Next by Date: Re: What causes a UITableViewCell to be deallocated?
  • Previous by thread: Re: NSOpenPanel problem
  • Next by thread: Re: NSOpenPanel problem
  • Index(es):
    • Date
    • Thread