This is the mail archive of the insight@sourceware.cygnus.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

how to include iwidgets3.0


Dear Consultant:
  I've written an tcl program using Iwidgets 3.0 's
class ---- iwidgets::Fileselectionbox. If run it in
Itcl environment that is if I have insalled the Itcl
(my O.S is  Windows NT 4.0) ,there is no problem.But
if I write an C program to startup the Tcl file, some
problems will raised.
Problem 1:
 In my C file there have include the following
sentences:
int Tcl_AppInit(Tcl_Interp *interp) {

     
      if (Tcl_Init(interp) != TCL_OK)    {
          return TCL_ERROR;
        }


      if (Tk_Init(interp) != TCL_OK)     {
          return TCL_ERROR;
        }

      if (Itcl_Init(interp) != TCL_OK)   {
           return TCL_ERROR;
         }

      if (Itk_Init(interp) != TCL_OK)    {
           return TCL_ERROR;
         }


      return TCL_OK;
} 

In my main.tcl file, there have include the following
sentences:
package require Tcl 8.0
package require Tk 8.0
package require Itcl 3.0
package require Itk 3.0
package require Iwidgets 3.0


if {![find_iwidgets_library]} {
  tk_messageBox -title Error -message "Could not find
the Iwidgets libraries.
Got nameofexec: [info nameofexecutable]
Error(s) were: \n$errMsg" \
      -icon error -type ok
  exit
}

but the error messege "Error: error while autoloading
"iwidgets:Fileselectionbox": invalid command name
"class"" will appear.

Problem 2:
In my C file, if call the function
"freeconsole()",then
in my Tcl, all places including {open "|..."} being
executed, can not launch the program,error message
"Error: couldn't duplicate input handle:bad file
number" will appear. if not call the
"freeconsole",then behind my main interface there is
always an blank screen, but can launch the program.

problem 3:
if startup the program from C file, then my main menu
will display some curious characters if the original
character is chinese.

best wishes
huayan
2000-3-15


__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]