preventWindowOrdering
preventWindowOrdering
- Subject: preventWindowOrdering
- From: Andreas Schwarz <email@hidden>
- Date: Tue, 12 Mar 2002 10:28:34 -0800
Take a look at -[NSApplication preventWindowOrdering]. If you override
your mouseDown: method and call this and then call [super mouseDown:],
this should prevent your window from coming to the front for that event.
Thanks for pointing that out!
Now, if only I could get it to work...
When I call [super mouseDown:] in my view, the app gets trapped there
until a mouseUp -- and not the mouseUp that corresponds to the mouseDown
that started the whole thing... the next mouseUp that occurrs after
THAT. Then it comes out of [super mouseDown:] and continues on its
merry way... except, of course, this wreaks total havoc with the event
stream in my app! Not to mention the user's clicks do things that seems
to make no sense.
Here is what GDB says is going on while it's sitting there in [super
mouseDown:] waiting for a mouseUp or whatever:
#0 0x70000978 in mach_msg_overwrite_trap ()
#1 0x70005ac4 in mach_msg ()
#2 0x7017bf98 in CFRunLoopRunInMode ()
#3 0x701b7100 in CFRunLoopRunSpecific ()
#4 0x7017b8e0 in CFRunLoopRunInMode ()
#5 0x7312d8f4 in InvokeThemeButtonDrawUPP ()
#6 0x73140808 in GetNextWindow ()
#7 0x731715ec in BlockUntilNextEventMatchingListInMode ()
#8 0x70bd70b8 in _DPSNextEvent ()
#9 0x70bfe5d8 in -[NSApplication
nextEventMatchingMask:untilDate:inMode:dequeue:] ()
#10 0x70da11f4 in -[NSWindow nextEventMatchingMask:] ()
#11 0x70d792b8 in -[NSSplitView _trackMouse:] ()
#12 0x70d799c0 in -[NSSplitView mouseDown:] () <- I'm guessing this
is the splitView my view is in
#13 0x70833b28 in -[NSObject performSelector:withObject:] ()
#14 0x70c1f43c in -[NSEvent dealloc] ()
#15 0x70d5c608 in -[NSResponder mouseDown:] ()
#16 0x70833b28 in -[NSObject performSelector:withObject:] ()
#17 0x70c1f43c in -[NSEvent dealloc] ()
#18 0x70d5c608 in -[NSResponder mouseDown:] ()
#19 0x70833b28 in -[NSObject performSelector:withObject:] ()
#20 0x70c1f43c in -[NSEvent dealloc] ()
#21 0x70d5c608 in -[NSResponder mouseDown:] ()
#22 0x0004e36c in -[GBBrowserView mouseDown:] <- My View, calling
[super mouseDown:]
#23 0x70c1b8f8 in -[NSWindow sendEvent:] ()
#24 0x70b9479c in -[NSApplication sendEvent:] ()
#25 0x70c23488 in -[NSApplication run] ()
#26 0x70c91ed0 in NSApplicationMain ()
#27 0x00003950 in main (argc=1, argv=0xbffffd38)
#28 0x00003874 in _start ()
#29 0x000036a4 in start ()
Any ideas? Am I doing something stupid?
Thanks,
Andreas Schwarz
_______________________________________________
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.