>> To be Chime compatible, I still need to implement the AnimFrameCallback
>> mechanism.
>
> I've been browsing the source code... and things seem to be happening in
> JmolApplet.notifyAtomPicked() so I added:
>
>   public void notifyAnimFrameChanged(int frameNo) {
>     System.out.println("Anim Frame Changed(" + frameNo + "," + strInfo +
> ")");
>     showStatus(strInfo);
>     if (animFrameCallBack != null && jsoWindow != null)
>       jsoWindow.call(animFrameCallBack,
>                      new Object[] {htmlName, new Integer(frameNo)});
>   }

That code looks pretty good.

> I've matched the returned Object[] with the JavaScript on the user list...
>
> But the method notifyAtomPicked() does not seem to be called from any
> place...

Correct.

> So I did not know where to call the notifyAnimFrameChanged either...

> Miguel, suggestions?

1) add
     void notifyFrameChanged(int frameNo);
   to the JmolStatusListener interface
2) add an empty implementation of notifyFrameChanged in Jmol.java
3) add a method to JmolViewer class which looks something like
     void notifyFrameChanged(int frameNo) {
        if (jmolStatusListener != null)
          jmolStatusListener.notifyFrameChanged(frameNo);
     }
4) recompile the world to make sure everything is OK
5) In managers/RepaintManager.java find the best spot where the frame
changes. At that point invoke
     viewer.notifyFrameChanged(newFrameNumber);

6) compile and test



Miguel



-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE. 
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
Jmol-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to