on 6/24/09 2:50 PM, John C. Daub at h...@hsoi.com wrote:

> I am using a QTMovieView to play back a movie. I wish for there to be no
> chance of user interaction with the movie: pure playback. The behavior is
> window shows, movie auto-plays (QTMovieView takes up the whole of the window
> content area), when movie is done the window closes.
> 
> I noticed if I clicked on the movie that it would stop the playback. I didn't
> want this. So I subclassed QTMovieView and added empty overrides for:
> 
> -mouseDown:
> -rightMouseDown:
> -otherMouseDown:
> -mouseUp:
> -rightMouseUp:
> -otherMouseUp:
> -scrollWheel:
> 
> The methods are totally stubbed out, they are empty and do nothing. This does
> seem to stop any sort of user interaction. FWIW, I have also set the view to
> be not editable, disabled, no playback controls.
> 
> But I noticed an interesting thing.
> 
> If I right-click, there's no contextual playback menu displayed. But if I
> control-(left) click, the playback menu is displayed.
> 
> How is this happening? How is it that I have stubbed out all of the various
> mouse methods yet a control-click gets through?  And how can I get it to stop?

Answering my own question.

I added an override for -(NSMenu*)menuForEvent:(NSEvent*)theEvent;, just
stubbing it out, doing nothing, returning nil.

It works out fine and seems to solve my problem.

> As well, are there any other subtle user-interaction approaches that I may
> need to add to my stub-out list?

Still, I'd be curious if there might be any further subtle behaviors I need
to override/stub-out for QTMovieView so that it's purely "watch only".

Thanx.

-- 
John C. Daub }:-)>=
<mailto:h...@hsoi.com> <http://www.hsoi.com/hsoi/blog/>
"When a country falls into chaos, patriotism is born." -- Tao Te Ching #18



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to