1

I have a Class (File's Owner) that has an instance of a QTMovieViewer subclass (movieViewer) and a QTMovie (movie). QTMovieViewer is an IBOutlet, QTMovie is not.

Within IB I set up a binding for movieViewer using KVC to movie. How can I access movie from movieViewer in code?

I have thought about adding an Object to IB to represent the QTMovie, but the problem is this is not an IBOutlet and is created in code from File's Owner.

Thank you.

Dodomac
  • 194
  • 2
  • 17

1 Answers1

0

Why do you want to use the movie view as your starting point for finding the movie? Why not start from the controller which is acting as the owner of that NIB?

Anyway, QTMovieView (no "er") has a movie property which probably reflects whatever movie the movie binding was bound to.

Ken Thomases
  • 88,520
  • 7
  • 116
  • 154
  • The reason being for mouse events. When you obtain a mouse event on the QTMovieView (i.e. mousedown) I want to resize it's frame. But I also want to keep the aspect ratio of the movie so I am accessing the QTMovieNaturalSizeAttribute of the QTMovie. I am new to QTKit and the examples say call the QTMovie 'movie'. I thought I saw a 'movie' on the QTMovieView previously and changed my name to movieToPlay to stop it being confusing, but then I forgot about it :) This may also explain why my movie wouldn't play when I moved my QTMovie into my QTMovieView subclass! – Dodomac May 31 '12 at 09:06