Re: Om design query

2015-03-05 Thread Tom Lynch
One workable possibility: 

* init a core.async channel in the container
* pass the channel from the container into each child component at build 
time using :opts or :state
* send the discovered size of each child component, with identifying data, 
as a channel message during IDidMount

I don't find these sorts of solutions terribly elegant but it would be 
usable I think. 

Tom

On Friday, 6 March 2015 12:42:12 UTC+8, James Reeves wrote:

 I've been writing an application using Om, and I've come across a problem 
 I haven't been able to find a good solution for. I'd be grateful for any 
 ideas people might have on how to proceed.

 In a nutshell, I have a bunch of elements that need to be arranged 
 according to a specific algorithm. They cannot overlap, so I need to know 
 the sizes of all the elements in order to arrange them.



-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Can macros be used for blunt token-pasting?

2008-10-15 Thread Tom Lynch

Hi all, I have a naive question regarding Clojure macros.  As someone
new to Lisp-style macros, can I use the system to generate new names
using substitution / token-pasting?

Conceptually something like

(defmacro paste-tokens [first second]
 `(def ~first~second []))

so that (paste-tokens foo bar) expands to (def foobar []).

I realise this may be a huge ideological no-no :-)

Thanks

Tom

--~--~-~--~~~---~--~~
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
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~--~~~~--~~--~--~---