• 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: preventWindowOrdering
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: preventWindowOrdering


  • Subject: Re: preventWindowOrdering
  • From: Brian Webster <email@hidden>
  • Date: Thu, 14 Mar 2002 09:13:45 -0600

On Tuesday, March 12, 2002, at 07:39 PM, Andreas Schwarz wrote:

A code snippet:


NSLog(@"Here");
[super mouseDown:theEvent];
NSLog(@"Here 2");

while ([theEvent type] != NSLeftMouseUp) {
theEvent = [[self window] nextEventMatchingMask: NSLeftMouseUpMask | NSLeftMouseDraggedMask];
// Checking for drag here
}


It is the while loop that is causing the problem (the app will log "Here" and then just freeze until you click in the view a second time, at which point it will log "Here 2" and continue on as if nothing ever happened). But of course that doesn't make sense...

I tried putting this code into a plain NSView subclass and I didn't get the same problems. This is pretty mysterious... perhaps it has something to do with the NSView class you're inheriting from. Was it an NSBrowser? Perhaps the NSMatrix you're clicking in is doing its own mouse tracking in its mouseDown: implementation?

--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: preventWindowOrdering
      • From: Andreas Schwarz <email@hidden>
References: 
 >Re: preventWindowOrdering (From: Andreas Schwarz <email@hidden>)

  • Prev by Date: Why the name Cocoa?
  • Next by Date: Drawing images "selected"
  • Previous by thread: Re: preventWindowOrdering
  • Next by thread: Re: preventWindowOrdering
  • Index(es):
    • Date
    • Thread