Re: [ClojureScript] [ANN] Clojure 1.7.0-RC1 now available

2015-06-12 Thread Dave Della Costa
Alex, I'm behind the curve but here's another experience report: We've been testing with RC1 for the last few weeks in a development branch, and found nothing out of the ordinary. This is a relatively substantial web app using libs such as compojure, clojure.java.jdbc, Prismatic's schema, and a

[ClojureScript] Re: Om design query

2015-03-05 Thread Dave Della Costa
(cc'ing clojurescript@googlegroups.com) Hi James, Let me make sure I understand what you're asking: you have a parent enclosing component that has to do calculations to position a set of child component element, but you can only properly calculate positioning for those child elements (in the

Re: [ClojureScript] Clojure/Java Interop errors in the browser?!

2015-02-16 Thread Dave Della Costa
Hi Marc, This isn't an interop issue but simply is arising from the fact that you are attempting to call a string as though it were a function, and it is getting caught at runtime. To compare, I tried the same code in ClojureScript and I saw: Uncaught TypeError: undefined is not a function which

Re: [ClojureScript] Clojure/Java Interop errors in the browser?!

2015-02-16 Thread Dave Della Costa
, 2015 at 7:44 PM, Dave Della Costa ddellaco...@gmail.com mailto:ddellaco...@gmail.com wrote: Hi Marc, This isn't an interop issue but simply is arising from the fact that you are attempting to call a string as though it were a function, and it is getting caught at runtime

[ClojureScript] Re: snubbed on clojurescript one

2014-11-17 Thread Dave Della Costa
Hi Kevin, my understanding is that ClojureScript One is not actively maintained and pretty out of date at this point. You're probably better suited to starting from a different place in the eco-system. What are your goals in using ClojureScript? If you want to describe a bit what you're after

Re: [ClojureScript] OM selecting grandchildren

2014-10-05 Thread Dave Della Costa
Hi Andreas, Seems like it will be hard to do this without passing a channel around, but I don't think it's that clunky. Here is one approach: https://github.com/ddellacosta/om-cookbook/blob/master/complex-selection/src/core.cljs (You can get that going by cloning that repo and running lein

Re: [ClojureScript] Om / React : preserving identity across renders with key

2014-09-24 Thread Dave Della Costa
Hi David, It's described in the documentation for the build function here: https://github.com/swannodette/om/wiki/Documentation#build DD (2014/09/24 13:15), David James wrote: I am reading the React documentation in order to better understand Om. The page

Re: [ClojureScript] How to debug IE issues?

2014-09-02 Thread Dave Della Costa
Hi Martin, If I had to guess, I'd guess that the array-like list that is being returned by dom/getElementsByClass can't be used with CLJS's for as you are trying to do. Maybe try something like: (let [els (dom/getElementsByClass active-class-name)] (dotimes [i (.-length els)]

Re: [ClojureScript] How to debug IE issues?

2014-08-31 Thread Dave Della Costa
Also, I'm not sure it will give you much better debugging information, but check out Firebug lite (if you aren't already using it, apologies if you are) and see if that can help-- https://getfirebug.com/firebuglite (2014/08/31 22:43), Martin Zapata wrote: Hi all, I've got an app that I've

Re: [ClojureScript] om Basic Tutorial - focus input

2014-07-27 Thread Dave Della Costa
Hi Greg, Assuming I've understood what you need--I've adapted the React example for focusing an input element (http://facebook.github.io/react/docs/working-with-the-browser.html#refs-and-getdomnode) here: https://github.com/ddellacosta/om-cookbook/blob/master/focus/src/core.cljs I purposely

Re: [ClojureScript] Example unmounting om component

2014-07-26 Thread Dave Della Costa
Hi John, Unmounting is not something that you do explicitly; it happens automatically when the data that maps to a component is no longer present, or if you conditionally disable building of a child component. For example, if you build a child component based on the value of a component local

Re: [ClojureScript] Re: Example unmounting om component

2014-07-26 Thread Dave Della Costa
Yes, though I think the React folks are planning on allowing you to return null soon. At least, I remember seeing it announced someplace. The new version of React: http://facebook.github.io/react/blog/#rendering-to-null I guess the question is whether or not, or when, you can use that with

Re: [ClojureScript] Multiple state changes in a single transaction

2014-07-11 Thread Dave Della Costa
outside of Om and my Om code doesn't need to know or care about it. On 11 July 2014 06:53, Dave Della Costa ddell...@gmail.com wrote: How would a multiple operation transaction version of transact! work? (2014/07/11 0:20), Todd Berman wrote: On Thursday, July 10, 2014

Re: [ClojureScript] Multiple state changes in a single transaction

2014-07-10 Thread Dave Della Costa
Hi Todd, So, for example, if you edit all 3 fields, it causes 3 saves to be sent, which isn't what I want at all. Can you go into a bit more detail about why this is the case? I can say that whatever the case may be, I would be hesitant to incorporate any logic for how the server should

Re: [ClojureScript] display multiple components using OM

2014-07-10 Thread Dave Della Costa
app) (om/build menu-table-button app (om/root wrapper app-state {:target (. js/document (getElementById app))}) Thanks, Makoto 2014-07-10 13:34 GMT+09:00 Dave Della Costa ddellaco...@gmail.com mailto:ddellaco...@gmail.com: Oh, you shouldn't need that (apply

Re: [ClojureScript] Multiple state changes in a single transaction

2014-07-10 Thread Dave Della Costa
How would a multiple operation transaction version of transact! work? (2014/07/11 0:20), Todd Berman wrote: On Thursday, July 10, 2014 12:23:53 AM UTC-7, David Della Costa wrote: Hi Todd, So, for example, if you edit all 3 fields, it causes 3 saves to be sent, which isn't what I

Re: [ClojureScript] display multiple components using OM

2014-07-09 Thread Dave Della Costa
Oh, you shouldn't need that (apply ...) in there before the dom/div call, sorry. Otherwise I think it should work. (2014/07/10 13:30), Dave Della Costa wrote: Hi Makoto, Try wrapping them all in a single component, like so: (defn wrapper [app owner] (om/component (apply dom/div

Re: [ClojureScript] Re: add datetimepicker and tagsInput for form input in om with sablono

2014-07-01 Thread Dave Della Costa
Hi Hiram, I've added an example of one way to do this here: https://github.com/ddellacosta/om-cookbook/blob/master/datetimepicker/src/core.cljs Let me know if that helps-- DD (2014/07/01 15:46), Hiram MADELAINE wrote: Hi, Did you managed to make it work ? I am trying to integrate

Re: [ClojureScript] Re: add datetimepicker and tagsInput for form input in om with sablono

2014-07-01 Thread Dave Della Costa
Dave Della Costa ddellaco...@gmail.com mailto:ddellaco...@gmail.com: Hi Hiram, I've added an example of one way to do this here: https://github.com/ddellacosta/om-cookbook/blob/master/datetimepicker/src/core.cljs Let me know if that helps-- DD (2014/07/01 15:46

Re: [ClojureScript] Re: add datetimepicker and tagsInput for form input in om with sablono

2014-07-01 Thread Dave Della Costa
I will add that if you listen directly on the InputDatePicker's events, you can get a Date object back directly when the event is triggered--you won't have to do the conversion back into a Date from a string value as you are doing. DD (2014/07/01 23:14), Dave Della Costa wrote: Why don't you

Re: [ClojureScript] Re: Compilation failures

2014-06-30 Thread Dave Della Costa
Unfortunately I think ClojureScript: Up Running is rather out of date at this point, in terms of how folks develop CLJS. For one, cljsbuild is pretty universally used to compile ClojureScript. I would recommend starting w/David Nolen's tutorials here:

Re: [ClojureScript] Rerender lists with different items on changed order in om

2014-06-26 Thread Dave Della Costa
It would be helpful if you could give us your code to look at. That may make it easier to explain what you want to achieve as well. But if I understand what you want (which may not be the case), you could do something like this: Assuming a data structure like so, [{:type :item :pos 1} {:type

Re: [ClojureScript] Rerender lists with different items on changed order in om

2014-06-26 Thread Dave Della Costa
I've added an example here: https://github.com/ddellacosta/om-examples/blob/master/same-data/src/core.cljs DD (2014/06/27 5:26), lightningflas...@gmail.com wrote: I thought about posting the code, but I thing you got me right :) That's exactly what I'm doing (or intend to do), besides I'm

Re: [ClojureScript] Re: Comparing React.js libraries

2014-06-23 Thread Dave Della Costa
Leaving aside the irrelevant details of creating an absolutely positioned widget of some sort, here's how I would create a component which keeps track of window resizing events. It's very simple and doesn't require anything other than default local state:

Re: [ClojureScript] Using go block inside Om component

2014-06-22 Thread Dave Della Costa
Hi Andrew, We ended up doing exactly the sort of thing you describe. We have a go block inside IWillMount, listening for messages from the server (in our case via browserchannel, but exact same idea). Inside this go block we apply updates from our server by calling transact! on the app data.

Re: [ClojureScript] Re: templating for clojurescript react libraries

2014-06-22 Thread Dave Della Costa
I would hope most anyone working on a web app would be familiar with HTML markup (https://github.com/ckirkendall/kioo). (2014/06/22 20:02), Paul Cowan wrote: it is markup that everyone is familiar with? On Sunday, June 22, 2014, Moritz Ulrich mor...@tarn-vedra.de mailto:mor...@tarn-vedra.de

Re: [ClojureScript] Using go block inside Om component

2014-06-22 Thread Dave Della Costa
-threaded. I'm guessing all the components will be recursively mounted before the contents of the go block can do anything at all. On Sun, Jun 22, 2014 at 9:20 AM, Dave Della Costa ddellaco...@gmail.com wrote: Hi Andrew, We ended up doing exactly the sort of thing you describe. We have a go

Re: [ClojureScript] Re: Comparing React.js libraries

2014-06-22 Thread Dave Della Costa
itself in the right absolute position if the window resizes). Its not that you can't do this in OM, of course, but, as I understand it, you'd have to merge the window dimensions into the main atom, and meaning the reusable popup component would require that every app-state had these window

Re: [ClojureScript] templating for clojurescript react libraries

2014-06-21 Thread Dave Della Costa
Hi Paul, I suspect any designer comfortable with HTML could probably pick up hiccup-style templating pretty quickly. That said, have you taken a look at kioo? https://github.com/ckirkendall/kioo DD (2014/06/21 23:06), Paul Cowan wrote: Hi, I'm taking a look at OM and clojurescript and I

Re: [ClojureScript] Other Om Resources

2014-06-19 Thread Dave Della Costa
Hi Geoff, as far as code, have you checked out the examples at https://github.com/swannodette/om/tree/master/examples ? DD (2014/06/19 12:24), Geoff Little wrote: Does anyone know of resources to learn Om besides the Basic and Intermediate tutorials at

Re: [ClojureScript] ClojureScript with om on IE8 and IE9

2014-06-13 Thread Dave Della Costa
As far as Prismatic libs, we are using them in some places but not (yet) in our web app. We did stop supporting IE8, but mostly because it was not heavily used by our client base, and it was a pain to maintain--we had many places with separate code paths in place just to handle IE8 quirks. It

Re: [ClojureScript] ClojureScript with om on IE8 and IE9

2014-06-12 Thread Dave Della Costa
Just as another data point, we are using React 0.9.0 + Om 0.6.2 in production with IE9 (and up to recently IE8) and have had no problems with the combination. (2014/06/12 14:50), Ivan Kozik wrote: Are you hitting an HTTP server in IE8, or are you accessing a file:/// URL? Your example works

Re: [ClojureScript] Why is cursor nil in om/IInitState

2014-05-06 Thread Dave Della Costa
of a situation where it would actually present any problems. How rendering works will always be a bit of an implementation detail - not only because React will likely change this as well sometime in the near future. David On Tue, May 6, 2014 at 9:36 AM, Dave Della Costa ddellaco...@gmail.com

[ClojureScript] unnecessary re-renders when setting state in Om 0.6.2?

2014-05-06 Thread Dave Della Costa
Testing render behavior when answering another question on the list (https://groups.google.com/d/msg/clojurescript/oF1cuRN8n6Y/O5p_IOSsQRYJ), I found what may be a bug, but I'd like to get some other eyes on it for confirmation: https://gist.github.com/ddellacosta/432806ff921377510187 The

Re: [ClojureScript] Problem understanding cursors in om

2014-05-04 Thread Dave Della Costa
The reason this is not working is because you are explicitly ignoring the first (what would be the cursor) argument to your component, so neither transact!/update! (which works on your cursor, not local component state) or set-state!/update-state! (which is applied to local component state--what

Re: [ClojureScript] [ANN] Ominate - animate your Om components

2014-05-04 Thread Dave Della Costa
Daniel, this is cool and is something I've been thinking about for a month or so. However I've been prototyping a leaner approach which leverages Om/React more heavily. So following from that I have a question: why create your own timing loop, rather than use the underlying update mechanism in

Re: [ClojureScript] [ANN] Ominate - animate your Om components

2014-05-04 Thread Dave Della Costa
attached to it and am happy to incorporate new ideas :) On 4 May 2014 18:38, Dave Della Costa ddellaco...@gmail.com mailto:ddellaco...@gmail.com wrote: Daniel, this is cool and is something I've been thinking about for a month or so. However I've been

Re: [ClojureScript] om: render-state in IRenderState called twice

2014-04-21 Thread Dave Della Costa
Of course this does...you are triggering a re-render by swapping on the atom that you pass into root. You could call this anywhere and it would trigger a re-render because root sets up a watch on the data argument that's passed in. There are two things that I think are anti-patterns here which

Re: [ClojureScript] Need a bit of help with Om

2014-04-06 Thread Dave Della Costa
Hi Sean, Your root component app-view is not a component, it's just a DOM element. I'm not really sure what that would/should do, but simply wrapping that in om/component made both problems go away. I would also suggest simply passing the value of the field to chsk-send! onKeyPress--you have a

Re: [ClojureScript] Can't get AngularJS call working...

2014-04-06 Thread Dave Della Costa
No, you probably just don't have externs for Angular--in that case, advanced optimizations are going to clobber names. Not positive, but this looks like it may be a proper externs file for Angular?

[ClojureScript] Om cursors, external updates and internal data transformations, and future behavior

2014-04-03 Thread Dave Della Costa
Hi folks, This is mostly aimed at David Nolen I suppose, but I think others may have experience with this, and will want to think through and discuss this. I'm talking about Om v0.5.3 here, except when I mention otherwise. I mentioned in a recent Om-related thread

Re: [ClojureScript] Om cursors, external updates and internal data transformations, and future behavior

2014-04-03 Thread Dave Della Costa
to know if this is not a model that Om can or will ever support--if it is possible with Om, I'd like to know how we can do this the Right Way. Thanks-- DD (2014/04/03 21:03), David Nolen wrote: On Thu, Apr 3, 2014 at 7:48 AM, Dave Della Costa ddellaco...@gmail.com mailto:ddellaco...@gmail.com wrote

Re: [ClojureScript] Om cursors, external updates and internal data transformations, and future behavior

2014-04-03 Thread Dave Della Costa
though--can you going into these any more, and why we would be missing out? Thanks for clarifying all of this--this helps tremendously David. DD (2014/04/03 21:48), David Nolen wrote: On Thu, Apr 3, 2014 at 8:21 AM, Dave Della Costa ddellaco...@gmail.com mailto:ddellaco...@gmail.com wrote

Re: [ClojureScript] Om cursors, external updates and internal data transformations, and future behavior

2014-04-03 Thread Dave Della Costa
I see...I think this wasn't clear to me in our earlier back-and-forth in this thread. If it is best practice to create a utility/invisible component which receives input from the server--something analogous to om-sync, but the reverse I guess--then I'd rather go with that. I guess the advantages

Re: [ClojureScript] Re: Does anyone find themselves inexorably morphing Om into Backbone?

2014-03-30 Thread Dave Della Costa
David, I would love to read this. I've spent a lot of time working through Om architectural patterns and I think I have a sense of what works and what doesn't, but getting a more comprehensive higher-level take from you would be great. I also want to thank Sean Grove for putting Omchaya out

Re: [ClojureScript] Does anyone find themselves inexorably morphing Om into Backbone?

2014-03-30 Thread Dave Della Costa
a fundamental impedance mismatch. On Sunday, March 30, 2014, Dave Della Costa ddellaco...@gmail.com mailto:ddellaco...@gmail.com wrote: David, I would love to read this. I've spent a lot of time working through Om architectural patterns and I think I have a sense of what works and what

Re: [ClojureScript] What about React?

2014-02-26 Thread Dave Della Costa
I don't understand what you're asking. (2014/02/26 23:16), John Chijioke wrote: Components vs templates? Re-render vs mutate? Virtual DOM? On Wednesday, February 26, 2014 4:52:56 AM UTC+1, David Della Costa wrote: http://2013.jsconf.eu/speakers/pete-hunt-react-rethinking-best-practices.html

[ClojureScript] Re: ANN: om-sync

2014-02-19 Thread Dave Della Costa
It's not clear to me that the server side should be tied to Om specifically. It seems like the requirement is more to have a server component that can pass messages / state changes in a generic way to clients (probably using core.async channels, with the ability to use websockets etc. as the