Fork me on GitHub
#beginners
<
2017-04-25
>
vhalli11:04:53

Hello. I'd like help to understand why I cannot require goog.style, while requiring goog.dom works perfectly fine.

cljs.user=> (require '[goog.style :as style])

cljs.user=> style/setHeight
TypeError: Cannot read property 'setHeight' of undefined

vhalli12:04:34

Never mind, restarting the cljs repl worked

vhalli12:04:39

¯\(ツ)

Chris Bidler22:04:15

So here's a clojure.zip question - I don't have code handy to snippet right now but maybe someone just knows What I Did Wrong: I have a use case where I have a small XML doc and I need to edit one node by filtering its children. I use zip and clojure.data.zip.xml's xml1-> to position a zipper at the parent, zip/edit to edit. This all works great. Here's the weird bit: I want to return the edited doc so I want to get back up to the root, right?

Chris Bidler22:04:17

(-> edited zip/up zip/up zip/up) gives me the root of the edited doc; (zip/root edited) yields nil

Chris Bidler22:04:22

This is an unexpected and confusing result, and having come so far in my understanding of what a zipper is and does, now I positively itch to figure out this new mystery. Does it sound familiar to anyone?