On Sep 20, 2011, at 6:00 PM, douglas welton wrote:
I'm not sure that my solution is any less messy than what you have
suggested, but... when faced with this same situation, I gave the save panel
a different title each time it was invoked. When the panel object was passed
to my delegate, I
On 23/09/2011, at 5:20 AM, Seth Willits wrote:
On Sep 20, 2011, at 6:00 PM, douglas welton wrote:
I'm not sure that my solution is any less messy than what you have
suggested, but... when faced with this same situation, I gave the save panel
a different title each time it was invoked.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 9/22/11 3:34 PM, Graham Cox wrote:
On 23/09/2011, at 5:20 AM, Seth Willits wrote:
On Sep 20, 2011, at 6:00 PM, douglas welton wrote:
I'm not sure that my solution is any less messy than what
you have suggested, but... when faced with this
In my app I have two places where a NSSavePanel is used to set up different
sorts of file save. Using the modern 'block completion' approach, running the
panels as sheets, the code is very nice, self-contained and clean. The save
panel variable is a local var in the method that kicks off the
On Sep 20, 2011, at 4:15 PM, Graham Cox wrote:
In my app I have two places where a NSSavePanel is used to set up different
sorts of file save.
I think I'd use two different completion blocks...
--
Scott Ribe
scott_r...@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice
On 21/09/2011, at 8:27 AM, Scott Ribe wrote:
I think I'd use two different completion blocks...
I am already.
It doesn't solve the problem. It's not the completion blocks that need to
distinguish the panels (well, they do, and they do…), it's the panel's delegate.
--Graham
On Tue, Sep 20, 2011 at 3:15 PM, Graham Cox graham@bigpond.com wrote:
I could of course assign the save panels to an ivar of the delegate so that
it can perform a comparison, but that strikes me as pretty messy, given that
otherwise the panels are very neatly encapsulated along with their
OK, I've done it this way and it seems to be quite a nice solution - thanks!
In terms of memory management, I'm releasing the helper object (panel delegate)
in the completion block. While that apparently works without a problem, I'm
wondering if that's truly safe and reliable - I'm still fairly
I guess I didn't understand the original problem. I thought the id of the save
panel wasn't useful because it's local variable. It sounded like it's not so
much the save panel you want to distinguish, but the context in which the save
panel is being used. I was going to suggest making
Graham,
I'm not sure that my solution is any less messy than what you have suggested,
but... when faced with this same situation, I gave the save panel a different
title each time it was invoked. When the panel object was passed to my
delegate, I could tell where the panel was being used by
On Sep 20, 2011, at 4:43 PM, Graham Cox wrote:
I am already.
It doesn't solve the problem. It's not the completion blocks that need to
distinguish the panels (well, they do, and they do…), it's the panel's
delegate.
Ah, I was thinking that the completion blocks were calling into the
On 21/09/2011, at 8:54 AM, Scott Ribe wrote:
Ah, I was thinking that the completion blocks were calling into the delegate,
and that you needed to distinguish between panels there. So you're trying to
distinguish earlier?
Yes, specifically, in the delegate method:
panel:validateURL:error:
12 matches
Mail list logo