The following message bounced because Yuhong was not a member of
the ptolemy-hackers mailing list, and the mailing list now rejects
posts from non-members.

-Christopher


Yuhong Xiong <[EMAIL PROTECTED]> writes:

Hi Dirk:

Let me try to answer your questions. Regarding (1), could you try to use
ptolemy.data.expr.UnknownToken? I think this class was created by Prof.
Lee as a concrete token with type "unknown", which is the lowest type in
the type hierarchy. Regrading (2), we did not put the type of ObjectToken
below String in the type hierarchy because we were not sure that an
arbitrary object has a meaningful string representation. Since structured
tokens, such as record, may contain ObjectToken, they are also not under
String in the hierarchy. If you want to get the string representation of
any token, one possible solution is to create a ToString actor, which has
input type general, and output type string. The operation of this actor
is simply to get the string representation of the input token and send
that out to the output port in a StringToken.

Please let me know if you have further questions.

- -Yuhong

Dirk Jacobs writes:
>     We would like to build some extra tokens.
>
>     1) A token ( In our case some kind of command tokens ) that can enter any
>     type of input port.
>
>     I think we need to get at the lowest level of the lattice tree. But this
>     seems to be impossible.
>     Another solution could be to be able to add some attributes dynamicaly to
>     the token class.
>
>     2) Why is not every type in the lattice tree lower than the string type.
>     Normaly in java it is always possible to convert to a string.
>
>     In that way we could enter with some special object token/record token/..
    .
>     into an input port of type string and give the string representation of
>     the token.
>
>
>     -Dirk


------- End of Forwarded Message


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

Reply via email to