dialog.stk: always returning -1
recently i recompiled stk for redhat-5.0 with the source-distribution in
redhat/contrib to use my old tksketch program, so an old bug was there
again:
The dialog-box always returns -1 on my linux-box.
fixing patches follow (one of it only due to whitespace changes):
*** STk-3.1.1/Lib/dialog.stk Wed Sep 25 16:01:59 1996
--- /usr/local/lib/stk/3.1.1/STk/dialog.stk Mon Jan 12 10:39:51 1998
***************
*** 22,28 ****
(provide "dialog")
! (define stk::button-pressed #f)
;;
;; STk:make-dialog
;;
--- 22,28 ----
(provide "dialog")
! (define stk::button-pressed #f)
;;
;; STk:make-dialog
;;
***************
*** 55,60 ****
--- 55,61 ----
(old-focus (Tk:focus)))
(catch (Tk:destroy w))
+ (set! stk::button-pressed #f)
;; 1. Create the top-level window and divide it into top and bottom parts.
(define w.top (format #f "~A.top" w))
***************
*** 117,123 ****
(Tk:grab 'set w))
;; Add a binding that sets the result to -1 if the window is detroyed
! (bind w "<Destroy>" (lambda () (set! stk::button-pressed -1)))
(Tk:tkwait 'variable 'stk::button-pressed)
(if old-grab
--- 118,126 ----
(Tk:grab 'set w))
;; Add a binding that sets the result to -1 if the window is detroyed
! (bind w "<Destroy>" (lambda ()
! (unless stk::button-pressed
! (set! stk::button-pressed -1))))
(Tk:tkwait 'variable 'stk::button-pressed)
(if old-grab
Received on Mon Jan 12 1998 - 11:47:30 CET
This archive was generated by hypermail 2.3.0
: Mon Jul 21 2014 - 19:38:59 CEST