Thanks Ken,
I know, documenting all features of ltk is an awful lot of work, but maybe if it is divided into pieces and done by several people it is manageable with not too much effort. And, as you probably know, Peter is German (as I am, too) and Germans opt for perfection ;-)
By the way, I have meanwhile been able to solve the problem myself, as I found a bigger piece of code that is written using ltk (clmail : http://hocwp.free.fr/glmf/article_clmail/clmail-v2/) and by analyzing this I was able to use the already implemented function "scrolled- text". So Peter has obviously already implemeted it.
As looking at software that is already utilizing ltk is the best way to find out how to use it, do other members of the list know of more examples like clmail ?
Maybe another "rather unspecific" question, but if we get together enough pieces of code (maybe even from each other) this would be the best way to help each other not to "reinvent the wheel")
Greetings, Bernhard Graf
Bernhard Graf Geschäftsführer
adARTIS e.K. Im Hansengarten 9 D-56412 Hübingen Tel: 06439-9123 0 Fax: 06439-9123 99
www.adartis.de bgraf@adartis.de
On 11/17/06, Bernhard Graf bgraf@adartis.de wrote:
Thanks Ken, I know, documenting all features of ltk is an awful lot of work, but maybe if it is divided into pieces and done by several people it is manageable with not too much effort. And, as you probably know, Peter is German (as I am, too) and Germans opt for perfection ;-)
By the way, I have meanwhile been able to solve the problem myself, as I found a bigger piece of code that is written using ltk (clmail : http://hocwp.free.fr/glmf/article_clmail/clmail-v2/) and by analyzing this I was able to use the already implemented function "scrolled-text". So Peter has obviously already implemeted it.
Awesome. I had a feeling.
As looking at software that is already utilizing ltk is the best way to find
out how to use it, do other members of the list know of more examples like clmail ?
Maybe another "rather unspecific" question, but if we get together enough pieces of code (maybe even from each other) this would be the best way to help each other not to "reinvent the wheel")
Does LTK still just offer the spinning lines demo? I have a "lotsa-widgets" demo for my Celtk (once a fork, now wholly independent of Ltk) that tries to cover everything, and the Vasily Margioulas delivered an incredibly comprehensive suite of demos with Cells-Gtk:
http://common-lisp.net/project/cells-gtk/screenshots.html
Is that what you had in mind? Which ones will you be doing first? :)
Happy to hear things are going perfectly well for you. :)
ken
Hi Ken,
yes, the only demo for ltk is in fact the spinning lines demo. Demo's like the one you provide for your Celtk or Cells-TK would be really great for ltk. The reason why I use ltk is simply that I want to do it on my PowerBook and Cells and everything related to it seem only be supported on Linux and Windows. Or has anyone got it working on a Mac as well, either on openMCL or SBCL ?
I am also stuck again with my ltk trials. I know that e.g. "entry" delivers its content as text and this can be used with (text entry_variable) It seems to come from a tktextvariable, according to the source in ltk.lisp. I was able to display a slider (scale), but I have no idea on how to get its current value. What type is it ? Which method needs to be used to get it ? If only these informations were given in the ltk documentation, it would be really helpful. Unfortunately, the source seems to be the only documentation. Nice for Lisp geeks, but problematic for people like me ;-)
Greetings,
Bernhard
PS : I heard that you are designing a math tutorial software for kids. If you ever need someone to translate it to German, give me a call ;-)
Am 17.11.2006 um 19:16 schrieb Ken Tilton:
On 11/17/06, Bernhard Graf bgraf@adartis.de wrote: Thanks Ken,
I know, documenting all features of ltk is an awful lot of work, but maybe if it is divided into pieces and done by several people it is manageable with not too much effort. And, as you probably know, Peter is German (as I am, too) and Germans opt for perfection ;-)
By the way, I have meanwhile been able to solve the problem myself, as I found a bigger piece of code that is written using ltk (clmail : http://hocwp.free.fr/glmf/article_clmail/clmail-v2/) and by analyzing this I was able to use the already implemented function "scrolled-text". So Peter has obviously already implemeted it.
Awesome. I had a feeling.
As looking at software that is already utilizing ltk is the best way to find out how to use it, do other members of the list know of more examples like clmail ?
Maybe another "rather unspecific" question, but if we get together enough pieces of code (maybe even from each other) this would be the best way to help each other not to "reinvent the wheel")
Does LTK still just offer the spinning lines demo? I have a "lotsa- widgets" demo for my Celtk (once a fork, now wholly independent of Ltk) that tries to cover everything, and the Vasily Margioulas delivered an incredibly comprehensive suite of demos with Cells-Gtk:
http://common-lisp.net/project/cells-gtk/screenshots.html
Is that what you had in mind? Which ones will you be doing first? :)
Happy to hear things are going perfectly well for you. :)
ken
ltk-user site list ltk-user@common-lisp.net http://common-lisp.net/mailman/listinfo/ltk-user
Bernhard Graf Geschäftsführer
adARTIS e.K. Im Hansengarten 9 D-56412 Hübingen Tel: 06439-9123 0 Fax: 06439-9123 99
www.adartis.de bgraf@adartis.de
On 11/22/06, Bernhard Graf bgraf@adartis.de wrote:
Hi Ken, yes, the only demo for ltk is in fact the spinning lines demo. Demo's like the one you provide for your Celtk or Cells-TK would be really great for ltk. The reason why I use ltk is simply that I want to do it on my PowerBook and Cells and everything related to it seem only be supported on Linux and Windows.
Nope. :)
Or has anyone got it working on a Mac as well, either on openMCL or SBCL ?
Yep. :) I had the whole thing working on OpenMCL a while back (when it was atop Freeglut) and someone helping now is running it on OS X via SBCL.
I am also stuck again with my ltk trials. I know that e.g. "entry" delivers
its content as text and this can be used with (text entry_variable) It seems to come from a tktextvariable, according to the source in ltk.lisp. I was able to display a slider (scale), but I have no idea on how to get its current value. What type is it ? Which method needs to be used to get it ? If only these informations were given in the ltk documentation, it would be really helpful. Unfortunately, the source seems to be the only documentation. Nice for Lisp geeks, but problematic for people like me ;-)
I think one meta-help I can give you is to take something like your scale issue and look it up on the tcl/tk site itself. I used the ActiveTcl page itself:
http://aspn.activestate.com/ASPN/docs/ActiveTcl/8.4/at.pkg_index.html
Find out how a tcl user would get the scale value and work backwards, searching the Ltk source for whatever that is. Hang on -- had a flash -- it might even be that the path to the scale is the variable you read (going on some memory, some common sense) so you just need to fo the LTk to read the variable .this.that.my-scale
Back to my meta-help, I think the LTk doc itself does recommend using Tcl/Tk doc in conjunction with LTk examples/doc/source. Kind of a delicat balancing act where you have to guess if you have a Lisp, LTk, or Tk issue.
PS : I heard that you are designing a math tutorial software for kids. If you ever need someone to translate it to German, give me a call ;-)
OK. I almost wrote "the whole shebang" earlier, then backed off because of the slanginess. Know that one? :)
kt
From: Nicolas Neuss neuss@mathematik.uni-karlsruhe.de Subject: Re: [ltk-user] ltk examples To: Talk about Ltk the Lisp Toolkit ltk-user@common-lisp.net Date: 22 Nov 2006 18:50:26 +0100 Organization: IPM
Bernhard Graf bgraf@adartis.de writes:
Hi Ken,
yes, the only demo for ltk is in fact the spinning lines demo. Demo's like the one you provide for your Celtk or Cells-TK would be really great for ltk. The reason why I use ltk is simply that I want to do it on my PowerBook and Cells and everything related to it seem only be supported on Linux and Windows. Or has anyone got it working on a Mac as well, either on openMCL or SBCL ?
I am also stuck again with my ltk trials. I know that e.g. "entry" delivers its content as text and this can be used with (text entry_variable) It seems to come from a tktextvariable, according to the source in ltk.lisp. I was able to display a slider (scale), but I have no idea on how to get its current value. What type is it ? Which method needs to be used to get it ? If only these informations were given in the ltk documentation, it would be really helpful. Unfortunately, the source seems to be the only documentation. Nice for Lisp geeks, but problematic for people like me ;-)
Greetings,
Bernhard
PS : I heard that you are designing a math tutorial software for kids. If you ever need someone to translate it to German, give me a call ;-)
I also asked once about some problem on this list recently, and only Ken answered. His answer did not solve my problem, and I decided that other things were more important to me at the moment. I am somewhat astonished that this list seems so abandoned by LTk developers and users. Maybe you could find more help at comp.lang.lisp?
Nicolas
I also asked once about some problem on this list recently, and only Ken answered. His answer did not solve my problem, and I decided that other things were more important to me at the moment. I am somewhat astonished that this list seems so abandoned by LTk developers and users. Maybe you could find more help at comp.lang.lisp?
I think Ken's advice to Bernhard is the best bet. My selected-text issue posted last week was found by reversing out some code I'd written in TkInter (Python) a long while back which in turn was derived from the Tcl/Tk docs. It then became fairly obvious what Tcl code I needed to push from Lisp.
(Obviously this is not always the most productive way to work...).
I'm sort of wondering if I should switch over to Cello/Cells/Gtk instead as people seem quite interested in it. I only really picked Ltk as it loaded first time without any errors. In general the only real problem I'm having with CL since starting is getting libraries to work (although this is most likely incompetence on my part so don't read it as a complaint!).
Phil
On 11/22/06, Phil Armitage philip.armitage@gmail.com wrote:
I also asked once about some problem on this list recently, and only Ken answered. His answer did not solve my problem, and I decided that other things were more important to me at the moment. I am somewhat
astonished
that this list seems so abandoned by LTk developers and users. Maybe
you
could find more help at comp.lang.lisp?
I think Ken's advice to Bernhard is the best bet. My selected-text issue posted last week was found by reversing out some code I'd written in TkInter (Python) a long while back which in turn was derived from the Tcl/Tk docs. It then became fairly obvious what Tcl code I needed to push from Lisp.
(Obviously this is not always the most productive way to work...).
I don't know. To a certain extent, if library gateway-to-whatever works just like "whatever", then we have a huge win: all the doc for whatever works for gateway-to-whatever. Where "whatever" is a massive library, well, one exactly wants the gateway to be transparent.
Remember, this is opensource, with no reward to the provider for the massive eeffort first to conceive a gratuitous new API atop whatever, and then to document it. Speaking of which...
elsewhere someone mavrelled at the apparent abandonment of LTk. I have no insight on that, but I do know that the risk/reward on Lisp open source is borderline. Possibly related?
I think the deal is this: a GUI-seeker has Cells-gtk, Celtk, CelloTk (Celtk+Togl), and not much else to choose from if you are looking for open, portable, serious widget sets. wxCL? That's an unknown to me. Opensource works by people contributing, not complaining. Pick one and dive in. /Possibly/ Cells-Gtk is the one that comes off the shelf most cleanly.
I'm sort of wondering if I should switch over to Cello/Cells/Gtk
instead as people seem quite interested in it.
Really? I have seen one or two people wander thru Celtk, no more. LTk seems to be far more popular, tho I must concede the recent Silence of the List is disconcerting. Cello is really raw and unfinished. For the most complete functionality CelloTk (a recent carve-out) gives you all of Tk and Togl for OpenGL.
I only really picked
Ltk as it loaded first time without any errors.
Never a bad thing. :)
In general the only
real problem I'm having with CL since starting is getting libraries to work (although this is most likely incompetence on my part so don't read it as a complaint!).
No, not your fault, nor anyone's. It was agonizing porting one of my big C apps between C compilers on the same platform. Research shows it is nine times harder to deliver a portable library than to develop it fpr oneself. Moral: do not expect to find many cleanly portable libraries. The good news is that just a little effort will be needed to get a library running on a new system, because Lisp really is mostly portable. But, not knowing that, it is easy to give up on a lib that does not build out of the box -- and I have done so many a time.
kt
(Obviously this is not always the most productive way to work...).
I don't know. To a certain extent, if library gateway-to-whatever works just like "whatever", then we have a huge win: all the doc for whatever works for
I agree to an extent but you do need to know which parts of the underlying library are not implemented or at least how to get at them. Thankfully Peter helps us here in two ways as firstly he provides details of extending Ltk and secondly the code is nicely written so even a new CL user like me can have a go at adding a function (as I did with 81% success!).
Remember, this is opensource, with no reward to the provider for the massive eeffort first to conceive a gratuitous new API atop whatever, and then to document it. Speaking of which...
Yes, I totally agree and Ltk is great as it's so easy to use. I was mainly concerned that the list was so quiet. Maybe I could help. The only thing stopping me is that I've only been programming CL for a couple of months and while I had little trouble mapping one 'missing' Tk function, there is the danger of naive optimism derived from such a simple triumph!
elsewhere someone mavrelled at the apparent abandonment of LTk. I have no insight on that, but I do know that the risk/reward on Lisp open source is borderline. Possibly related?
I hope to contribute something at some point. I've already 'taken' a lot from the community: reading c.l.l, downloaded a free Lisp, a couple of OSS libraries and the free books. So I feel I would like to write something and put it out there. But it took me 8 years to really learn C++ and so it will probably be a little while before I'm really capable of producing anything decent in Lisp (excuses, excuses...).
Phil
Hi Nicolas,
On 22 Nov 2006 21:04:51 +0100, Nicolas Neuss neuss@math.uka.de wrote:
From: Nicolas Neuss neuss@mathematik.uni-karlsruhe.de Subject: Re: [ltk-user] ltk examples To: Talk about Ltk the Lisp Toolkit ltk-user@common-lisp.net Date: 22 Nov 2006 18:50:26 +0100 Organization: IPM
I also asked once about some problem on this list recently, and only Ken answered. His answer did not solve my problem, and I decided that other things were more important to me at the moment. I am somewhat astonished that this list seems so abandoned by LTk developers and users. Maybe you could find more help at comp.lang.lisp?
Well, I can certainly say, that this list is not abandoned by the Ltk developers. I read every post and if no one else answers, I try to answer the question. But yes the Ltk mailing list could see a little bit more traffic, but that depends on all the subscribers to contribute content.
Peter
Hi Bernhard,
yes, the only demo for ltk is in fact the spinning lines demo. Demo's like the one you provide for your Celtk or Cells-TK would be really great for ltk. The reason why I use ltk is simply that I want to do it on my PowerBook and Cells and everything related to it seem only be supported on Linux and Windows. Or has anyone got it working on a Mac as well, either on openMCL or SBCL ?
I am also stuck again with my ltk trials. I know that e.g. "entry" delivers its content as text and this can be used with (text entry_variable) It seems to come from a tktextvariable, according to the source in ltk.lisp. I was able to display a slider (scale), but I have no idea on how to get its current value. What type is it ? Which method needs to be used to get it ? If only these informations were given in the ltk documentation, it would be really helpful. Unfortunately, the source seems to be the only documentation. Nice for Lisp geeks, but problematic for people like me ;-)
There is some Ltk documentation on the Ltk webpage (actually it even mentions the answer to your question...) but I have to agree that I could spend more time on it eventually. In general, all widgets where it is appropriate, either have the (settable) accessor "text" or "value", so for entries you can just read/set it with (text entry) assuming entry is your widget instance. All the widgets which inherit from tktextvariable have the text accessor, those who inherit from the tkvariable class have the value accessor.
Peter
Hi Peter,
thank you for your answer. Now that you point me into the right direction, I am able to see ... :-)
3.11 Generic functions The following generic functions are defined on widgets: (value widget) Reads/sets the value of the widget. Applicable for: check-button, radio-button, menucheckbutton, menuradiobutton, scale. (text widget) Reads/sets the text of the widget. Depending on the wid- get, this can be text displayed on the widget (button) or contained as data (entry). Applicable for button, check-button, entry, label, labelframe, spinbox, text.
I actually must have overseen this paragraph. I always searched for this info where the functions were documented.
Now I can proceed.
Thanks a lot, Bernhard
There is some Ltk documentation on the Ltk webpage (actually it even mentions the answer to your question...) but I have to agree that I could spend more time on it eventually. In general, all widgets where it is appropriate, either have the (settable) accessor "text" or "value", so for entries you can just read/set it with (text entry) assuming entry is your widget instance. All the widgets which inherit from tktextvariable have the text accessor, those who inherit from the tkvariable class have the value accessor.
Peter _______________________________________________ ltk-user site list ltk-user@common-lisp.net http://common-lisp.net/mailman/listinfo/ltk-user
I was able to display a slider (scale), but I have no idea on how to get its current value. What type is it ? Which method needs to be used to get it ?
So here is the Tcl/Tk, conveniently tested from a win32 command console:
wish85
(Tcl console opens along with Tk window. In the Tcl console...) scale .x1 -from 10 -to 100 pack .x1 .x1 get
http://aspn.activestate.com/ASPN/docs/ActiveTcl/8.4/tcl/TkCmd/scale.htm
You could also say:
scale .x1 -variable x1-value
And then make x1-value the text variable of a label and get that working to have some fun. Once (and perhaps not before) all that is working, replicate in LTk.
hth, kenny
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@common-lisp.net http://common-lisp.net/mailman/listinfo/ltk-user
Hello: I believe this is not what you call examples, but this is an application I developed for a physics matter. I also wrote a comic viewer using ltk. It's at common-lisp.net, but at the moment I have problems with utf and that version doesn't work. The newer versions at my box work perfectly. I believe I could write some little demos If you want, say what you want and give me some time. I'm a poor student. Bye!
PD: The application messages are written in catalonian. Maybe you have problems with non-ascii characters.
2006/11/23, Bernhard Graf bgraf@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@common-lisp.net http://common-lisp.net/mailman/listinfo/ltk-user
ltk-user site list ltk-user@common-lisp.net http://common-lisp.net/mailman/listinfo/ltk-user
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@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@common-lisp.net http://common-lisp.net/mailman/listinfo/ltk-user
ltk-user site list ltk-user@common-lisp.net http://common-lisp.net/mailman/listinfo/ltk-user
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@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@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@common-lisp.net http://common-lisp.net/mailman/listinfo/ltk-user
ltk-user site list ltk-user@common-lisp.net http://common-lisp.net/mailman/listinfo/ltk-user
-- Felip Alàez Nadal