Hi Edward,

Ok, so I understand in general what you are saying but I'm not understanding the implementation details. I have created a new Tableau "NewActorWizardTableau" that extends Tableau. Whithin the construtor, I am able to call topEffigy() from the NewActorWizardTableau's container (which is passed in via the constructor). I have the effigy of the top level object, but I can't find any way to actually add a new actor to it. Here's the code of my constructor:

public NewActorWizardTableau(PtolemyEffigy container, String name)
    throws IllegalActionException, NameDuplicationException
  {
    super(container, name);
    Effigy e = container.topEffigy();
    Container parent = e.showTableaux().getFrame();
    NewActorFrame NAFrame = new NewActorFrame(parent);
    NAFrame.setBackground(BACKGROUND_COLOR);
    setFrame(NAFrame);
  }

So, my question is: now that I have the top level effigy (Effigy e), how do I add my new actor to the model? I'm still a little foggy on the concepts of the Effigys and Tableaus so please forgive any details that I'm overlooking.

thanks,
chad

Edward A Lee wrote:

Are you referring to the actor library when you say tree view? The actor library is a Ptolemy model like any other (see the ptolemy.actor.gui package ... An instance Configuration, which is a CompositeEntity, contains the library). If you add the actors to the model (as opposed to just adding them to the XML file), then they will appear in the tree view.

Edward Lee

At 10:09 AM 8/7/2003 -0700, Chad Berkley wrote:

Hello,

I'm working on a project in which I am writing out and compiling actors
dynamically at runtime.  I would like these actors to then show up in
the treeview on the left side of Vergil but it seems that it only reads
the MoML file once.  Does anyone know a way to force the tree to reread
the MoML file or is there a better way to do this?  I am basically
adding an <entity> line to a MoML file for each actor that I dynamically
generate.  If I restart Vergil, the new actors show up but I would
rather them be added at runtime.

Any help would be appreciated.  I searched the archive for matters such
as this and didn't find much.  If this has already been discussed
before, please just point me in the direction of the thread.

Thanks,
Chad Berkley


-- ----------------------- Chad Berkley National Center for Ecological Analysis and Synthesis (NCEAS) [EMAIL PROTECTED] -----------------------





-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/

----------------------------------------------------------------------------

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]


--
-----------------------
Chad Berkley
National Center for
Ecological Analysis
and Synthesis (NCEAS)
[EMAIL PROTECTED]
-----------------------


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

Reply via email to