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?
@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]
I’m interested though, what’s the usecase for this?
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.