Using the clojars repo from leiningen works fine for me, just using
[dgraph "1.0.0"].
I've done most of my little swing app I needed to get done and dgraph
has been very pleasant.
However I found myself wanting to put a map in the graph because I had
a function for updating the gui that depended on a lot of stuff and I
wanted to be able to add or remove parameters without affecting the
update functions interface so I just stuffed it all in a map.
Updating stuff in the map became a little bit of a hassle so I made
versions of assoc-in and update-in that work on dgraphs. Here they are
in case anyone else is interested:

(defn assoc-node
  [dgraph m ks v]
  (dgraph m (assoc-in (dgraph m) ks v)))

(defn update-node
  [dgraph m ks f & args]
  (dgraph m (apply update-in (dgraph m) ks f args)))

Suppose we have a dgraph dg and a map in the dgraph with the key :gui-
data, in the map we want to replace or update the key :message

(assoc-node dg :gui-data [:message] "Hello World!")
(update-node dg :gui-data [:message] conj "World!")

-- 
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