Responses inlined ...
On Mon, May 5, 2014 at 12:35 AM, Atamert Ölçgen <mu...@muhuk.com> wrote: > > Hello Timothy, > > > On Sat, May 3, 2014 at 8:49 PM, Timothy Washington <twash...@gmail.com>wrote: > >> >> Also, have you tried confirming that only one :a is instantiated? >>> >> >> That one *:a* is not the same instance throughout all the dependant >> components. Seems that it's the [*:core :a*] bit that's passed to all >> the components in the *'start* *'stop* functions. I say this, because >> when one of my dependant components updated an atom in it's own [*:local >> :a*], it was [*:core :a*] that reflected that change. >> >> > I'm not sure if I follow correctly. Looking at your code, (ca/component-a > env) should be called exactly once and the resulting value should be the > :a. Then, when other components that depend on :a gets initialized, their > [:local :a]'s should be exactly the same value. If the value we're talking > about is an atom, i.e. ca/component-a returns an atom, then modifying this > atom in one component (as you say above [:local :a]) would cause it's > value, when [:core :a] is dereferenced, to be the new value. So if I'm not > missing something, the situation you describe above is exactly how it > should work. > Yes, so modifying an atom in [*:local :a*] (in ca/component-a) *did*reflect in the new [*:core :a*]. The problem I found, was that if I later try to access [*:local :a*] (in ca/component-a), I *did not* see that change reflected. > > If you, however, say add a debug print in ca/component-a, and see that > it's called more than once, you should file a bug report. > I just assumed that this was the expected behaviour. But I'll check it to see if it's a bug. > -- > Kind Regards, > Atamert Ölçgen > > -+- > > www.muhuk.com > > Thanks Tim Washington Interruptsoftware.com <http://interruptsoftware.com/> -- 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.