[cells-gtk-devel] making a text-buffer inputp

Kenny Tilton ktilton at nyc.rr.com
Fri May 13 21:50:34 UTC 2005



Jonathan Heusser wrote:

>Forgive my very newbie question.
>I'm trying to change a text-buffer to the value of an entry with a click
>on a button.
>
>My button code looks like this:
>(mk-button :md-name :b :label "send" :on-clicked
>                (callback (w e d)
>                  (setf (buffer (upper self buttons))
>                    (md-value (fm-other :entry))))
>
>After pressing enter on this button I got the error that the buffer has
>to be initialized as inputp.
>Then I tried to initialize it as follows (it was just a guess):
>
Good guess.

> (buffer :accessor buffer :initarg :buffer
>       :initform (c-input () (mk-text-buffer
>              :text (format nil "bla"))
>
>But it's still not working as it should. Either my setf on the buffer is
>wrong or this initialisation.
>Can you lead me on the right track?
>
Sure. Some questions:

1. Can you define "still not working"? Runtime error? Incorrect result? 
No result?

2. Are you using the same SETF form?

3. Should buffer just be a string? I do not have Cells-gtk in front of 
me. If not, is the md-value of the :entry widget a string or a 
text-buffer instance?

kenny





More information about the cells-gtk-devel mailing list