Fork me on GitHub
#hoplon
<
2018-07-31
>
flyboarder00:07:31

@vigilancetech it looks like your cells are being initialized with nil, if you want them to have an initial value then you need to do that when you construct them, it’s like you said

flyboarder00:07:09

"or boot-reload is re-initializing something that wouldn't be found in a virgin page load"

vigilancetech01:07:29

@flyboarder yeah, I'm not seeing that though because I can run what the cell formula does by hand and the underlying data is there. Its just the cell formula won't run until after a boot-reload. It seems more like its a lazy evaluation thing or something in javelin that gets initialized by boot-reload that isn't initialized in an initial page load.

chromalchemy03:07:34

@flyboarder @vigilancetech I had a similar issue where my formula cells wouldn't load on the initial pageload, when I start with a hoplon.firebase cell. I had to use a short with-timout on pageload to initialize the cells with Firebase content, on first pageload (from Dev server at least). I tried the other page-load macros, and I think even defonce and they did not seem to work for me in this regard.

flyboarder03:07:02

@chromalchemy I had that issue also

flyboarder03:07:54

One thing I often find with hoplon apps, is there isn’t a great way to initialize cells after events like authentication, i have to stick when’s every where

chromalchemy03:07:46

@vigilancetech Specter has some different options baked in for precompilation and caching. I don't really understand them, but there's a page in the wiki on it. Hopefully that is not getting in the way. I just use the standard functions, and sometimes (path) to define a path segment, and things seem to work fine with Javelin for me.

flyboarder03:07:41

@chromalchemy how do you get around initializing cells after firebase auth?

chromalchemy03:07:45

@flyboarder I have not used with-auth yet, as I'm working on a personal app. But I would like to integrate it soon. Any recommendations?

flyboarder03:07:34

The thing to look out for is when you try to watch a DB path that is protected, you will need to initialize those after authentication is successful

flyboarder03:07:48

Otherwise they stay unauthenticated

flyboarder03:07:27

I have used dynamic bindings to get around this in the past

vigilancetech03:07:51

@flyboarder when you say "dynamic bindings" are you saying like you'd pass a string to eval?

vigilancetech04:07:02

@chromalchemy so it sounds like this is not merely a specter problem

vigilancetech04:07:09

@flyboarder or using "binding" and ^:dynamic?

flyboarder04:07:28

Yes binding and :^dynamic