swarm-support
[Top][All Lists]
Advanced

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

Using libtclobjc with other widget sets (eg Tix)


From: Ken Cline
Subject: Using libtclobjc with other widget sets (eg Tix)
Date: Wed, 6 Aug 1997 15:30:40 -0400 (EDT)

Hi all,

First, has anyone tried to use other widget sets with Swarm?
In particular, I wish to integrate some of the Tix "mega-widgets"
into my GUI's.

Next, could someone explain to me the purpose of
`TclObjc_Init' function and the `tclObjcInitCmd' command?
(They are both defined in "tclObjc.m".)

Why I ask:

I put the following code, right after the `Blt_Init' call, 
in "TkExtra.m":

     if (Tix_Init(interp) == TCL_ERROR) {
        char *msg = Tcl_GetVar(interp, "errorInfo", TCL_GLOBAL_ONLY);
        if (msg == NULL) {
           msg = interp->result;
        }
        // [self error:msg];
        fprintf(stderr, "Tix_Init(interp) == TCL_ERROR: \n"
                        "  File: %s, Line: %d \n"
                        "  Error message: \n %s \n",
                         __FILE__, __LINE__, msg );
        // return NULL;        // shouldn't get here anyway
     }


However, when `Tix_Init' is executed I get the following
error:

      Warning: Tix script library version (pre 4.0.2)
        in "/opt/proj/swarm/needed-software/lib/tix4.1"
        does not match binary version (4.1.0).
        Please check your TIX_LIBRARY environment variable
        and your Tix installation.

      Tix_Init(interp) == TCL_ERROR: 
        File: TkExtra.m, Line: 45 
        Error message: 

      called "tixInitFileCmpt:Unix" with too many arguments
          invoked from within
      "unknown_pre_tclObjc $name $args"
          invoked from within
      "if {[llength [info procs unknown_pre_tclObjc]]} {
             unknown_pre_tclObjc $name $args
           } else {
             error "in unknown: invalid command name: ..."
          invoked from within
      "if {[string match address@hidden $name]} {
           return [uplevel tclObjc_msg_send $name $args]
         } else {
           if {[llength [info procs unknown_pre_tclObjc]]} ..."
          (procedure "unknown" line 2)
          invoked from within
      "tixInitFileCmpt:Unix"
          invoked from within
      "if [info exists tixPriv(isWindows)] {
              tixInitFileCmpt:Win
          } elseif [info exists env(WINDOWS_EMU_DEBUG)] {
              tixInitFileCmpt:Win
              tixWinFileEmu
          ..."
          (procedure "__tixInit" line 60)
          invoked from within
      "__tixInit"


Before you ask, setting the "TIX_LIBRARY" environment
variable does not affect the problem.  Also, tixwish seems
to work fine (demos and all) so I do not think this is a
problem with my Tix installation.

I do have a way to suppress the error above: (in libtclobjc)
I make the following modification to the Tcl.m:

  Change:
    if (Tcl_Init(interp) == TCL_ERROR || TclObjc_Init(interp) == TCL_ERROR)

  To:
    if (Tcl_Init(interp) == TCL_ERROR)

This change does eliminate the error and makes it possible
to create a tix widget.  However, the side affect of this
change is that I'm getting "invalid command name" errors
from the Blt widgets.  For example, from the Tcl Script
Stack Trace:

      invalid command name "address@hidden"
          while executing
      "address@hidden handleConfigureWidth: 320 Height: 320 "
          (command bound to event)

Btw, I am using libtclobjc-1.1b6 and "OBJECTS_AS_TCL_COMMANDS" 
is defined as 0, if that helps.

Any ideas on how to make both Tix and Blt happy?

Thanks in advance!


Ken.


_________________________________________________________
Ken Cline                             address@hidden
SAIC                                 VOICE (410) 571-0413
Annapolis, MD                          FAX (301) 261-8427




                  ==================================
   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]