Re: Reusing XML Actors

2001-03-27 Thread Edward A. Lee

At 05:23 PM 3/27/2001 -0700, Michael J. Wirthlin wrote:

>Is there a mechanism for reusing actors that have been defined in XML
>within Vergil? I have created a number of actors in XML instead of Java
>but cannot seem to figure out how to reuse these actors within other
>designs.

Unfortunately, this is not yet well supported from within the GUI.
What you have to do is save your model to an XML file, then
edit the XML file to change the top-level from "entity" to "class".
I.e., change:


  ...

to

  ...


Then you can reference this class in an xml library file
(like the various library files in the main vergil configuration).
If it is in the classpath, then you can reference it by giving
a name relative to the classpath.  I.e, if it is in:

$PTII/dir/foo.xml

then you can put the following in a library file:

   

Sorry this is so hard to do... A top priority for the next
release is library management.


>On a related note, I have found that when I create a level of hierarchy
>(as defined in the tutorial), the definition of the composite actor is
>saved within the XML of the top-level design. Is there a way to save
>this composite actor in its own XML file and make it reusable?

You can use save-as within the composite, and then do the
above song-and-dance.

Edward



>- Mike
>
>--
>Michael J. WirthlinAssistant Professor
>Voice: (801) 378-7601  ECEN Department
>fax:   (801) 378-6586  Brigham Young University
>email: [EMAIL PROTECTED] 459 CB
>www.ee.byu.edu/faculty/wirthlinProvo, UT 84602
>
>
>Posted to the ptolemy-hackers mailing list.  Please send administrative
>mail for this list to: [EMAIL PROTECTED]


Edward A. Lee, Professor
518 Cory Hall, UC Berkeley, Berkeley, CA 94720
phone: 510-642-0455, fax: 510-642-2739
[EMAIL PROTECTED], http://ptolemy.eecs.berkeley.edu/~eal



Posted to the ptolemy-hackers mailing list.  Please send administrative
mail for this list to: [EMAIL PROTECTED]



Reusing XML Actors

2001-03-27 Thread Michael J. Wirthlin


Is there a mechanism for reusing actors that have been defined in XML
within Vergil? I have created a number of actors in XML instead of Java
but cannot seem to figure out how to reuse these actors within other
designs.

On a related note, I have found that when I create a level of hierarchy
(as defined in the tutorial), the definition of the composite actor is
saved within the XML of the top-level design. Is there a way to save
this composite actor in its own XML file and make it reusable?

- Mike

-- 
Michael J. WirthlinAssistant Professor
Voice: (801) 378-7601  ECEN Department
fax:   (801) 378-6586  Brigham Young University
email: [EMAIL PROTECTED] 459 CB
www.ee.byu.edu/faculty/wirthlinProvo, UT 84602


Posted to the ptolemy-hackers mailing list.  Please send administrative
mail for this list to: [EMAIL PROTECTED]