Hi Ken, thanks for answering. > From what perspective?
From the perspective of the API, i.e. - after `close` returns, windowWillClose was already being called - after calling `miniaturize`, windowDidMiniaturize was already being called and isMiniaturized is guaranteed to return true. etc. From this pov., toggleFullscreen is clearly async, but miniaturize _seems_ to be blocking. But these are just my empirical tests, I was wondering if these methods are actually _specified_ as being blocking or there might be cases where they might be queued (i.e. window server is busy for instance). > All of the corresponding object and delegate methods having been called? Yes. > All programmatic tests (e.g. -[NSWindow makeKeyWindow] vs. -[NSApplication > keyWindow] and -[NSWindow isKeyWindow], which, by the way, mean different > things) reflecting the changed state? Yes. > Visible effects for the user? Nice-to-have, i.e. the API should not lie to the programmer, but I'm not interested in that right now. > As usual, the question arises: what are you trying to achieve? I'm trying to make a cross-platform API for manipulating windows[1], for which I need consistent behavior for the actions: show/hide/minimize/maximize/enter_fullscreen/exit_fullscreen -- I need to specify under what conditions these methods work and how they work, i.e. I need to answer questions like: "what happens when I call enter_fullscreen on a minimized window?". Because NSWindow behavior is under-specified[2], I need to resort to empirical tests, which is fine, but the question of sync vs. async operation is a bit harder to test for reliably, which is where I would appreciate some help. Now, why do I need to know sync vs. async for this? Because sometimes I need to call a sequence of two or three methods to achieve one behavior, and if some methods in the sequence are async, then that's not a (temporal) sequence anymore and I can't specify the order in which events are fired, or I might hit bugs or corner cases, etc. Long email, so thanks for the patience. [1] http://luapower.com/nw [2] https://github.com/luapower/nw/blob/master/nw_cocoa.lua -- notice how it's choke full of notes _______________________________________________ Cocoa-dev mailing list ([email protected]) 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 [email protected]
