On Tue, Mar 24, 2009 at 4:04 PM, David Mattli <d...@mattli.us> wrote:
>                     (mk-entry
>                      :md-name :hostname
>                      :text (c-in "localhost")
>                      :max-length 20)

You can add ":auto-update t" to mk-entry options. This will make it
update on every keypress. The comment in the source claims that this
is broken, but when I tried it worked for me, and I don't see a reason
why it should not work, it is just a callback like any other.

To retrieve the value on button press you would have to either drop
down to gtk interface and read it from there. I don't thing there is a
reasonable way to manually trigger a callback, and it would require
getting the gtk side object pointer anyway... This doesn't seem to be
a very good idea, but here goes:

(mk-button :md-name :go :label "Set hostname!"
           :on-clicked (callback (widget event data)
                         (with-widget (w :hostname)
                           (with-integrity (:change)
                             (setf (value w)
                                   (cgtk::get-gtk-string
(gtk-ffi::gtk-entry-get-text (id w))))))
                         (trc "you clicked the button?!")))

And I am not even sure what exactly arguments to with-integrity do.

Regards,
Jakub Higersberger

_______________________________________________
cells-gtk-devel site list
cells-gtk-devel@common-lisp.net
http://common-lisp.net/mailman/listinfo/cells-gtk-devel

Reply via email to