Thread: RE: [tcljava-user] mail group
Brought to you by:
mdejong
From: Tam H. <th...@su...> - 2001-05-24 00:26:48
|
Well see this is my problem for tclblend..the function gcd is in the C tcl = extension. I think i'm making it more complicated than it needs to be. I = couldn't source a script which does "load gcd.dll" or load .dll in a java = program with interp.eval("load gcd.dll") since both keeps saying "invalid = command name "load." I know this should work since you said tclblend is = a C tcl extension. = So then i thought of just sourcing a script which loads it as part of a jav= a class. I test it in the tclsh and the extension is loaded and function = is access with "gcd 42 105" But i can't access the extension function "= gcd 42 105" if i'm calling the script from a java program because the = error again is "invalid command name gcd" = Please help.. On 5/23/01, tcljava-user wrote: >On Wed, 23 May 2001, Tam Huynh wrote: > >> Is this the only mail group to join for help on tclblend? > >No, the lists are for both Jacl and Tcl Blend. > >> Is there any of >> other mail group for beginners? Well i'm just going to ask my = >beginner's >> question anyway..I just need to know how to call a method/function = >that is >> contain in a c extension loaded in a class. > >I assume you mean a Java extension. > >> I get "no such method gcd in >> class SimpleExtension" in my script and gcd is the function loaded in = >the >> dll.. > >Well, is there a public method named gcd? You can query the available >methods using the `java::info methods $obj` command. You could also >print them using javap. > >Mo > >_______________________________________________ >tcljava-user mailing list >tcl...@li... >http://lists.sourceforge.net/lists/listinfo/tcljava-user > > >RFC822 header >----------------------------------- > Received: from usw-sf-list1.sourceforge.net (usw-sf-fw2.sourceforge.net = >[216.136.171.252]) by big.sunrisetelecom.com with SMTP (Microsoft = >Exchange Internet Mail Service Version 5.5.2653.13) > id LP9FGYH7; Wed, 23 May 2001 16:40:15 -0700 > Received: from localhost ([127.0.0.1] helo=3Dusw-sf-list1.sourceforge.= net) > by usw-sf-list1.sourceforge.net with esmtp (Exim 3.22 #1 = >(Debian)) > id 152iIM-00041A-00; Wed, 23 May 2001 16:44:02 -0700 > Received: from runyon.cygnus.com ([205.180.230.5] = >helo=3Dcygnus.com) > by usw-sf-list1.sourceforge.net with esmtp (Exim 3.22 #1 = >(Debian)) > id 152iHn-0003tc-00 > for <tcl...@li...>; Wed, 23 May 2001 = >16:43:27 -0700 > Received: from cse.cygnus.com (cse.cygnus.com [205.180.230.236]) > by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id = >QAA28394 > for <tcl...@li...>; Wed, 23 May 2001 = >16:43:22 -0700 (PDT) > Received: (mdejong@localhost) by cse.cygnus.com (8.8.8+Sun/8.6.4) = >id QAA02957; Wed, 23 May 2001 16:43:22 -0700 (PDT) > From: Mo DeJong <md...@cy...> > To: tcl...@li... > Subject: Re: [tcljava-user] mail group > In-Reply-To: = ><DGE...@su... >> > Message-ID: = ><Pin...@cs...> > MIME-Version: 1.0 > Content-Type: TEXT/PLAIN; charset=3DUS-ASCII > Sender: tcl...@li... > Errors-To: tcl...@li... > X-BeenThere: tcl...@li... > X-Mailman-Version: 2.0.5 > Precedence: bulk > Reply-To: tcl...@li... > List-Help: <mailto:tcljava-user- >re...@li...?subject=3Dhelp> > List-Post: <mailto:tcl...@li...> > List-Subscribe: <http://lists.sourceforge.net/lists/listinfo/tcljava-= user>, > <mailto:tcljava-user- >re...@li...?subject=3Dsubscribe> > List-Id: A list for users of tcljava <tcljava-user.lists.sourceforge.net>= > List-Unsubscribe: <http://lists.sourceforge.net/lists/listinfo/tcljava- >user>, > <mailto:tcljava-user- >re...@li...?subject=3Dunsubscribe> > List-Archive: <http://lists.sourceforge.net/archives//tcljava-user/> > Date: Wed, 23 May 2001 16:43:22 -0700 (PDT) > = > |
From: Tam H. <th...@su...> - 2001-05-24 16:32:40
|
I tried loading the extension in the java program with 'interp.eval("load = ext.dll")'. Does the tclsh have to call the java program in order for this = to work? I'm executing the program without running the tclsh. And my = exception is "invalid command load" On 5/23/01, tcljava-user wrote: >Tam Huynh wrote: >> = >> Well see this is my problem for tclblend..the function gcd is in the = >> C tcl extension. > >If gcd is a C-based Tcl extension, then load it *exactly* the same >way that you did in tclsh. Tclblend is simply a tclsh with the = >"java" extension. You still have all normal Tcl commands available >to you, called exactly the same way. Tclblend's "java" extension >simply adds the commands that begin java::*. You should only = >use the java::* commands to talk to Java classes, not to anything >in C or C++. > > -=3D- D. J. > >_______________________________________________ >tcljava-user mailing list >tcl...@li... >http://lists.sourceforge.net/lists/listinfo/tcljava-user > > >RFC822 header >----------------------------------- > Received: from usw-sf-list1.sourceforge.net (usw-sf-fw2.sourceforge.net = >[216.136.171.252]) by big.sunrisetelecom.com with SMTP (Microsoft = >Exchange Internet Mail Service Version 5.5.2653.13) > id LP9FGY7F; Wed, 23 May 2001 22:13:24 -0700 > Received: from localhost ([127.0.0.1] helo=3Dusw-sf-list1.sourceforge.= net) > by usw-sf-list1.sourceforge.net with esmtp (Exim 3.22 #1 = >(Debian)) > id 152nUb-0006D0-00; Wed, 23 May 2001 22:17:01 -0700 > Received: from [63.165.195.154] (helo=3Dwcox.com) > by usw-sf-list1.sourceforge.net with esmtp (Exim 3.22 #1 = >(Debian)) > id 152nU0-00069h-00 > for <tcl...@li...>; Wed, 23 May 2001 = >22:16:24 -0700 > Received: from cayenne.sdr.local [63.165.196.10] by wcox.com with = >ESMTP > (SMTPD32-6.06) id A922A81011A; Wed, 23 May 2001 23:16:18 - >0600 > Received: from millibits.com (poblano [192.168.10.72]) > by cayenne.sdr.local (8.9.3/8.9.3) with ESMTP id FAA02484 > for <tcl...@li...>; Thu, 24 May 2001 = >05:09:14 GMT > Message-ID: <3B0...@mi...> > From: "D. J. Hagberg" <dha...@mi...> > Organization: Millibits Consulting Services > X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.11 i586) > X-Accept-Language: en > MIME-Version: 1.0 > To: tcl...@li... > Subject: Re: [tcljava-user] mail group > References: <E15...@us...> > Content-Type: text/plain; charset=3Dus-ascii > Content-Transfer-Encoding: 7bit > Sender: tcl...@li... > Errors-To: tcl...@li... > X-BeenThere: tcl...@li... > X-Mailman-Version: 2.0.5 > Precedence: bulk > Reply-To: tcl...@li... > X-Reply-To: dha...@mi... > List-Help: <mailto:tcljava-user- >re...@li...?subject=3Dhelp> > List-Post: <mailto:tcl...@li...> > List-Subscribe: <http://lists.sourceforge.net/lists/listinfo/tcljava-= user>, > <mailto:tcljava-user- >re...@li...?subject=3Dsubscribe> > List-Id: A list for users of tcljava <tcljava-user.lists.sourceforge.net>= > List-Unsubscribe: <http://lists.sourceforge.net/lists/listinfo/tcljava- >user>, > <mailto:tcljava-user- >re...@li...?subject=3Dunsubscribe> > List-Archive: <http://lists.sourceforge.net/archives//tcljava-user/> > Date: Thu, 24 May 2001 05:09:46 +0000 > = > |
From: D. J. H. <dha...@mi...> - 2001-05-26 16:32:29
|
Tam Huynh wrote: > I tried loading the extension in the java program with > 'interp.eval("load ext.dll")'. Does the tclsh have to > call the java program in order for this to work? I'm > executing the program without running the tclsh. And > my exception is "invalid command load" This sounds very much like you are using Jacl, which will return that error message when the load command is called. Since Jacl doesn't know anything about C-based Tcl extensions, the load command has not been implemented there. I am not very familiar with instantiating a C-based Tcl interp from Java code using TclBlend, so I really can't help you there... -=- D. J. |
From: D. J. H. <dha...@mi...> - 2001-05-24 05:16:24
|
Tam Huynh wrote: > > Well see this is my problem for tclblend..the function gcd is in the > C tcl extension. If gcd is a C-based Tcl extension, then load it *exactly* the same way that you did in tclsh. Tclblend is simply a tclsh with the "java" extension. You still have all normal Tcl commands available to you, called exactly the same way. Tclblend's "java" extension simply adds the commands that begin java::*. You should only use the java::* commands to talk to Java classes, not to anything in C or C++. -=- D. J. |