Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: catch that mouseDown?



Aaron,

Wow! That is good; and clever, too! MouseDown, mouseUp, and all the rest.
Thanks a lot for that.


William


On Feb 12, 2006, at 8:15 PM, Aaron Tuller wrote:

add this to your subclass:

- (NSView *)hitTest:(NSPoint)aPoint
{
	NSView *s = [super hitTest:aPoint];
	if (s)
		return self;
	else
		return nil;
}

and then you get all the mouseDown stuff you want. Works great for me.

-aaron


At 11:46 AM +0100 2/12/06, william van braam wrote:
Beginners question.

I would like to catch the mouseDowns programatically, not in the composition. So in IB I drop a (subclassed QCView) MyQCView on a window and add its corresponding QCController. For MyQCView the checkbox "Forward all events" is unchecked. Run it and click on the MyQCView. The - (void)mouseDown(NSEvent *)e {NSLog@"...";} in MyQCView.m doesn't react.
So, where to catch the mouseDowns?


I must be missing something very basic; a pointer would be appreciated.
(QC2.1.1, XCode2.1.1, iBookG4, Tiger)


Thanks,
William
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list (Quartzcomposer- email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/ email@hidden


This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Quartzcomposer-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/quartzcomposer-dev/email@hidden

This email sent to email@hidden
References: 
 >catch that mouseDown? (From: william van braam <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.