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(a)web.de <franks-muc(a)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
>
>
This is a feed back (with quetions) on my first experiments with cells/celtk
on mswindows and acl 7 trial.
- asdf installation of the lisp files is straight forward.
- Of course, I had to install tcl and other software I did not know before (e.g. darcs).
The togl.dll took me some time, but I had the spinning gears demo running after
about 4 hours. I was so happy!
- Documentation for cells exists and is helpful !!
After a study of ltktest-ci.lisp it was easy to do my own sample GUI with buttons, radios
and labels.
- I never did a gui before. I only went through the interface builder demo of allegro a while ago
and my impression was: I don't want to do that and avoid it as long as possible.
Now I'm completely surprised how easy it is to set up a gui, and the automatic
actions and updates made by cells are pure fun.
- The only problem I encountered so far is with the text entry widget:
alphanumeric key strokes get through to the entry field only occasionally.
May be only one of about five key strokes is shown in the entry field.
Backspace and cursor left/right work correctly, however.
This also happens in the moire demo of ltktest-ci.lisp.
What can I do to improve this ?
Summarized: celtk is great, and I would be happy about some help on my last
item above.
Frank Schorr
__________________________________________________________________________
Erweitern Sie FreeMail zu einem noch leistungsstärkeren E-Mail-Postfach!
Mehr Infos unter http://freemail.web.de/home/landingpad/?mc=021131