[ltk-user] ltk examples

Felip Alàez Nadal uu.nix.uu at gmail.com
Thu Nov 23 19:18:45 UTC 2006


I've forgotten to say that the source code I sent contains a
coordenatedCanvas widget, that extends ltk to draw into a 2-d graph, with
x-y axes, etc... It includes cldoc documentation for the widget.
I hope It to be useful for people. Please, say me how to improve It if you
want.
Bye!

2006/11/23, Felip Alàez Nadal <uu.nix.uu at gmail.com>:
>
> Hello again:
> You can convert between string and other types reading from memory:
>
> (defun string2data ( str )
>  "Converts a string to the data type that the lisp reader could read on
> It."
>   (with-input-from-string ( stream str )
>      (read stream )))
>
> Maybe I've forgotten some parenthesis, I can't run my sbcl now, but that
> works for me.
>
>
> 2006/11/23, Bernhard Graf < bgraf at adartis.de>:
> >
> > I made it !!! :-)
> >
> > (defun scaler ()
> >    (with-ltk ()
> >      (let* ((frm (make-instance 'frame))
> >            (lab (make-instance 'label :master frm :text "Enter Name: "))
> >            (ent (make-instance 'entry :master frm))
> >            (age 0)
> >            (textarea (make-instance 'frame))
> >            (txt (make-instance 'scrolled-text :master textarea))
> >            (scl (make-instance 'scale :label "Age:" :digits 1 :from 10
> > :to
> > 50 :tickinterval 10))
> >            (but (make-instance 'button :master textarea :text "Push Me"
> >                                 :command (lambda () (append-text txt
> > (concatenate 'string "Hello, "  (text ent ) (format nil ", you are ~D
> > years old" (value scl))
> >                                                                 )))))
> >            )
> >            (pack lab :side :left)
> >            (pack ent :side :left)
> >            (pack frm)
> >            (pack scl)
> >            (pack but)
> >            (pack txt)
> >            (pack textarea)
> > )))
> >
> > Actually, while programming this seemingly simple example, I
> > recognized that LISP has 1001 arithmetic functions, but when it comes
> > to string-to-number-and-back conversion, it looks pretty bad.
> >
> > Is that so or am I just only looking at the wrong places ?
> > I found a parse-number library from Matthew Danish and use format to
> > convert from numbers back to strings, but the latter seems rather
> > ugly compared to actual "functions" that I know from Turbo Pascal and
> > the former is quite good, but still not completely universal.
> >
> > Greetings,
> > Bernhard
> >
> > Am 23.11.2006 um 13:04 schrieb Peter Herth:
> >
> > > Or just (value myscale) if myscale is the scale widget....
> > >
> > > Peter
> > > _______________________________________________
> > > ltk-user site list
> > > ltk-user at common-lisp.net
> > > http://common-lisp.net/mailman/listinfo/ltk-user
> >
> >
> > _______________________________________________
> > ltk-user site list
> > ltk-user at common-lisp.net
> > http://common-lisp.net/mailman/listinfo/ltk-user
> >
>
>
>
> --
> Felip Alàez Nadal




-- 
Felip Alàez Nadal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ltk-user/attachments/20061123/533324a0/attachment.html>


More information about the ltk-user mailing list