Re: Question about modifying sexps via macros

2009-05-08 Thread ianp
Hi Meikel, > Please note, that these annotations are wrong. Since > create-form is a macro, container and components refer > to Symbols or some other Clojure structure (depending > on how you pass the later container and map). Thanks for pointing that out, I didn't realise that. Although, now th

Re: Question about modifying sexps via macros

2009-05-08 Thread ianp
Hi Christophe, > hth Yeah, thanks! I'm not sure what I was thinking when I wrote out `~sbody in the above code, thanks for pointing that out. I've got that bit of what I'm trying to do working now, I ended up with code that looks like this: (defmacro sequential [layout & cs] (let [g (gensym "

Re: Question about modifying sexps via macros

2009-04-28 Thread Meikel Brandmeyer
Hi, Am 28.04.2009 um 09:26 schrieb ianp: (defmacro create-form [#^Container container #^Map components & body] (let [layout (GroupLayout. container)] (.setLayout container layout) ...)) Please note, that these annotations are wrong. Since create-form is a macro, container

Re: Question about modifying sexps via macros

2009-04-28 Thread Christophe Grand
Michael Wood a écrit : > On Tue, Apr 28, 2009 at 9:39 AM, Christophe Grand > wrote: > [...] > >> `~sbody is equivalent to body >> > [...] > > I think you mean it is equivalent to sbody. > indeed, it's a typo -- Professional: http://cgrand.net/ (fr) On Clojure: http://clj-me.blogspo

Re: Question about modifying sexps via macros

2009-04-28 Thread Michael Wood
On Tue, Apr 28, 2009 at 9:39 AM, Christophe Grand wrote: [...] > `~sbody is equivalent to body [...] I think you mean it is equivalent to sbody. -- Michael Wood --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "C

Re: Question about modifying sexps via macros

2009-04-28 Thread Christophe Grand
ianp a écrit : > I'm trying to create a macro that will splice in some additional > elements to a structure. If I have an input struture like so: > > (p (s (c foo bar)) (s (c baz qux))) > > I'd like to be able to do (splice grp layout (rest my-data)) and have > it return: > > ((s grp layou

Question about modifying sexps via macros

2009-04-28 Thread ianp
I'm trying to create a macro that will splice in some additional elements to a structure. If I have an input struture like so: (p (s (c foo bar)) (s (c baz qux))) I'd like to be able to do (splice grp layout (rest my-data)) and have it return: ((s grp layout (c foo bar)) (s grp layout (