What I am trying to do: I have a preexisting game that uses LTK for its user interface. The game contains numerous buttons, canvases, and windows. I would like to access the GUI from a remote computer through ltk-remote, as described in section 7 of the linked manual.
What I did: I quickloaded ltk-remote, ran (with-remote-ltk 9898 form)
, the form being a function launching the game, then ran wish remote.tcl localhost 9898
in a terminal. (The port number 9898 is arbitrary.) This led to the problem detailed by user @Sim in this question, which I resolved using their answer. This may have caused problems (as Sim suggests).
The problem: The GUI starts running, but only reacts partially to some events. The easiest isolated effect is that when an event prompts a new window opening, it does not open. If there are more windows to be opened, all except for the first one will open. This is a minimal example:
(ltk:with-remote-ltk 9898 nil
(let ((b (make-instance 'ltk:button)))
(setf (ltk:command b) #'(lambda ()
(make-instance 'ltk:toplevel :title "title 1")
(make-instance 'ltk:toplevel :title "title 2")
(make-instance 'ltk:toplevel :title "title 3")))
(ltk:grid b 0 0)))
Clicking the button only opens "title 2" and "title 3".
I haven't seen any evidence of anybody using ltk-remote successfully, and thus the library itself could be bugged. Could anybody share their experiences?