Hi,
A bug is already open regarding a similary issue (#4881) on Savannah. A here
is simple work-around: when accessing fields or calling methods in a
lambda-expression inside the body of a method, I usually wrap the whole
method body with (let ((self (this))) ..):
(define-simple-class <A> ()
((workaround)
(let ((self (this))) ; <-----
(let ((fn (lambda (o)
(invoke self 'get-identity-property-name o)))) ; <-----
fn)))
...
((get-identity-property-name property-name)
(string-append property-name "Identity")))
Suggestion: maybe Kawa could do this automatically (or something similar),
so that a 'self' variable is always visible in method bodies?
Dominique