From mboxrd@z Thu Jan 1 00:00:00 1970 From: hua yan To: gdb@sourceware.cygnus.com Cc: insight@sourceware.cygnus.com Subject: how to include iwidgets3.0 Date: Tue, 14 Mar 2000 18:43:00 -0000 Message-id: <20000315024243.24818.qmail@web4002.mail.yahoo.com> X-SW-Source: 2000-q1/msg00144.html 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