On Nov 30, 2015, at 10:23 , Jerry Krinock <je...@ieee.org> wrote:
> 
> Did I miss the announcement of this rather major change?

I don’t think so, I think you are Doing It Wrong™. ;)

I’m not aware that the APIs you mention in 1 and 2 have any known contract 
about when they have their effect. It could be synchronous or asynchronous, and 
it could be now or later. 

1. Sending ‘display’ is likely a code smell anyway.

2. It’s always been true that the panel is still displayed during its 
completion handler. The correct approach has always been to retrieve the result 
URL(s) you want, then orderOut: the panel before doing something else in the 
completion handler, unless the block is so short it doesn’t matter. (The system 
dismisses the sheet after you return, if you haven’t done it already.)

But in both cases, what you’re really doing wrong is blocking the main thread. 
It’s never been a good idea, and OS X is becoming less and less tolerant of 
your doing that, especially now that there are easy ways to get around it. In 
both 1 and 2, you should be able to dispatch_async "some task of noticeable 
duration” on a background queue, which (at its end) dispatch_async’s anything 
it needs to do on the main thread with an internal dispatch_async to the main 
queue. It’s a bit ugly in Obj-C because your source code is at least 3 levels 
deep in horrible block syntax, but it’s perfectly straightforward, unless you 
have larger thread safety issues you don’t want to face.

I’m not sure that 3 has anything to do with windows or synchronicity. I think 
it’s more about changes in the way CALayers behave**. When I restart my elderly 
iMac 27”, I frequently see black Finder windows during the time that iTunes 
starting up seems to put a stranglehold on the system.

Regarding Richard’s 4, what’s changed about zooming is that the green button 
means something different now. Presumably that has side effects on the delegate 
method, because the window is probably trying to go full-screen — which is why 
the menu bar dimensions might be involved. (It may also be broken in 10.11, but 
I’m not surprised it’s different.)


** Or possibly places where CALayers are involved now, but they didn’t use to 
be.

_______________________________________________

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

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

Reply via email to