[plt-scheme] Problems with class definition
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I would like to define a matrix class, the syntax check is okay, but the
object doesn't understand the rows method. Could anyone tell me
what's wrong with the definition.
Harald
(define matrix<%> (interface () rows))
(define matrix%
(class* object% (matrix<%>)
(init-field (rows-size 0) (cols-size 0))
(define/public rows
(case-lambda
((new-rows-size) (set! rows-size new-rows-size))
(() (rows-size))))
(super-instantiate ())))
(define m (instantiate matrix% ()))
(send rows m)
Welcome to DrScheme, version 202.
Language: Pretty Big (includes MrEd and Advanced) custom.
reference to undefined identifier: rows
>
-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0 (Build 288) Beta
iQA/AwUBPdQf8GgKkgULCgvHEQLNagCgjtVLFGJMHg4CcPxWoQ1I3dFewhoAoKQe
dtlenE5V55RdkoJXpnO1jJJH
=8svP
-----END PGP SIGNATURE-----