For actors written in Java, the port name is defined in Java code.
If you rename it after it is constructed, and then save it, then
when you reopen the model, the Java code will construct a port with
the original name, and the MoML file will specify another port with
the new name.  The Java code will use only the first port.

If you must change the name of a port defined in Java, then you
must do it in the Java code.

Otherwise, you can define an actor that does not create a port
in its constructor, and instead rely on the MoML to create the port.

Edward

At 06:08 PM 9/17/2002 +0200, Pulon Stephane wrote:

>Hello,
>Back working with PtolemyII.
>
>I think there is another problem with Port Names. I explain:
>
>when I try to change his default name by something else and then save it, a
>new port is created (with default name).
>This is little bit annoying.
>It is a well known behaviour or not.
>
>For information: I am using PTII 2.1 devel retreived from CVS last mid-july.
>
>Thanks in advance.
>
>Sorry if this problem has already been mentioned on the mailling List. (I
>didn't read all mails of the M.L)
>
>Stéphane Pulon
>Software Engineer
>I.B.T.C
>Thales Underwater Systems
>
>
>
>
> >
> > Yep, this is a bug, below is a patch to PtolemyII2.0.1
> >
> > Basically, what happened is that in the devel tree, there is a
> > facility that allows the user to show the name of the port by
> > right clicking on a port and selecting 'Customize Name'
> > The Rename port window has a 'Show Name' check box for
> > whether the name is
> > displayed.  Unfortunately, at the time we did the code split, there
> > was a problem where the name was displayed twice, so we removed this
> > facility from the release branch.  (I think the problem is
> > now fixed in
> > the devel tree, but folding that change into the release tree would be
> > very difficult.) When we pulled out the 'Show Name' facility we
> > introduced this bug that you are seeing now.
> >
> > I'll add this bug and fix to the list of limitations at
> > http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII2.0/limitations.htm
> > and see about creating a new tar file and Windows installer.
> >
> >
> > -Christopher
> >
>
>----------------------------------------------------------------------------
>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]

Reply via email to