Hi,
Are you supposed to be able to use the tile? slot to determine whether a tile widget is used?
I've been trying to convert some of the demos distributed with tk itself to celtk but because the tile widgets are used by default, you can't set any style properties.
I tried the code below but cells thinks the relief slot needs a parent. I get the error....
"New as of Cells3: parent must be supplied to make-instance of KEYWORD kid RELIEF"
(defmodel tk-labels (window) () (:default-initargs :title$ "Label Demonstration" :kids (c? (the-kids (mk-stack (:packing (c?pack-self "-side top")) (mk-label :wraplength "4i" :tk-justify 'left :text (concatenate 'string "Five labels are displayed below: three textual ones on the left and a bitmap" "label and a text label on the right. Labels are pretty boring " "because you can't do anything with them.")) (mk-row () (mk-stack (:pady 2 :layout-anchor 'w) (mk-label :text "First Label") (mk-label :tile? nil) :relief (c? 'raised) :text "Second Label, raised"
(mk-label :tile? nil :text "Third Label, sunken" :relief (c? 'sunken)))))))))
Am I going about this the wrong way?
Another problem I'm having is to do with packing. Are you really supposed to be able to express the layout of a whole app with just one pack statement? I'd like to have a panel of expander widgets each of which is packed so that it fills on the x-axis.
I expect that other panels would probably have different packing requirements but if you put more than one (c?pack-self ...) in an app, you get an error saying "don't specify packing here.
Cheers, Andy
Andy Chambers wrote:
Hi,
Are you supposed to be able to use the tile? slot to determine whether a tile widget is used?
Ugh, I honestly do not recall. I think setting that to t /tells/ celtk to use tile.
I know I tested tile on win32, seemed OK.
I've been trying to convert some of the demos distributed with tk itself to celtk but because the tile widgets are used by default, you can't set any style properties.
I tried the code below but cells thinks the relief slot needs a parent. I get the error....
"New as of Cells3: parent must be supplied to make-instance of KEYWORD kid RELIEF"
That is different, you just have to check all the macrology to make sure the :parent slot is picked up from *parent* or self or something,
(defmodel tk-labels (window) () (:default-initargs :title$ "Label Demonstration" :kids (c? (the-kids (mk-stack (:packing (c?pack-self "-side top")) (mk-label :wraplength "4i" :tk-justify 'left :text (concatenate 'string "Five labels are displayed below: three textual ones on the left and a bitmap" "label and a text label on the right. Labels are pretty boring " "because you can't do anything with them.")) (mk-row () (mk-stack (:pady 2 :layout-anchor 'w) (mk-label :text "First Label") (mk-label :tile? nil) :relief (c? 'raised) :text "Second Label, raised"
(mk-label :tile? nil :text "Third Label, sunken" :relief (c? 'sunken)))))))))
Am I going about this the wrong way?
Another problem I'm having is to do with packing. Are you really supposed to be able to express the layout of a whole app with just one pack statement?
I think rows and stacks supply useful packing by default which one overrirdes at will.
kenny
Am 22.03.2008 um 20:38 schrieb Ken Tilton:
Andy Chambers wrote:
Hi, Are you supposed to be able to use the tile? slot to determine whether a tile widget is used?
Ugh, I honestly do not recall. I think setting that to t /tells/ celtk to use tile.
Yes, that's how it is used. Some widgets do have slots and/or behavior that are only avaliable when Tile is used/loaded.
I know I tested tile on win32, seemed OK.
Mac OS X had problems with it a while back (Tile wasn't working with Tk 8.5 on OSX back then). I don't know what the status is today, though, as I still don't use Tile.
I've been trying to convert some of the demos distributed with tk itself to celtk but because the tile widgets are used by default, you can't set any style properties. I tried the code below but cells thinks the relief slot needs a parent. I get the error.... "New as of Cells3: parent must be supplied to make-instance of KEYWORD kid RELIEF"
That is different, you just have to check all the macrology to make sure the :parent slot is picked up from *parent* or self or something,
Yep. So all those mk- macros have to be enhanced to include ":fm- parent *parent*" in their definitions.
(defmodel tk-labels (window) () (:default-initargs :title$ "Label Demonstration" :kids (c? (the-kids (mk-stack (:packing (c?pack-self "-side top")) (mk-label :wraplength "4i" :tk-justify 'left :text (concatenate 'string "Five labels are displayed below: three textual ones on the left and a bitmap" "label and a text label on the right. Labels are pretty boring " "because you can't do anything with them.")) (mk-row () (mk-stack (:pady 2 :layout-anchor 'w) (mk-label :text "First Label") (mk-label :tile? nil) :relief (c? 'raised) :text "Second Label, raised" (mk-label :tile? nil :text "Third Label, sunken" :relief (c? 'sunken))))))))) Am I going about this the wrong way? Another problem I'm having is to do with packing. Are you really supposed to be able to express the layout of a whole app with just one pack statement?
I think rows and stacks supply useful packing by default which one overrirdes at will.
Yep. They do.
(defmodel tk-labels (window) () (:default-initargs :title$ "Label Demonstration" :kids (c? (the-kids (mk-stack (:packing (c?pack-self "-side top")) (mk-label :wraplength "4i" :tk-justify 'left :text (concatenate 'string "Five labels are displayed below: three textual ones on the left and a bitmap" "label and a text label on the right. Labels are pretty boring " "because you can't do anything with them.")) (mk-row () (mk-stack (:pady 2 ;; Not sure about this :layout-anchor 'w) ;; I always use explicit placing (mk-label :text "First Label") (mk-label :relief 'raised :text "Second Label, raised") (mk-label :text "Third Label, sunken" :relief 'sunken))))))))
... this should do it (warning: untested).
Cheers!
Frank
Frank Goenninger wrote:
Yep. So all those mk- macros have to be enhanced to include ":fm- parent *parent*" in their definitions.
Hmmm, my code base already has that. And it also had dependencies on Cello (those cl-ftgl package refs and others).
I just updated against FGs updates today and tho it said I had to resolve run.lisp I found no problem. :(
Anyway, I am about to commit my Celtk directory (with the working mk-* / parent stuff) so we may be in for a day or two of fun.
kt
Am 23.03.2008 um 18:04 schrieb Ken Tilton:
Frank Goenninger wrote:
Yep. So all those mk- macros have to be enhanced to include ":fm- parent *parent*" in their definitions.
Hmmm, my code base already has that. And it also had dependencies on Cello (those cl-ftgl package refs and others).
Oh, yeah - the CVS already has that. I did want to imply that the code in CVS needs to be changed. I had to change *my* code when going from Cells2 to Cells3.
I just updated against FGs updates today and tho it said I had to resolve run.lisp I found no problem. :(
No problem and ":(" ?
Anyway, I am about to commit my Celtk directory (with the working mk-
- / parent stuff) so we may be in for a day or two of fun.
Looking forward to it. ;-)
Frank
Am 23.03.2008 um 20:01 schrieb Frank Goenninger:
Am 23.03.2008 um 18:04 schrieb Ken Tilton:
Frank Goenninger wrote:
Yep. So all those mk- macros have to be enhanced to include ":fm- parent *parent*" in their definitions.
Hmmm, my code base already has that. And it also had dependencies on Cello (those cl-ftgl package refs and others).
Oh, yeah - the CVS already has that. I did want to imply that the code in CVS needs to be changed.
.. did *not* want to ...
Sigh.
Frank