Fork me on GitHub
#hoplon
<
2016-12-18
>
laforge4901:12:06

I am seriously blown away. I have a number of cells defined in my client module:

laforge4901:12:43

Then I reference them:

laforge4901:12:30

But the log messages are quite different:

laforge4901:12:24

Why is selected-micro-property undefined? Is there a limit on variable names?

laforge4901:12:25

I changed the length of the variable name, and it now works. Only I don't believe it!

micha01:12:42

there is no limit to the length of a name in clojurescript

micha01:12:56

I'm pretty sure

laforge4901:12:59

The use of two - in the name?

laforge4901:12:27

There's some restriction I've encountered here, but I'm clueless.

laforge4901:12:33

It looks like the double - is the problem. selected-micro-property does not work, but selected-micropropertyx does.

laforge4901:12:53

Changed something else and now that variable is again undefined.

laforge4901:12:10

I quit. At least for tonight. 😞

laforge4901:12:03

Even the shortened name does not work. Clearly something else is wrong, but I have no idea as to what.

flyboarder02:12:18

@laforge49: how are you printing the cells? From within another formula cell? Otherwise you will need to deref the cell

flyboarder02:12:32

I always print from an Anon cell (cell= (.log js/console my-cell))

micha02:12:57

whenever changing the name changes the behavior the reason is usually shadowing of the name

micha02:12:23

redefinition and things like that

laforge4902:12:58

When I deref, I get an undefined exception. Which I do in the actual code. In the log, I get nil when I don't deref. Wierdness.

laforge4902:12:42

Yeah, @micha, that's what I suspected. But a search doesn't find anything.

laforge4902:12:08

And my shortened variable name worked for a while, but no longer.

laforge4902:12:23

Too wierd for me to think about right now. 😞

laforge4902:12:42

@flyboarder The .log was inside a formula cell:

laforge4902:12:53

It was a click function:

laforge4902:12:15

line 4 gets the undefined msg

laforge4916:12:06

I changed the cell initialization from a nil value to false. It is no longer coming up undefined.