problem with :active slots

From: Andrew Dorrell <dorrell_at_ihf.uts.edu.au>
Date: Wed, 15 Jul 1998 14:26:41 +1000

Hi,

I need to be able to set the fraction slot on a <Paned> composite.
But setting this slot doesn't update the widget - you need to call
place-grip to do that. As the new module system hides this method
I thought I'd try and get it going using an active slot. So I
modified Paned.stklos:


> (fraction :init-keyword :fraction)

< (fraction :init-keyword :fraction
< :allocation :active
< :after-slot-set! (lambda(o v) (place-grip o)))

which is similar to how the new <gauge> widget is set up. It doesn't
work for me however:


Welcome to the STk interpreter version 3.99.2 [Linux-2.X-ix86]
Copyright © 1993-1998 Erick Gallesio - I3S - CNRS / ESSI <eg_at_unice.fr>
STk> (require "Tk-classes")
"Tk-classes"
STk> (define h (make <HPaned> :width 300 :height 400))

*** Error at line 97 of file
/home2/andrew/lib/stk/3.99.2/STk/Paned.stklos:
Allocation ":active" is unknown


What am I doing wrong?

Thanks in advance,
-- 
Mr Andrew Dorrell                                *
Faculty of Engineering             /---\  Whoo?      *
University of Technology, Sydney   (o o) /     *
AUSTRALIA                          ( : )            .
                                    ^ ^
                                                    *
Received on Wed Jul 15 1998 - 06:28:03 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST