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?



Hi William,

I followed your steps and found that indeed there is no response. I think it might be worth checking the ResponderChain for QCViews and the QCView function -eventForwardingMask and -setEventForwardingMask

I think this is because all events will be transmitted to the QC (which makes sense for interactive movies)...

I'm sorry, maybe some else knows how this is to be done (I'd be also interested to know),

best regards,
Michael



Am 12.02.2006 um 15:19 schrieb william van braam:

Hi Michael,

thanks for that quick reply.

This is the way I read your instructions:

0: start a new Cocoa project in XCode; add the QuartzComposer framework for QCView.h
1: open MainMenu.nib in IB
2: subclass NSView, call it MyView
3: generate the files for the MyView, and insert into file MyView.m the NSResponder "-(void)mouseDown:(NSEvent*)theEvent"
4: back to IB, and drag a CustomView (= NSView) on to the NSWindow
5: in the Inspector, set the CustomView class to "MyView"
6: save the MainMenu.nib in IB
7: back to XCode; build, run and test.


This is the standard setup for a Cocoa project with a NSView, and it works ok: mouseDown's show up as expected in the Run Log.

However, in this way no QCView is subclassed, and the functionality in IB of the QCController is also not there, such as loading a QC composition.qtz, which is what I am looking for.

What I also tried is:
2: subclass QCView, call it MyQCView
3: generate the files for the MyQCView, and insert into file MyQCView.m the NSResponder "-(void)mouseDown:(NSEvent*)theEvent"
4: back to IB, and drag a CustomView on to the NSWindow
5: in the Inspector, set the CustomView class to "MyQCView"; add a QCController
6: save, build, run


In this case: no response from the mouseDown NSResponder in MyQCView.

I'm getting the feeling that I will have to the way of NSView and QCRenderer. Before I do though: have I misunderstood your pointers? If so, perhaps you would be so kind as to point out to me where I go wrong in these scenario's, and/or forward me your implementation?

Thanks a lot for your help,
best regards,
William


On Feb 12, 2006, at 2:07 PM, michael markert wrote:

Hi William,

The error somewhere here:

the checkbox "Forward all events" is unchecked


Normally you would proceed as followed:

1. create a subclass of "NSView" and add the NSResponder "-(void) mouseDown:(NSEvent*)theEvent"
2. open mainMenu.nib and drag a "NSView" into a NSWindow
3. go to the inspector tab "custom Class" and select your "MYQCView" instead of "NSView"
4. compile and go... should work!



if you have problems, you can mail me off-list; I can mail you a sample-project I just tried...


Best regards,
Michael




Am 12.02.2006 um 11:46 schrieb william van braam:

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 (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>)
 >Re: catch that mouseDown? (From: michael markert <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.