Re: separating ui and content in clojure

2010-03-21 Thread Stuart Sierra
Here's an example I wrote about separating GUI from content using Agents: http://stuartsierra.com/2010/01/08/agents-of-swing -SS On Mar 20, 11:11 am, strattonbrazil wrote: > I'd like to separate my ui Swing/JOGL from the content, so my code is > relatively unaware of the UI around it.  For examp

Re: separating ui and content in clojure

2010-03-21 Thread Mike Meyer
[Context recovered from top-posting.] On Sun, 21 Mar 2010 10:31:58 -0700 Josh Stratton wrote: > On Sat, Mar 20, 2010 at 8:51 AM, Mike Meyer > wrote: > > On Sat, 20 Mar 2010 08:11:49 -0700 (PDT) > > strattonbrazil wrote: > > > >> I'd like to separate my ui Swing/JOGL from the content, so my code

Re: separating ui and content in clojure

2010-03-21 Thread Josh Stratton
An atom seems appropriate after reading up on it, but documentation seems a little scarce. Reading about atoms on the clojure site gives a very small example using just a {}. I've tried piecing it together using a struct but am getting Exception in thread "main" java.lang.IllegalArgumentExceptio

Re: separating ui and content in clojure

2010-03-20 Thread Mike Meyer
On Sat, 20 Mar 2010 08:11:49 -0700 (PDT) strattonbrazil wrote: > I'd like to separate my ui Swing/JOGL from the content, so my code is > relatively unaware of the UI around it. For example, I create a > global context that holds on my content. I then make a UI that when > the user does some int

separating ui and content in clojure

2010-03-20 Thread strattonbrazil
I'd like to separate my ui Swing/JOGL from the content, so my code is relatively unaware of the UI around it. For example, I create a global context that holds on my content. I then make a UI that when the user does some interaction like a mouse click or drag, the UI creates a new context. My OO