On 12/03/13 14:43, edw...@kenworthy.info wrote:
Just to close this off, this is my (now working!) code, still needs some re-factoring (especially given Jim's last note re not needing watches in seesaw). It's basically a gui wrapped around the implementation of Life from Clojure Programming, with a few functions to add gliders, guns etc in the repl.


I only said that cos you can do something like this:

(def canvas "The paintable canvas - our board"
 (ssw/canvas
    :paint draw-tiles
    :id :canvas
:listen [:mouse-clicked (fn [^MouseEvent e] (when (and (not (:block? @knobs))
(realized? curr-game))
(canva-react @curr-game e)))] ))

If your state transformation doesn't depend on user input then your watch-approach is fine... :)

Jim

--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to