Re: NSOpenPanel problem

2012-01-24 Thread Jan E. Schotsman
On Jan 23, 2012, at 11:15 PM, Ken Thomases wrote: 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. Thanks for your help.

Re: NSOpenPanel problem

2012-01-23 Thread Ken Thomases
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.

Re: NSOpenPanel problem

2012-01-23 Thread Jan E. Schotsman
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 setti

Re: NSOpenPanel problem

2012-01-23 Thread Ken Thomases
On Jan 23, 2012, at 9:16 AM, Jan E. Schotsman wrote: > On Jan 23, 2012, at 11:37 AM, Conrad Shultz wrote: > >>> if I try to pass on someString in a C struct (contextInfo) then the >>> compiler complains that ARC doesn't like object pointers in C structs. >>> I could serialize and unserialize the

Re: NSOpenPanel problem

2012-01-23 Thread Jan E. Schotsman
On Jan 23, 2012, at 11:37 AM, Conrad Shultz wrote: You *really* need to read the docs on blocks and GCD since they are the "modern" way of writing threaded code, implementing callbacks, etc. I'd start with the "Short Practical Guide to Blocks" - http://developer.apple.com/library/ios/#feat

Re: NSOpenPanel problem

2012-01-23 Thread Conrad Shultz
(Re-post on list.) On 1/23/12 1:41 AM, Jan E. Schotsman wrote: > That's great indeed, but I need the block to work with a method > parameter (an NSString object). Do I need to copy the NSString to an ivar? No, you just use it directly. As Ken mentioned, any variable you reference in a block is a

Re: NSOpenPanel problem

2012-01-23 Thread Jan E. Schotsman
On Jan 23, 2012, at 5:17 AM, Ken Thomases wrote: On Jan 22, 2012, at 1:24 PM, Jan E. Schotsman wrote: Suppose I want to display a modeless choose file dialog with the beginWithCompletionHandler method. How can I pass some context info to the handler? Blocks capture whatever local variable

Re: NSOpenPanel problem

2012-01-22 Thread Ken Thomases
On Jan 22, 2012, at 1:24 PM, Jan E. Schotsman wrote: > Suppose I want to display a modeless choose file dialog with the > beginWithCompletionHandler method. > How can I pass some context info to the handler? Blocks capture whatever local variables you reference within them. If you reference in

NSOpenPanel problem

2012-01-22 Thread Jan E. Schotsman
Hello, Suppose I want to display a modeless choose file dialog with the beginWithCompletionHandler method. How can I pass some context info to the handler? The beginForDirectory method has a contextInfo parameter but I want to use the newer method. TIA, Jan E. ___