On Fri, Dec 23, 2011 at 1:29 PM, Antonio Recio <amdx6...@gmail.com> wrote:
> I am trying to add and to remove an object "isoActor" when I click the
> button "isoButton", but I get an error:
> Exception in thread "main" java.lang.IllegalArgumentException: Don't know
> how to create ISeq from: clojure.lang.Symbol
>
> The code:
> (. isoButton addActionListener

It's just a stylistic thing, but most people have stopped using the
"." standalone operator and moved to (.addActionListener isoButton)

>      (proxy [ActionListener] []
>        (if (. isoButton isSelected)

You are trying to provide the definition of the "actionPerformed"
method of the ActionListener, but you haven't actually specified that
that is what you are doing.

>          (actionPerformed [e] (AddActor isoActor))
>        (actionPerformed [e] (RemoveActor isoActor)))))

I think you want something more like the following, but I don't know
what AddActor, RemoveActor and isoActor are supposed to be.

(.addActionListener isoButton
    (proxy [ActionListener] []
       (actionPerformed [] (if (.isSelected isoButton) (AddActor
isoActor) (RemoveActor isoActor)))))

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