Alright! I've got to ask it now! Err.
I've been trying to implement in house drag and drop so I can mimic some behavior found in IB (resizing, snapping etc).
This is how i've done it so far.
When a user clicks on an image in the main window, another window appears ( the drag window ). An image is drawn in the window to mimic the image in the main window.
When the user now drags the drag window "should" now be key and receive mouse events. But it isn't. I have to click again to so it can receive mouseDragged events.
The window appears as it should using [window makeKeyAndOrderFront]; but because it wasn't the window receiving the mouseDown event, it isn't receiving mouseDragged. I've tried [window sendEvent
revMouseDownEvent].
Is this possible? "while a mouse event is directed at whatever window lies under the pointer" - Apple Docs
So... It should work in theory according to the docs.
I've been trying to implement in house drag and drop so I can mimic some behavior found in IB (resizing, snapping etc).
This is how i've done it so far.
When a user clicks on an image in the main window, another window appears ( the drag window ). An image is drawn in the window to mimic the image in the main window.
When the user now drags the drag window "should" now be key and receive mouse events. But it isn't. I have to click again to so it can receive mouseDragged events.
The window appears as it should using [window makeKeyAndOrderFront]; but because it wasn't the window receiving the mouseDown event, it isn't receiving mouseDragged. I've tried [window sendEvent
Is this possible? "while a mouse event is directed at whatever window lies under the pointer" - Apple Docs
So... It should work in theory according to the docs.