• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Stop dragging my <NSWindow> around
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Stop dragging my <NSWindow> around (From: Ken Tabb <email@hidden>)
 >Re: Stop dragging my <NSWindow> around (From: Edward Hillenbrand <email@hidden>)
 >Re: Stop dragging my <NSWindow> around (From: j o a r <email@hidden>)
 >Re: Stop dragging my <NSWindow> around (From: Henry McGilton <email@hidden>)

  • Prev by Date: Re: Stop dragging my <NSWindow> around
  • Next by Date: Re: difference between frameworks and plugins
  • Previous by thread: Re: Stop dragging my <NSWindow> around
  • Next by thread: Re: Stop dragging my <NSWindow> around
  • Index(es):
    • Date
    • Thread