[plt-scheme] exception in local variable access from augmented method

From: Dimitris Vyzovitis (vyzo at media.mit.edu)
Date: Fri Dec 5 00:07:51 EST 2008

I am trying to mutate a local variable from an augmented method, but all I 
get is a horrible exception. Here is an example:
(define Frame%
   (class frame%
     (define foo 0)
     (define (can-close?)
       (printf "~a~n" foo)
       (set! foo (add1 foo))
     (augment can-close?)

(define xx (new Frame% (label "Foo") (width 300) (height 300)))
(send xx show #t)
(yield 'wait)

procedure application: expected procedure, given: 0; arguments were: 0 1

-- vyzo

Posted on the users mailing list.