Clojurians
#hoplon
<
2015-12-19
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

laforge4917:12:48

I've also added a new section, Running on Windows, to the getting started page: https://github.com/hoplon/hoplon/wiki/Get-Started

micha17:12:22

hoping to get windows support 100% squared away soon

ul17:12:36

folks, how do you usually make components-“mixins” in hoplon? like draggable, selectable and so on? via defelem wrapper?

laforge4917:12:38

Before making the change I updated build and made sure that both changes were required.

micha17:12:38

this is great progress there

ul17:12:03

i know that jquery-ui have many of that

ul17:12:12

but if i would to create my own?

micha17:12:17

@ul you can use the do! and on! multimethods to make custom attributes that will span all elements

ul17:12:33

aha! thanks for reminding that great feature

micha17:12:44

so like :drop-zone and :draggable

micha17:12:46

and so on

laforge4917:12:36

@urhein: could you share some sample code when you get it working? I'd love to see it added to the demos!

laforge4917:12:21

Not being a js maven, I'm really in need of hoplon examples! :simple_smile:

ul17:12:15

honestly speaking, right now I'm playing with own hoplon-like lib, and my exact solution will not be a great example. but i can take some time and write hoplon example especially for demo purposes

laforge4917:12:37

That would be very much appreciated. I see hoplon as a way for me to finally write some nice web pages. Thinking even of starting up a web dev co around hoplon :simple_smile:

laforge4917:12:49

--eventually

ul17:12:33

Hoplon is great! I have only one completely finished app written with it, but it was pure pleasure.

laforge4917:12:22

One thing I like about hoplon is that it is one of the best explained projects. So it is a great way to get started with ClojureScript!

ul18:12:47

but actually it doesn;t work

ul18:12:00

dragging machinery works

ul18:12:08

but smth wrong with :css

ul18:12:30

@micha would you mind checking example? i get weird html for that code

ul18:12:50

<body><div style="position: absolute; top: 0px; left: 0px; width: 100px; height: 100px; background-color: red;"></div><div style="position: absolute; width: 100px; height: 100px; background-color: blue;"></div></body>

micha18:12:05

the [xy] looks strange

micha18:12:09

why the vector?

ul18:12:12

note lack of top and left in second div

ul18:12:40

because if i pass it plain, it is passed as value, not cell to handler

micha18:12:17

the do! is like a watch

micha18:12:25

it's called repeatedly with the bare value

micha18:12:35

this way it works with cells or with anything

micha18:12:53

like you can do (do! elem :css {:color "red"})

micha18:12:02

if elem is some element in the dom

micha18:12:05

and it'll do it

ul18:12:23

okay, i will rewrite with :on! and callback

ul18:12:34

it will be more idiomatic i guess

micha18:12:51

oh i see what you're doing now

ul18:12:14

but the problem is with css

ul18:12:36

it is broken when i'm trying in chrome

ul18:12:48

with default hoplon template

micha18:12:11

the thing i want to work on during my holiday vacation is state machines you can hook up to elements

micha18:12:25

is the xy1 cells updating as you expect?

ul18:12:56

yes, cell is updated okay

ul18:12:41

the same problem in Firefox

laforge4920:12:27

What you need to do to run on windows depends on what template you use. See the updated wiki page: https://github.com/hoplon/hoplon/wiki/Running-on-Windows