In the definition of new-timer
, you're trying to get the grd
field of cv
.
And although cv
is an instance of the class new-canvas%
, its type does not include that field. You need to create a new Class
type for new-canvas%
. By convention, it should be a capitalized version like New-Canvas%
.
(define-type New-Canvas% (Class ....))
(: new-canvas% New-Canvas%)
(define new-canvas% (class ....))
(: cv (Instance New-Canvas%))
(define cv (new .....))
The New-Canvas%
type you define using Class
should specify the new field grd
, as well as specifying that it's a subclass of Canvas%
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…