Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
ExtremesCallback
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ExtremesCallback



I am attempting to set up an ExtremesCallBack on a movie being
played by a MoviePresenter. The problem is that my callback is never
called (no exceptions thrown during set up).

Could someone please scan the following code and see if I'm doing
something obviously wrong? Should I be using the timebase from the MoviePresenter
rather than the Movie ? Do I need to set a flag other than TriggerAtStop ?)

TimeCallBack work fine using a similar technique (using the movie's timebase).
Any insight greatly appreciated.

DL Ayers, email@hidden

.....
class MyExtremesCallBack extends ExtremesCallBack {

MyExtremesCallBack(TimeBase tb, int flags) throws QTException {
super(tb, flags);
}

public void execute() {
try {
logger.log(Logger.DEBUG,"Loading triggers");
} catch (Exception sqte) {
logger.log(Logger.FAILURE, "TvScene.LoadCallBack.execute(): Cannot reload
trigger." + sqte);
}
}
}
.....

I set up the trigger like so (TvClip contains a reference to a movie that is being
displayed in a MoviePresenter)


public void trigger(TvClip tvClip) {
try {
TimeBase tb = tvClip.getMovie().getTimeBase();
loadTrigger = new MyExtremesCallBack (tb, StdQTConstants.triggerAtStop);
loadTrigger.callMeWhen();
logger.log(Logger.DEBUG, "Load Trigger: " + loadTrigger);
}
catch (QTException sqte) {
logger.log(Logger.FAILURE, "TvScene.trigger() Exception! " +sqte);
}
}




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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.