On Aug 11, 10:15 pm, Abhishek Reddy <arbs...@gmail.com> wrote:
> Hi Brad,
>
> I saw your question on IRC the other day and came up with 
> this:http://gist.github.com/164652
>
> That demo creates a frame with sliders that control the horizontal and
> vertical position of a spot in a panel.
>
> It's certanly not the best possible implementation, but you might find its
> style illustrative.  My Swing apps in Clojure typically look something like
> that -- with functions called 'make-thing' to produce Swing components, and
> partial functions as callbacks invoked by listeners.  (Using 'partial' lets
> you capture context and still keep your factory functions general.)

Thanks Abhishek, I like the way you use partial functions, I can
imagine that would enforce a uniform API.  I also not that our
approaches are similar - we pass mutable storage from the top level
closure down to the functions that need to change it.

Cheers,
Brad
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to