On Tue, 6 Jul 1999, Suvarna Ayyagari wrote:

> Hi,
> 
> I had a question. Lets say I have a class MyThread which extends
> java.lang.thread
> 
> And I have a class MyClass which has a public variable  named "display" of 
> type MyThread.
> 
> Using Tclblend, I want to set the public variable 'display' of type Mythread 
> and be able to access all the methods of MyThread.
> Is this the right way to do it ?

I think you need to do it like this.
Say you have a Java class defined in a file Simple.java.

public class Simple {
    public static Object obj;
}

You would use the java::field command like this.

set env(TCL_CLASSPATH) .
package require java
set s [java::new Simple]
set o [java::new Object]
java::field $s obj $o

 
> set x [java::new MyThread]
> set z [java::field -noconvert $x {display MyThread}]

I would suggest using JDK 1.1.8 and Tcl Blend 1.2.3.

I hope that helps.
Mo

> Thanks for your help. Is there any specific version of TClblend I should be 
> using. I am using JDK 1.1.6 with native threads.
> 
> Regds,
> Suvarna
> 
> 
> 
> _______________________________________________________________
> Get Free Email and Do More On The Web. Visit http://www.msn.com
> 
> ----------------------------------------------------------------
> The TclJava mailing list is sponsored by WebNet Technologies.
> 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]'. 
> A list archive is at: http://www.findmail.com/listsaver/tcldallas/
> 

----------------------------------------------------------------
The TclJava mailing list is sponsored by WebNet Technologies.
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]'. 
A list archive is at: http://www.findmail.com/listsaver/tcldallas/

Reply via email to