swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TCL/TK question


From: Marcus G. Daniels
Subject: Re: TCL/TK question
Date: 30 Nov 2001 12:05:00 -0700
User-agent: Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.7

>>>>> "JA" == J McKenzie Alexander <address@hidden> writes:

JA> When I run the program, I get the following error message:

JA> (Tcl -eval:) namespace ".top59.tab61.canvas.tabset -command

That's because the Tcl indexing/autoloading stuff isn't setup the 
way Swarm uses Tcl/Tk.  Try something like below, replacing paths
as appropriate.

I hope you realize that just because `wish' works on random Tcl code
is no guarantee or even suggestion that globalTkInterp will work.  Tk
is just what has been used so far for cross-platform widgets.

#import <simtools.h> // initSwarm
#import <tkobjc/global.h>
#include <misc.h>

int
main (int argc, const char **argv)
{
  initSwarm (argc, argv);

  putenv ("ITCL_LIBRARY=/opt/src/mgd/packages/lib/itcl3.2");
  [globalTkInterp eval: "load /opt/src/mgd/packages/lib/libitcl3.2.so"];
  [globalTkInterp eval: "load /opt/src/mgd/packages/lib/libitk3.2.so"];
  [globalTkInterp eval: "source 
/opt/src/mgd/packages/lib/iwidgets3.0.1/iwidgets.tcl"];
  [globalTkInterp eval: "source 
/opt/src/mgd/packages/lib/iwidgets3.0.1/scripts/tabset.itk"];
  [globalTkInterp eval: "source 
/opt/src/mgd/packages/lib/iwidgets3.0.1/scripts/tabnotebook.itk"];
  [globalTkInterp eval: "source main.tcl"];
  while (1) { while (GUI_EVENT_ASYNC ()) {} }  
  return 0;
}

/*
Local Variables:
compile-command: "$SWARMHOME/bin/libtool-swarm --mode=link 
/opt/src/mgd/packages/development/gcc/bin/gcc -Wall -Werror -O3 -D_GNU_SOURCE 
-DAPPNAME=testItcl -v -o testItcl -g -Wno-import -I$SWARMHOME/include/swarm 
-L$SWARMHOME/lib/swarm testItcl.m -lswarm -lobjc"
End:
*/  

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]