On Wed, 26 Jan 2000, zhanglei wrote:
> Hi, everyone:
>
> I have a question about tcljava and namespace.
> I wrote Tcl extension using tcljava class lib
> (eg. public class Ext extends tcl.lang.Extension
> and add new commands using Interp.createCommand method)
> and made a tcl package index usin
Hi, everyone:
I have a question about tcljava and namespace.
I wrote Tcl extension using tcljava class lib
(eg. public class Ext extends tcl.lang.Extension
and add new commands using Interp.createCommand method)
and made a tcl package index using pkg_mkIndex.
After that, I load the extension usin
> > Here's what I'm trying to do with namespaces; maybe someone has an
> > alternative that would work better: The application I wrote allows users to
> > open multiple "documents" (I use the term generically here) that may contain
> > Tcl vars and procs specific to the document. Since there's o
>>>"Thomas McKay" said:
> Gotcha. The book I have Tcl/Tk by Welch has examples of namespace w/o the
> 'eval'. Is the book wrong? It says it describes Tcl 8.0. I just want to
> know what Tcl book to recommend to customers.
I thought I recognized your example. Indeed, the original namespac
On Wed, 3 Nov 1999, Thomas McKay wrote:
The book is wrong in this one example. This is a namespace feature that
was changed (in Tcl 8.1 I think). Originally, it seemed like a good idea
to be able to leave out the eval but I guess they reconsidered.
> Gotcha. The book I have Tcl/Tk by Welch has
[EMAIL PROTECTED]]
> Sent: Tuesday, November 02, 1999 8:47 PM
> To: [EMAIL PROTECTED]
> Subject: [Tcl Java] Re: [Tcl Java] namespace
>
>
> On Tue, 2 Nov 1999, Thomas McKay wrote:
>
> Nope, you need to use "namespace eval {...}"
>
> Try this.
>
> % names
On Tue, 2 Nov 1999, Thomas McKay wrote:
Nope, you need to use "namespace eval {...}"
Try this.
% namespace eval foo {
variable x
set x 12
}
% set foo::x
12
You can create a namespace like this "namespace eval foo {}".
If you run into problems, please check to see if you code
works in Tc
Should the following work?
namespace foo {
variable x
set x 12
proc y { a } {
puts $y
}
}
I get an unrecognized arg foo, should be eval, etc. Looking at the code it
sure seems like this won't work.
How do I create a namespace then?
---
Thomas McKay
Project Leader
Microcosm Technologies,