Hi,
I am a beginner at both ltk and tk and I am trying to convert a small programme from Tk to LTk.
Tk version: pack [button .b -text "Push Me" -background red -command {tk_messageBox -message "hello, world"}]
LTk version: (with-ltk () (let ((my-button (make-instance 'text :text "Push Me" :background :red :command (lambda () (message-box "Hello, world!" "message" 'ok 'info))))) (pack my-button)))
The Tk version works fine, whereas the LTk version gives the following error:
Invalid initialization argument: :BACKGROUND in call for class #<STANDARD-CLASS BUTTON>. See also: The ANSI Standard, Section 7.1.2 [Condition of type INITARG-ERROR]
On the other hand, there is no error if the :background line is removed. It's as if the :background keyword is only allowed for a few specific widgets, like the text widget. I also get errors if I try to set it with configure, as shown in the LTk manual, e.g. (configure my-button :background :blue)
What am I doing wrong ?
Any help is appreciated, I am using tk8.5 on debian squeeze, with sbcl 1.0.55, and the current release of ltk that ships with quicklisp. Sincerely, -- harven