Re: Stop dragging my <NSWindow> around
Re: Stop dragging my <NSWindow> around
- Subject: Re: Stop dragging my <NSWindow> around
- From: Edward Hillenbrand <email@hidden>
- Date: Thu, 3 Feb 2005 12:35:42 -0700
On Feb 3, 2005, at 12:21 PM, Henry McGilton wrote:
I tried this in one application. The main problem I saw was
determining
when you got the last windowDidMove message.
If that's the case, then a modal event loop should do the trick. Add
something like this your window subclass:
- (void)mouseDragged:(NSEvent *)theEvent
{
BOOL keepOn = YES;
while (keepOn)
{
theEvent = [self nextEventMatchingMask: NSLeftMouseUpMask];
switch ([theEvent type])
{
case NSLeftMouseUp:
NSLog(@"up");
// do something that you would do during the last windowDidMove:
message
keepOn = NO;
break;
default:
// ignore other events
break;
}
}
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden