next up previous index
Next: Blocking Predicates Up: Prolog as the Previous: A More Advanced

Tk Events in the Prolog Debugger

  The ECLiPSe debugger does not handle any Tk events and so the display will not be updated when the debugger waits for a user command. The predicate tk_debug/0   modifies the ECLiPSe event handler for the event 252, so that Tk events are processed   before each debugger line is printed, e.g.

[eclipse 25]: tk([]), trace.

yes.
Debugger switched on - creep mode
[eclipse 26]: tcl 'button .b -text B; pack .b'.
  (1) 0  CALL   tcl 'button .b -text B; pack .b' (dbg)?- skip
  (1) 0  EXIT   tcl 'button .b -text B; pack .b' (dbg)?- creep

yes.
% Button B becomes visible
[eclipse 27]: tk_debug, tcl 'button .c -text C; pack .c'.
  (1) 0  CALL   tcl 'button .c -text C; pack .c' (dbg)?- skip
% Button C becomes visible already here
  (1) 0  EXIT   tcl 'button .c -text C; pack .c' (dbg)?- creep

yes.
In the first query the button becomes visible only when the execution returns to the top-level loop.   In the second one, the Tk events are processed before printing the EXIT port.

When the debugger prints its prompt and waits for user input, no Tk events are processed, the displayed widgets are not active.   To make them active during this block, simply type b to enter a recursive break level. To continue debugging, type Ctrl-D to leave the break level and return back to the debugger.



Micha Meier
Tue Jul 2 09:49:39 MET DST 1996