A question, and a comment.
1) What does that mean? Objects don't have types: variables have types, objects
have classes (http://www.javasoft.com/docs/books/jls/html/4.doc.html#24887).
o.getClass() is the class of the object. I don't mean to be pedantic, but if
there is really some TclBlend requirement here I would like to understand it.
2) The examples in the TclBlend docs I have seen that warn against using
o.getClass() are framed in terms of subclasses. In this small test case,
o.getClass() refers to java.util.Vector, and not any subclass of that.
Mo DeJong wrote:
> > {
> > // We are not supposed to use getClass (); I have never been sure why.
> > // In this case, no subclasses are involved anyway, so the result
> > // should be the same.
> > TclList.append (interp, list, ReflectObject.newInstance (interp,
> o.getClass (), o));
> >
> >
>
> Ack, you should not do that! You really need to know the type
> of the object you are going to reflect. If you just call o.getClass()
> it could be anything. I don't know if this is related to the problem
> you are running into, but it is a really bad idea.
>
> Mo DeJong
> Red Hat Inc
>
> ----------------------------------------------------------------
> The TclJava mailing list is sponsored by Scriptics Corporation.
> To subscribe: send mail to [EMAIL PROTECTED]
> with the word SUBSCRIBE as the subject.
> To unsubscribe: send mail to [EMAIL PROTECTED]
> with the word UNSUBSCRIBE as the subject.
> To send to the list, send email to '[EMAIL PROTECTED]'.
> An archive is available at http://www.mail-archive.com/tcljava@scriptics.com
----------------------------------------------------------------
The TclJava mailing list is sponsored by Scriptics Corporation.
To subscribe: send mail to [EMAIL PROTECTED]
with the word SUBSCRIBE as the subject.
To unsubscribe: send mail to [EMAIL PROTECTED]
with the word UNSUBSCRIBE as the subject.
To send to the list, send email to '[EMAIL PROTECTED]'.
An archive is available at http://www.mail-archive.com/tcljava@scriptics.com