keechma

Keechma stack. Mention @U050986L9 or @U2J1PHYNM if you have any questions
mjmeintjes 2018-01-28T01:38:24.000053Z

Hi. I keep on getting "Trying to send command to a controller that is not running" errors, which stops the app until I refresh. I understand why I'm getting these - I have event handlers that run when the controller is stopped. However, is there a way to check whether a controller is running from the ui?

mihaelkonjevic 2018-01-28T12:58:34.000103Z

@mjmeintjes it would be a bit dirty solution but keechma keeps the list of running controllers inside the app-db. You can find it in [:internal :running-controllers]

mihaelkonjevic 2018-01-28T12:59:03.000029Z

I’m interested though, what’s the usecase for this?

mjmeintjes 2018-01-28T20:10:14.000040Z

Thanks. I might just be needing it because of my own inexperience. I have some ref functions that register DOM elements and store them in the app-db as they are created, in order to get access to the current selection for an element, as well as automatically scroll to newly created elements in the controller. However, sometimes when the route changes the controller gets stopped before the component gets unmounted, which is what I think causes the problem. I should add that I haven't spent enough time diagnosing the issue, so I might be wrong about the cause.