I thank all the people who have sent me solutions to my Conj
problem.   Unfortunately, none of them seem to work.

The issue is adding a value to a defined vector - (def savedColors
[black, white])

One solution was given as:  (swap! savedColors conj newcolor)

This produces still the following runtime error:

Exception in thread "AWT-EventQueue-0"
java.lang.ClassCastException:     clojure.lang.PersistentVector cannot
be cast to clojure.lang.Atom

Another solution was to make savedColors an atom - (def savedColors
(atom [black, white]))

This produces a new compile error:

Exception in thread "AWT-EventQueue-0"
java.lang.IllegalArgumentException: Don't know how to create ISeq
from: clojure.lang.Atom

Changing savedColors to a list instead of a vector gets the same
error.   The atom example on the web is for a map.

I'm sure this can be done.   So far I just don't know how.

Bill

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

To unsubscribe from this group, send email to 
clojure+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.

Reply via email to