gcl-devel
[Top][All Lists]
Advanced

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

Re: [Gcl-devel] Re: [support #101761] Problem with tkconnect


From: Vadim V. Zhytnikov
Subject: Re: [Gcl-devel] Re: [support #101761] Problem with tkconnect
Date: Thu, 25 Sep 2003 12:52:42 +0300
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ru-RU; rv:1.4) Gecko/20030630

Very good news!  Patched tkMain.c works fine with both Tk 8.3
and 8.4 (not jammed by email patch attached).

Francisco, many thanks!

Camm Maguire writes:
Greetings, and thanks for your feedback!  Vadim -- can you please
check if this resolves the tk8.4 problem, and if so suggest a
configure test and appropriate patch depending on the tk version?
Francisco, et.al., please be aware that there is a known problem with
gcl and tk8.4 at present.  tk8.3 and earlier work just fine.

Take care,

address@hidden writes:


Support Request #101761, was updated on Wed 01/22/03 at 10:02
You can respond by visiting: http://savannah.gnu.org/support/?func=detailsupport&support_id=101761&group_id=879

Category: None
Status: Open
Priority: 5
Summary: Problem with tkconnect

By: fjesus
Date: Tue 09/23/03 at 08:04
Logged In: YES user_id=23417 Browser: Hello, I'm Francisco J. Martín (address@hidden). I started this support


request with the first problem about tkconnect. Last Sunday I spent 5


hours with my laptop looking for a bug in the gcl-tk directory and I


found it. It seems that the main tk window is built before the tk


initialization, so when this happens, the main window "already exists in


parent". To solve it I have commented the code related with the


"mainWindow" variable in the file tkMain.c





The patch I've built is the following:





diff -uNr gcl-2.6.0cvs-1/gcl-tk/tkMain.c gcl-2.6.0/gcl-tk/tkMain.c


--- gcl-2.6.0cvs-1/gcl-tk/tkMain.c 2003-02-15 01:38:27.000000000


+0100


+++ gcl-2.6.0/gcl-tk/tkMain.c 2003-09-23 09:30:00.000000000


+0200


@@ -71,9 +71,9 @@


* Global variables used by the main program:


*/




-static Tk_Window mainWindow; /* The main window for the


application. If


- * NULL then the application no longer


- * exists. */


+// static Tk_Window mainWindow; /* The main window for the


application. If


+// * NULL then the application no longer


+// * exists. */


static Tcl_Interp *interp; /* Interpreter for this application. */


char *tcl_RcFileName; /* Name of a user-specific startup


script


* to source if the application is being run


@@ -236,18 +236,18 @@


* Initialize the Tk application.


*/




- mainWindow = TkCreateMainWindow(interp, display, name/* , "Tk"


*/);


- if (mainWindow == NULL) {


- fprintf(stderr, "%sn", interp->result);


- exit(1);


- }


-#ifndef __MINGW32__


- if (synchronize) {


- XSynchronize(Tk_Display(mainWindow), True);


- }


-#endif


- Tk_GeometryRequest(mainWindow, 200, 200);


- Tk_UnmapWindow(mainWindow);


+// mainWindow = TkCreateMainWindow(interp, display, name/* ,


"Tk" */);


+// if (mainWindow == NULL) {


+// fprintf(stderr, "%sn", interp->result);


+// exit(1);


+// }


+// #ifndef __MINGW32__


+// if (synchronize) {


+// XSynchronize(Tk_Display(mainWindow), True);


+// }


+// #endif


+// Tk_GeometryRequest(mainWindow, 200, 200);


+// Tk_UnmapWindow(mainWindow);




/*


* Make command-line arguments available in the Tcl variables


"argc"


@@ -279,10 +279,10 @@


* interpreter.


*/




-#ifdef SQUARE_DEMO


- Tcl_CreateCommand(interp, "square", SquareCmd, (ClientData)


mainWindow,


- (void (*)()) NULL);


-#endif


+// #ifdef SQUARE_DEMO


+// Tcl_CreateCommand(interp, "square", SquareCmd, (ClientData)


mainWindow,


+// (void (*)()) NULL);


+// #endif




/*


* Invoke application-specific initialization.




----------------------------------------------------------------------

By: gambrill
Date: Sun 05/04/03 at 19:52
Logged In: NO Browser: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.0) Gecko/20020530

On my home machine (PIII running slackware 8.1 linux) I am


getting the same problem when I invoke (SI::TKCONNECT).



(SI::TKCONNECT)



Loading /usr/local/lib/gcl-2.5.2/gcl-tk/tkl.o


start address -T 0x846e000 Finished Loading


/usr/local/lib/gcl-2.5.2/gcl-tk/tkl.o



Error: SYSTEM:OPEN-NAMED-SOCKET [or a callee] requires less


than two arguments.


Fast links are on: do (si::use-fast-links nil) for debugging


Error signalled by SYSTEM:OPEN-NAMED-SOCKET.


Broken at SYSTEM:OPEN-NAMED-SOCKET. Type H: for Help




My distro came with a 2.4 ish version of gcl and it did and


still does (SI::TKCONNECT) just fine. Stayed up till about


3:00 am trying to figure this one out. Would love to hear if


you all have solved this!



----------------------------------------------------------------------
You can respond by visiting: http://savannah.gnu.org/support/?func=detailsupport&support_id=101761&group_id=879

_______________________________________________
 Message sent via/by Savannah
 http://savannah.gnu.org/








--
     Vadim V. Zhytnikov

      <address@hidden>
     <address@hidden>
--- tkMain-orig.c       2003-02-15 12:59:15 +0300
+++ tkMain.c    2003-09-25 12:02:39 +0400
@@ -71,9 +71,9 @@
  * Global variables used by the main program:
  */
 
-static Tk_Window mainWindow;   /* The main window for the application.  If
-                                * NULL then the application no longer
-                                * exists. */
+//static Tk_Window mainWindow; /* The main window for the application.  If
+//                              * NULL then the application no longer
+//                              * exists. */
 static Tcl_Interp *interp;     /* Interpreter for this application. */
 char *tcl_RcFileName;          /* Name of a user-specific startup script
                                 * to source if the application is being run
@@ -236,18 +236,18 @@
      * Initialize the Tk application.
      */
 
-    mainWindow = TkCreateMainWindow(interp, display, name/*  , "Tk" */); 
-    if (mainWindow == NULL) {
-       fprintf(stderr, "%s\n", interp->result);
-       exit(1);
-    }
-#ifndef __MINGW32__    
-    if (synchronize) {
-       XSynchronize(Tk_Display(mainWindow), True);
-    }
-#endif    
-    Tk_GeometryRequest(mainWindow, 200, 200);
-    Tk_UnmapWindow(mainWindow);
+//    mainWindow = TkCreateMainWindow(interp, display, name/*  , "Tk" */); 
+//    if (mainWindow == NULL) {
+//     fprintf(stderr, "%s\n", interp->result);
+//     exit(1);
+//    }
+//#ifndef __MINGW32__    
+//    if (synchronize) {
+//     XSynchronize(Tk_Display(mainWindow), True);
+//    }
+//#endif    
+//    Tk_GeometryRequest(mainWindow, 200, 200);
+//    Tk_UnmapWindow(mainWindow);
 
     /*
      * Make command-line arguments available in the Tcl variables "argc"
@@ -279,10 +279,10 @@
      * interpreter.
      */
 
-#ifdef SQUARE_DEMO
-    Tcl_CreateCommand(interp, "square", SquareCmd, (ClientData) mainWindow,
-           (void (*)()) NULL);
-#endif
+//#ifdef SQUARE_DEMO
+//    Tcl_CreateCommand(interp, "square", SquareCmd, (ClientData) mainWindow,
+//         (void (*)()) NULL);
+//#endif
 
     /*
      * Invoke application-specific initialization.

reply via email to

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