[ClojureScript] Re: Dependent picklists using Reagent

2014-08-02 Thread Harsha / Mr. Foo Bar
On Sunday, August 3, 2014 1:18:14 AM UTC+5:30, Jonathon McKitrick wrote: > I have three select I assume A B' and B'' C, are the pairs. B and B'' can have a common core.async. With that you can send, A -> B' , B' -> core.async -> B", B" -> C to get all your dependancies in order. --

[ClojureScript] Re: Dependent picklists using Reagent

2014-08-03 Thread Jonathon McKitrick
On Saturday, August 2, 2014 5:29:01 PM UTC-4, Harsha / Mr. Foo Bar wrote: > On Sunday, August 3, 2014 1:18:14 AM UTC+5:30, Jonathon McKitrick wrote: > > I have three select > > I assume A B' and B'' C, are the pairs. > > B and B'' can have a common core.async. > > With that you can send, >

[ClojureScript] Re: Dependent picklists using Reagent

2014-08-04 Thread Harsha
> I'm not familiar with that approach of using core.async. I'm simply using > callbacks to set the atom each select depends on. Is there a better way with > core.async? I'm afraid I can't really suggest much without concrete code. I may be giving a rather generic solution. Basically core.asyn

[ClojureScript] Re: Dependent picklists using Reagent

2014-08-05 Thread Mike Thompson
On Sunday, August 3, 2014 5:48:14 AM UTC+10, Jonathon McKitrick wrote: > I have three select components (picklists) which are dependent. The first > determines the values of the second, and so on to the third. I'm able to get > the first pair working, but the second pair has been tricky. > > H

[ClojureScript] Re: Dependent picklists using Reagent

2014-08-08 Thread Ivan L
What approaches have you tried? I would assume that if you have 3 reagent atoms holding each list data and you swap the next lists data in the parent, it should work fine. -- Note that posts from new members are moderated - please be patient with your first post. --- You received this messag

Re: [ClojureScript] Re: Dependent picklists using Reagent

2014-08-04 Thread Jonathon McKitrick
I started researching core.async after reading your post. I'm curious how it's implemented in single-threaded javascript. -- Jonathon McKitrick On Mon, Aug 4, 2014 at 12:55 PM, Harsha wrote: > > I'm not familiar with that approach of using core.async. I'm simply > using callbacks to set the

Re: [ClojureScript] Re: Dependent picklists using Reagent

2014-08-04 Thread Sreeharsha Mudivarti
That's something I am curious about too. ES6 Generators are similar, I think. In case you are wondering about performance, checkout -- https://swannodette.github.io/2013/08/02/10-processes/ In practical terms, you can have 1000s of go blocks without any performance loss. ​ -- Note that post

Re: [ClojureScript] Re: Dependent picklists using Reagent

2014-08-04 Thread Sreeharsha Mudivarti
Also just remembered, Maybe you can use atom watchers ? http://blog.fogus.me/2011/09/23/clojurescript-watchers-and-validators/ On Mon, Aug 4, 2014 at 11:53 PM, Sreeharsha Mudivarti wrote: > That's something I am curious about too. > ES6 Generators are similar, I think. > > In case you are won

Re: [ClojureScript] Re: Dependent picklists using Reagent

2014-08-05 Thread Mikey Griffiths
See https://github.com/clojure/core.async/blob/master/src/main/clojure/cljs/core/async/impl/dispatch.cljs - it uses one of MessageChannel[0], setImmediate[1] or setTimeout[2] depending on which is available in the current browser. [0]: http://msdn.microsoft.com/en-us/library/windows/apps/hh4413

Re: [ClojureScript] Re: Dependent picklists using Reagent

2014-08-05 Thread Jonathon McKitrick
Exactly! -- Jonathon McKitrick On Tue, Aug 5, 2014 at 8:55 AM, Mike Thompson wrote: > On Sunday, August 3, 2014 5:48:14 AM UTC+10, Jonathon McKitrick wrote: > > I have three select components (picklists) which are dependent. The > first determines the values of the second, and so on to the t

Re: [ClojureScript] Re: Dependent picklists using Reagent

2014-08-08 Thread Harsha
On Tuesday, August 5, 2014 7:33:15 PM UTC+5:30, Jonathon McKitrick wrote: > Exactly! > > > Damn ! The word picklist completely threw me off. https://github.com/tailrecursion/javelin was built for this sort of problem. In Mike's example you would have one cell holding all the ui data and 6 fo