[kepler-dev] open new Frame in Edit_parameter dialog
Wei Lu
welu at cs.indiana.edu
Wed Mar 29 10:07:51 PST 2006
Hi, Christopher
Thanks for the guide, The TextEditorConfigureFactory.java code is
good enough for my developing. and I have implemented such a frame, and it
works very well
best
Wei
On Tue, 28 Mar 2006, Christopher Brooks wrote:
> Hi Wei
> The Ptolemizer demo at
> $PTII/ptolemy/actor/lib/python/demo/Ptolemnizer/Ptolemninzer.xml has a
> a PythonScript actor The PythonScript actor has an _editorFactory
> attribute. When the user clicks on the icon, it pops up the editor.
>
> Below is the xml for this actor from that demo.
> In ptolemy, you can get at it with View->XML View
>
> The source code for the PythonScript actor is in Ptolemy, not Kepler
> You can look at the source code at
> http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII5.0/ptII5.0.1/ptolemy/actor/lib/python/PythonScript.java
>
> However, the key part is that the _model_ has xml that says to
> get the value for the script using a text editor:
>
> <property name="_editorFactory" class="ptolemy.vergil.toolbox.TextEditorConfigureFactory">
> <property name="attributeName"
> class="ptolemy.kernel.util.StringAttribute"
> value="script">
> </property>
> </property>
>
> The documentation for the tableau system is out of date, there might
> have been some in the Ptolemy II design docs at one time, but it was
> removed. The best documentation is the source code. Look at
> ptII/ptolemy/actor/gui/EditorFactory.java and
> ptII/ptolemy/vergil/toolbox/TextEditorConfigureFactory.java
>
>
> BTW - Thev reason that the the Python actor is not included in Kepler
> is because the Python actor actually uses Jython, a Java
> implementation Python. When Jython starts up, it wants to write
> cache files for each jar file in the classpath. Since Kepler has lots
> of jar files and also instantiates all the actors at run time, this
> was making startup very slow. I think this is a bug in Jython, it
> also prevents using Jython in WebStart.
>
> As far as using ant, I run in to similar problems, where I'm editing
> ptolemy files and I want the changes to quickly show up in kepler.
> I've ended up hacking up the build.xml files so that $PTII is searched
> before ptolemy.jar. You could try something similar. I don't have
> any changes to check in, they are long gone.
>
> _Christopher
> --------
>
>
> Seems I begin to understand the mechanism behind, so to create a speical
> frame when clicking "look inside" menu, I frite have to my own tableau
> class and tablea factory class, and then put into moml file as a property,
> is it basically correct? If I can find some documents on this development
> that will be greate (I can stop asking such basic questions)
>
> Also I wonder to know what the correct step to make the kelper system
> after change the preoperty in the moml file? My step is
> ant clean-full
> ant ptolemy
> ant compile
> ant buildkarlib
> rm ~/.kepler
> ant run-dev
>
> it works, but takes too much time. Is there any shortcut here? Thansk a
> lot
>
>
> Wei Lu
>
>
>
>
> On Mon, 27 Mar 2006, Wei Lu wrote:
>
> >
> > You mean PythonActor or PythonScript, seems to me PythonActor is the one
> I
> > am looking for (after clicking looking insdie, a frame is poped up), but
> I
> > can't find the source (java class) file for the PytonActor, I must miss
> > something , Thanks for more clue
> >
> >
> > wei
> >
> >
> >
> >
> >
> > On Mon, 27 Mar 2006, Edward A. Lee wrote:
> >
> > > At 03:35 PM 3/27/2006, Wei Lu wrote:
> > >
> > > >Hi group
> > > > I am trying writing a speicfic actor for kepler, But to
> > > >configure this actor, I need to run a special GUI frame to help user t
> o
> > > >set up one parameter, which is too complicate to write in text. I won
> der
> > > >if I can open the frame during the configuration time? (like the File
> > > >Brower button/dialog provided in current kepler system), If so, how to
> > > >make it? (in the dervided Actor class or else?) , Many thanks for clue
> me
> > > >in.
> > > >
> > > >best
> > > >
> > > >Wei Lu
> > >
> > >
> > > Sure... The PythonScript actor does this.
> > > It contains an attribute that is an instance of
> > > ptolemy.vergil.toolbox.TextEditorConfigureFactory.
> > > If you look at that class, you can see how it works, I think...
> > >
> > > Edward
> > >
> > >
> > >
> > > ------------
> > > Edward A. Lee
> > > Professor, Chair of the EE Division, Associate Chair of EECS
> > > 231 Cory Hall, UC Berkeley, Berkeley, CA 94720
> > > phone: 510-642-0253 or 510-642-0455, fax: 510-642-2845
> > > eal at eecs.Berkeley.EDU, http://ptolemy.eecs.berkeley.edu/~eal
> > >
> > >
> > _______________________________________________
> > Kepler-dev mailing list
> > Kepler-dev at ecoinformatics.org
> > http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-dev
> >
> _______________________________________________
> Kepler-dev mailing list
> Kepler-dev at ecoinformatics.org
> http://mercury.nceas.ucsb.edu/ecoinformatics/mailman/listinfo/kepler-dev
> --------
>
More information about the Kepler-dev
mailing list