Hi, Christopher<br><br>Thanks for the detailed explanation:)<br>I modified the port names to be consistent with the variable names in those actors. <br><br>Have a nice day!<br>Gongjing<br><br><div class="gmail_quote">On Wed, Feb 9, 2011 at 5:51 PM, Christopher Brooks <span dir="ltr"><<a href="mailto:cxh@eecs.berkeley.edu">cxh@eecs.berkeley.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi Gongjing<div class="im"><br>
<br>
<br>
On 2/8/11 4:27 PM, Gongjing Cao wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi, Christopher,<br>
<br>
Thanks for the reminder. Do you mean they have to be exact the same?<br>
</blockquote>
<br></div>
Yes, they should be the same, for example:<br>
<br>
fromEmail = new PortParameter(this, "fromEmail");<br>
...<br>
<br>
public PortParameter fromEmail;<br>
<br>
See<br>
<a href="http://www.mail-archive.com/ptolemy-hackers@doppler.eecs.berkeley.edu/msg00348.html" target="_blank">http://www.mail-archive.com/ptolemy-hackers@doppler.eecs.berkeley.edu/msg00348.html</a><br>
<br>
See also page 168-169 of Volume of the Ptolemy Design doc:<br>
<a href="http://ptolemy.eecs.berkeley.edu/ptolemyII/designdoc.htm" target="_blank">http://ptolemy.eecs.berkeley.edu/ptolemyII/designdoc.htm</a><br>
--start--<br>
<br>
By convention, ports are public members of actors. They represent a set of input and output channels<br>
through which tokens may pass to other ports. Figure 5.1 shows a single port portName that is an<br>
instance of TypedIOPort, declared in the line<br>
public TypedIOPort portName;<br>
Most ports in actors are instances of TypedIOPort, unless they require domain-specific services, in<br>
which case they may be instances of a domain-specific subclass, such as DEIOPort. The port is actually<br>
created in the constructor by the line<br>
portName = new TypedIOPort(this, "portName", true, false);<br>
The first argument to the constructor is the container of the port, this actor. The second is the name of<br>
the port, which can be any string, but by convention, is the same as the name of the public member. If<br>
the port name is not the same as the public member, then there will be problems with cloning, which<br>
depends on this naming convention. To present a different name to the user, call the setDisplayName()<br>
method. Note that calling setDisplayName() is optional. The third argument specifies whether the port<br>
is an input (it is in this example), and the fourth argument specifies whether it is an output (it is not in<br>
this example). There is no difficulty with having a port that is both an input and an output, but it is<br>
rarely useful to have one that is neither.<br>
--end---<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
"Cloning", do you mean the regular java cloning?<br>
</blockquote>
<br></div>
Yes, cloning happens with actor oriented classes.  It may happen at other times.<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">
Thanks for letting me know there is another mail actor.<br>
<br>
Best,<br>
Gongjing<br>
<br>
<br>
<br>
<br></div><div class="im">
On Tue, Feb 8, 2011 at 3:12 PM, Christopher Brooks <<a href="mailto:cxh@eecs.berkeley.edu" target="_blank">cxh@eecs.berkeley.edu</a> <mailto:<a href="mailto:cxh@eecs.berkeley.edu" target="_blank">cxh@eecs.berkeley.edu</a>>> wrote:<br>

<br>
    Hi Gongjing,<br>
<br>
    BTW - If the parameter names do not match name of the variable,<br>
    then cloning the actor will fail.<br>
<br>
    Cloning occurs when Actor Oriented Classes are used.<br>
<br>
    Also, there is newish mail actor in the Ptolemy II tree at<br>
    ptolemy.actor.lib.mail.SendMail.java<br>
    To try out the actor, use<br>
    Tools -> Instantiate Component<br>
<br>
    _Christopher<br>
<br></div><div class="im">
    On 2/8/11 3:04 PM, <a href="mailto:gongjing@ecoinformatics.org" target="_blank">gongjing@ecoinformatics.org</a> <mailto:<a href="mailto:gongjing@ecoinformatics.org" target="_blank">gongjing@ecoinformatics.org</a>> wrote:<br>

<br>
        Author: gongjing<br>
        Date: 2011-02-08 15:04:26 -0800 (Tue, 08 Feb 2011)<br>
        New Revision: 27048<br>
<br>
        Modified:<br>
            trunk/modules/koogle/src/org/kepler/actor/util/MailSender.java<br>
        Log:<br>
        typo<br>
<br>
        Modified: trunk/modules/koogle/src/org/kepler/actor/util/MailSender.java<br>
        ===================================================================<br>
        --- trunk/modules/koogle/src/org/kepler/actor/util/MailSender.java      2011-02-08 22:54:36 UTC (rev 27047)<br>
        +++ trunk/modules/koogle/src/org/kepler/actor/util/MailSender.java      2011-02-08 23:04:26 UTC (rev 27048)<br>
        @@ -55,7 +55,7 @@<br>
                  authTokenPParameter.setStringMode(true);<br>
                  tokenSecretPParameter = new PortParameter(this, "Token Secret");<br>
                  tokenSecretPParameter.setStringMode(true);<br>
        -        fromEmailPParameter = new PortParameter(this, "From Emial");<br>
        +        fromEmailPParameter = new PortParameter(this, "From Email");<br>
                  fromEmailPParameter.setStringMode(true);<br>
                  toEmailPParameter = new PortParameter(this, "To Emails");<br>
                  toEmailPParameter.setStringMode(true);<br>
<br>
        _______________________________________________<br>
        Kepler-cvs mailing list<br></div>
        <a href="mailto:Kepler-cvs@kepler-project.org" target="_blank">Kepler-cvs@kepler-project.org</a> <mailto:<a href="mailto:Kepler-cvs@kepler-project.org" target="_blank">Kepler-cvs@kepler-project.org</a>><div class="im">
<br>
        <a href="http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-cvs" target="_blank">http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-cvs</a><br>
<br>
<br>
    --<br>
    Christopher Brooks, PMP                       University of California<br>
    CHESS Executive Director                      US Mail: 337 Cory Hall<br>
    Programmer/Analyst CHESS/Ptolemy/Trust        Berkeley, CA 94720-1774<br></div>
    ph: <tel:+15106439841><a href="tel:510.643.9841" target="_blank"></a><a href="tel:510.643.9841" target="_blank">510.643.9841</a> <tel:+15106439841>                                  (Office: 545Q Cory)<br>

    home: (F-Tu) <tel:+17076650131><a href="tel:707.665.0131" target="_blank"></a><a href="tel:707.665.0131" target="_blank">707.665.0131</a> <tel:+17076650131> cell: <tel:+17073320670><a href="tel:707.332.0670" target="_blank"></a><a href="tel:707.332.0670" target="_blank">707.332.0670</a> <tel:+17073320670><br>

<br>
<br>
</blockquote><div><div></div><div class="h5">
<br>
-- <br>
Christopher Brooks, PMP                       University of California<br>
CHESS Executive Director                      US Mail: 337 Cory Hall<br>
Programmer/Analyst CHESS/Ptolemy/Trust        Berkeley, CA 94720-1774<br>
ph: <a href="tel:510.643.9841" target="_blank"></a><a href="tel:510.643.9841" target="_blank">510.643.9841</a>                                  (Office: 545Q Cory)<br>
home: (F-Tu) <a href="tel:707.665.0131" target="_blank"></a><a href="tel:707.665.0131" target="_blank">707.665.0131</a> cell: <a href="tel:707.332.0670" target="_blank"></a><a href="tel:707.332.0670" target="_blank">707.332.0670</a><br>

</div></div></blockquote></div><br>