On Sat, Apr 10, 2010 at 10:54 AM, Gregg Williams <[email protected]> wrote:
> Because this new class, ToggleShape, has the added state of
> fIsPressed, is it possible to use proxy at all
The proxy body can close over the lexical scope:
(let [pressed? (ref false)]
(proxy [PPath] []
;; ...
(ref-set pressed? true) ;; write ref
@pressed? ;; read ref
;; ...
))
-Per
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
To unsubscribe, reply using "remove me" as the subject.