gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSSavePanel fragile ABI - do we care?


From: Fred Kiefer
Subject: Re: NSSavePanel fragile ABI - do we care?
Date: Sun, 11 Aug 2013 21:35:08 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7

On 11.08.2013 16:42, Luboš Doležel wrote:
> On 08/11/2013 03:03 PM, Fred Kiefer wrote:
>> At the current state of gui breaking the ABI is fine, we do it with
>> almost every release. The only thing we should think about is whether we
>> want to make a 0.23.2 release of gui before that.
>>
>> I can see what you need the _completionHandler ivar for, but what is the
>> purpose of the _modelessWindowController?
>>
>> One other way to implement this would be to extend the sheet code in
>> NSApplication. At the moment sheets are just modal windows.
>> One simple way would be to implement a sheet delegate class that just
>> executes the completion block. In the long run, the other way around,
>> implementing sheet delegates with completion blocks will be more
>> elegant, but for now this could do.
> 
> That is used to save a reference of an NSWindowController responsible
> for that modeless window until it's closed. See the attached patch.
> 
> RELEASE()ing it here would close the window immediately, and not keeping
> the reference somewhere would leak it.
> 
> If I'm missing something and it can be done differently, please let me know.

Thank you for sending the patch. But even with that I still don't see
the point of using an NSWindowsController here. Did you look at the code
for showWindow:? It is more or less just a simple call to orderFront:,
which could be used here directly. A panel that retains its own windows
controller looks wrong to me. Maybe the actual NSSavePanel should be
created by an NSWindowsController, but in that case, the controller
would retain the window, not the other way around.

And what do you think of my other suggestion, which of course will
require changes to the sheet code in NSApplication?






reply via email to

[Prev in Thread] Current Thread [Next in Thread]