In comp.soft-sys.ptolemy, [EMAIL PROTECTED] (Aumeran) writes: > hello, > 1) > i want know if it's possible to create an applet in vergil from a > model. > for example, i put a ramp with a display and i want create dynamicly > in vergil an applet to see run execution with Ramp parameters. Can i > make the applets directly in vergil or create an applets with the > actors as in tutorials? > if it is not possible which classes can help me to create the actor to > make this.
The Ptolemy II 2.0-beta code generator includes a prototype applet code generator. See http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII2.0/ptII2.0/doc/codegen.htm#applet This feature is rather difficult to use, the UI is very rough. The applet codegenerator is fairly difficult to use within Web Start because of classpath issues. In Ptolemy II 2.0-beta, applet code generation does not work under Web Start. I have something working for the 2.0 release though What is even worse is that generated html files need to be rather peculiar so that they can support most common browsers. Another resource is http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII2.0/ptII2.0/doc/coding/applets.htm There is a chapter in the Design Doc http://ptolemy.eecs.berkeley.edu/ptolemyII/designdoc.htm that discusses applets, though it is somewhat out of date. After messing around with the applet generator, I've decided that the problem is somewhat complex because of the following factors 1) Generating portable HTML that will operate on the common browsers is difficult. 2) It is difficult to make a push button solution that will generate an applet for the naive user, but that is also sufficiently flexible for the expert. The UI in particular is a mess. 3) It is really best if the user understands quite a bit about applets so that they can diagnose the inevitable problems 4) Minimizing the size of the jar files that are necessary to run the model is not that easy to automate. 5) The way Web Start works is that the Ptolemy II classes are placed in jar files and then Web Start caches those jar files. To generate applets under Web Start, we need to copy those cached jar files. This requires knowing what classes are necessary for the model to run so that we can add them to a parameter. This makes it difficult to use the applet generator under Web Start. > 2) > i havent see the classes which create the xml file when i save a model > in vergil. > could you say me where are these classes. Look at the exportMoML() in ptolemy/kernel/util/NamedObj.java There is another system that is in the prototype stages at ptolemy/moml/MoMLWriter.java > sorry for my english you can ask me explain if you have not understand > my querstion. > thanks. -Christopher ---------------------------------------------------------------------------- Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED]