Re: Which NSWindow methods have asynchronous operation?

2014-08-24 Thread Cosmin Apreutesei
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

Which NSWindow methods have asynchronous operation?

2014-08-23 Thread Cosmin Apreutesei
I was wondering if anyone knows which of the various NSWindow methods have asynchronous operation and which are blocking, with their effects guaranteed after the call? I'm interested in these in particular: orderFront -- ? orderOut-- ? makeKeyWindow -- a

Re: buggy sequence: miniaturize/close/makeKeyAndOrderFront

2014-08-23 Thread Cosmin Apreutesei
> I encountered this same issue. Making the window a one-shot window > (window.oneShot = YES) works around it. Hi Ken, Thank you very much, that worked! I also posted this question on so[1] if you want to answer it there too. Thanks again, Cosmin. [1] http://stackoverflow.com/questions/2545

buggy sequence: miniaturize/close/makeKeyAndOrderFront

2014-08-22 Thread Cosmin Apreutesei
Hi, I noticed that the sequence: setReleasedWhenClosed(false) miniaturize close makeKeyAndOrderFront results in a visible window for which _hovering_ on the standard titlebar butons doesn't work (clicking on the buttons and moving/resizing the window does work). The problem is the minia

Re: [NSDictionary objectForKey] crash on x64

2014-07-11 Thread Cosmin Apreutesei
Hi Bavarious, Thanks a lot for the links and explanation. That was very helpful. ___ 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)l

[NSDictionary objectForKey] crash on x64

2014-07-11 Thread Cosmin Apreutesei
Hi, I have a strange problem. I am using C and the objc runtime on OSX 10.9.3 to get a value from a NSDictionary. The objectForKey method returns an invalid pointer on x64 (not NULL, but the same address 0x937 for _any_ valid key), but works fine on i386. I attached a small test case to show th

Re: title bar hit test?

2014-06-15 Thread Cosmin Apreutesei
> I have edge snapping too. Try: > > windowWillResize:toSize: > Return Value > A custom size to which the specified window will be resized. > > It's called before every size change, including during live resizing. Thanks, that's good for resizing. There's still a problem with the moving. _

Re: title bar hit test?

2014-06-15 Thread Cosmin Apreutesei
> Can I ask why you’re trying to do this? This sounds like something that’s so > unusual to do that I suspect you’re trying to use an overly complicated > approach to achieve something that is really simple in Cocoa. And what > exactly do you mean by “synchronous window moving event”? I want t

title bar hit test?

2014-06-14 Thread Cosmin Apreutesei
Hi, How can I hit-test the title bar rectangle without the resizing corners and edges? (I need this so I can implement synchronous window moving events). Thanks. PS: Empirically, the edges are 3px wide on OSX 10.9 and the corners are 4px, but I'd rather not hardcode these. _