Try this:

     (mk-entry :id :my-entry
            :md-value (c-in nil)) ;; instead of (c-in "abc")

Have not investigated why, but with (c-in "abc") I did not get many keystrokes either, but changing to (c-in nil) seems to have done the trick.

Next task would be to figure out how to initialize an entry widget to something other than nil, which is a requirement of such widgets.

First let's find out if (c-in nil) gets the keystrokes recognized.

kt



On 9/3/06, franks-muc@web.de <franks-muc@web.de> wrote:

>
> Anyway, it will be interesting to see if your entry field (and your ltktest-ci execution) work given the new code in Cells and Celtk. If not or if the problem comes back I think a question to the Tcl/Tk list will be in order as to when keyevents can happen but not get seen by the widget as evidenced by the widget text and (reasonably enough) "trace write"s.
>
>

I downloaded the new tarball, deleted all binaries, started fresh.

The behaviour of  ltktest-ci is unchanged. May be the success rate of 1/5 was too optimistic in my
first post, but it is better than 1/20. It appears to be completely random. Sometimes two
successive key strokes get through.

My sample model as attched here has a success rate which is much less than 1/20.

(defmodel my-test (window)
  ((my-mode :accessor my-mode :initform (c? (evenp (selection (fm! :my-selector))))))
  (:default-initargs
      :id :my-test-id
    :kids (c? (the-kids
               (mk-stack ("stack"  :packing (c?pack-self "-side bottom") :relief 'ridge)
                         (mk-entry :id :my-entry
                                   :md-value (c-in "abc"))
                         (mk-row ( "row"  #| :packing (c?pack-self "-side bottom") |# :relief 'ridge)
                                 (mk-label :text (c? (format nil "selection: ~a"  (selection (fm^ :my-selector)))))
                               (mk-label :text "Labeltext")
                               (mk-button-ex ("Reset" (setf (selection (fm^ :my-selector)) 1)))
                               (mk-stack ((c? (format nil "current selection: ~a" (^selection))) :id :my-selector :selection (c-in 1) :relief 'ridge)
                                         (mk-radiobutton-ex ("selection 1" 1))
                                         (mk-radiobutton-ex ("selection 2" 2))
                                         (mk-radiobutton-ex ("selection 3" 3))
                                         (mk-radiobutton-ex ("selection 4" 4)))
                               (mk-label :text (c? (format nil "selection: ~a"  (selection (fm^ :my-selector)))))
                               ))))))

(defobserver my-mode ((self my-test) new-value old-value old-value-bound-p)
  (format t "~% mode changed from ~a to ~a" old-value new-value))

(run-window 'my-test)



_______________________________________________________________________
Viren-Scan für Ihren PC! Jetzt für jeden. Sofort, online und kostenlos.
Gleich testen! http://www.pc-sicherheit.web.de/freescan/?mc=022222