Reputation: 363
I am using this software called Simple Agent Pro, and it primarily uses TCL code. I was wondering anybody familiar with TCL or Sapro would be kind enough to tell me how to import the modules into the .tel file for Sapro.
When I try this:
package require tclOO.h
The program stops working. Any help would be appreciated.
Upvotes: 0
Views: 169
Reputation: 137577
I don't know Simple Agent Pro at all, but if you're doing a “guerilla install” of TclOO then you need a few things:
package require Tcl
returns).
configure
d sources somewhere will do. (You might need to hack the configure scripts a little bit.)Add the location that you installed TclOO to to the search path inside your Tcl 8.5 program.
lappend auto_path /the_dir/you_put/it_in
If you're using Windows, it's probably easiest to use forward slashes for this path anyway (this is a directory name that is always highly protected before it hits the OS, so that's OK).
Now you should be able to require/use the package.
package require TclOO
oo::class create Foo {
# etc.
}
Note that the case and exactly how you write it matters. The version you get ought to be at least 1.0 (earlier versions were for development only) which corresponds exactly with the API as supported in Tcl 8.6 (modulo a few things that require 8.6 for other reasons, such as being able to yield
inside a method which only works in 8.6 because that's where yield
was first defined).
Upvotes: 2
Reputation: 15163
You probably mean
package require TclOO
Case and other stuff is important there.
Next time you should also include the stack trace. If the program stops working, it should display that either as dialog or on stdout.
Upvotes: 0