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. <br>I hope It to be useful for people. Please, say me how to improve It if you want.
<br>Bye!<br><br><div><span class="gmail_quote">2006/11/23, Felip Alàez Nadal <<a href="mailto:uu.nix.uu@gmail.com">uu.nix.uu@gmail.com</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello again:<br>You can convert between string and other types reading from memory:<br><br>(defun string2data ( str )<br> "Converts a string to the data type that the lisp reader could read on It."<br> (with-input-from-string ( stream str )
<br> (read stream )))<br><br>Maybe I've forgotten some parenthesis, I can't run my sbcl now, but that works for me.<br><br><br><div><span class="gmail_quote">2006/11/23, Bernhard Graf <<a href="mailto:bgraf@adartis.de" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
bgraf@adartis.de</a>>:</span><div><span class="e" id="q_10f1637d537b2f50_1"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I made it !!! :-)
<br><br>(defun scaler ()<br> (with-ltk ()
<br> (let* ((frm (make-instance 'frame))<br> (lab (make-instance 'label :master frm :text "Enter Name: "))<br> (ent (make-instance 'entry :master frm))<br> (age 0)<br> (textarea (make-instance 'frame))
<br> (txt (make-instance 'scrolled-text :master textarea))<br> (scl (make-instance 'scale :label "Age:" :digits 1 :from 10 :to<br>50 :tickinterval 10))<br> (but (make-instance 'button :master textarea :text "Push Me"
<br> :command (lambda () (append-text txt<br>(concatenate 'string "Hello, " (text ent ) (format nil ", you are ~D<br>years old" (value scl))<br> )))))
<br> )<br> (pack lab :side :left)<br> (pack ent :side :left)<br> (pack frm)<br> (pack scl)<br> (pack but)<br> (pack txt)<br> (pack textarea)
<br>
)))<br><br>Actually, while programming this seemingly simple example, I<br>recognized that LISP has 1001 arithmetic functions, but when it comes<br>to string-to-number-and-back conversion, it looks pretty bad.<br><br>Is that so or am I just only looking at the wrong places ?
<br>I found a parse-number library from Matthew Danish and use format to<br>convert from numbers back to strings, but the latter seems rather<br>ugly compared to actual "functions" that I know from Turbo Pascal and
<br>the former is quite good, but still not completely universal.<br><br>Greetings,<br>Bernhard<br><br>Am 23.11.2006 um 13:04 schrieb Peter Herth:<br><br>> Or just (value myscale) if myscale is the scale widget....<br>
><br>> Peter<br>> _______________________________________________<br>> ltk-user site list<br>> <a href="mailto:ltk-user@common-lisp.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
ltk-user@common-lisp.net</a><br>> <a href="http://common-lisp.net/mailman/listinfo/ltk-user" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://common-lisp.net/mailman/listinfo/ltk-user</a><br><br><br>_______________________________________________<br>ltk-user site list<br><a href="mailto:ltk-user@common-lisp.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
ltk-user@common-lisp.net</a><br><a href="http://common-lisp.net/mailman/listinfo/ltk-user" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://common-lisp.net/mailman/listinfo/ltk-user</a><br></blockquote></span></div></div><br><br clear="all"><br>-- <br><span class="sg">Felip Alàez Nadal
</span></blockquote></div><br><br clear="all"><br>-- <br>Felip Alàez Nadal