Revision: 40472
          http://brlcad.svn.sourceforge.net/brlcad/?rev=40472&view=rev
Author:   starseeker
Date:     2010-09-05 16:05:25 +0000 (Sun, 05 Sep 2010)

Log Message:
-----------
try the non-C itcl/itk thing in MGED too - can't tell if it works yet.

Modified Paths:
--------------
    brlcad/branches/cmake/src/mged/attach.c
    brlcad/branches/cmake/src/mged/setup.c

Modified: brlcad/branches/cmake/src/mged/attach.c
===================================================================
--- brlcad/branches/cmake/src/mged/attach.c     2010-09-05 15:29:40 UTC (rev 
40471)
+++ brlcad/branches/cmake/src/mged/attach.c     2010-09-05 16:05:25 UTC (rev 
40472)
@@ -37,7 +37,6 @@
 #include "tcl.h"
 #ifdef HAVE_TK
 #  include "tk.h"
-#  include "itk.h"
 #endif
 
 #include "bu.h"
@@ -402,8 +401,8 @@
     }
 
     /* Initialize [incr Tk] */
-    if (Itk_Init(interp) == TCL_ERROR) {
-       return TCL_ERROR;
+    if (Tcl_Eval(interp, "package require Itk") != TCL_OK) {
+      return TCL_ERROR;
     }
 
     /* Import [incr Tk] commands into the global namespace */

Modified: brlcad/branches/cmake/src/mged/setup.c
===================================================================
--- brlcad/branches/cmake/src/mged/setup.c      2010-09-05 15:29:40 UTC (rev 
40471)
+++ brlcad/branches/cmake/src/mged/setup.c      2010-09-05 16:05:25 UTC (rev 
40472)
@@ -28,7 +28,6 @@
 /* system headers */
 #include <stdlib.h>
 #include <tcl.h>
-#include <itcl.h>
 #include <string.h>
 
 /* common headers */
@@ -526,22 +525,9 @@
        }
 
        /* Initialize [incr Tcl] */
-       Tcl_ResetResult(*interpreter);
-       if (init_itcl && Itcl_Init(*interpreter) == TCL_ERROR) {
-           if (!try_auto_path) {
-               try_auto_path=1;
-               /* Itcl_Init() leaves initialization in a bad state
-                * and can cause retry failures.  cleanup manually.
-                */
-               Tcl_DeleteCommand(*interpreter, "::itcl::class");
-               Tcl_DeleteNamespace(Tcl_FindNamespace(*interpreter, "::itcl", 
NULL, 0));
-               continue;
-           }
-           bu_log("Itcl_Init ERROR:\n%s\n", Tcl_GetStringResult(*interpreter));
-           break;
+       if (Tcl_Eval(interp, "package require Itcl") != TCL_OK) {
+         return TCL_ERROR;
        }
-       Tcl_StaticPackage(*interpreter, "Itcl", Itcl_Init, Itcl_SafeInit);
-       init_itcl=0;
 
        /* don't actually want to loop forever */
        break;


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to