question/suggestion re: <Tk-composite-widget>
[It seems this did not make it, the first time. My apologies if you
get it twice... -Moises]
Is there any reason why the method for #'initialize-composite-widget
for <Tk-composite-widget> is defined to be an error?
I found myself doing this:
Tk-composite-widget
/ \
/ \
TopLevel-composite AppWindow
\ /
\ /
TopLevel-AppWindow
So I need to invoke #'next-method from the init-composite-widget for
TopLevel-composite, to get my TopLevel-AppWindow to work. But any
other child who inherits singly from TopLevel-composite will break,
then. (Sure, in this case, I could just reverse the order in which I
inherit from TopLevel-composite and AppWindow, but that did not seem
like a good general solution...)
I replaced my initialize-composite-widget method for Tk-composite-widget
in Basics.stk to look like this:
(define *pedantic-STk-class-hierarchy* #t)
(define-method initialize-composite-widget ((c <Tk-composite-widget>) args parent)
;; it seems unreasonable to require that this be an error...
;; we could just not do anything here any more...
;; mlm_at_cs.brown.edu - 2/28/95
(when *pedantic-STk-class-hierarchy*
(error
"initialize-composite-widget: no method provided for ~S composite widget" c)))
so I can mmke it just do nothing, by setting the global variable
*pedantic-STk-class-hierarchy* to #f. Was there a better solution for
this? I figured I could also have looked to see which other methods
would be invoked after the init-composite-widget for
TopLevel-composite, but that seemed much too ugly...
Moises
-----------------------------------------------------------------------------
Internet/CSnet: Moises_Lejter_at_brown.edu BITNET: mlm_at_browncs.BITNET
UUCP: ...!uunet!cs.brown.edu!mlm Phone: (401)863-7671
USmail: Moises Lejter, Box 1910 Brown University, Providence RI 02912
Received on Wed Mar 01 1995 - 21:31:15 CET
This archive was generated by hypermail 2.3.0
: Mon Jul 21 2014 - 19:38:59 CEST