Closed BenjaminLouis closed 1 year ago
Hi Colin, thank you also from my side for this simple yet very helpful package :)
I have recently discovered this problem, too, as I usually use the gargoyle functions via its explicit namespace (i.e. gargoyle::init(...)
, gargoyle::watch(...)
, etc.).
The problem with the gargoyle::on()
function must occur in this line of code:
https://github.com/ColinFay/gargoyle/blob/e0398a6970c5e43e081472e594fc13d1704bd938/R/funs.R#L139
I guess because the watch
function is inside of substitute
it's not "seen" when building the package and hence it must be attached first in order to work for the user.
Maybe replacing watch
with gargoyle::watch
inside of substitute()
already solves this problem?
Best regards David
closed via #5
Hey Colin,
Thanks for this package which is really cool to deal with reactivity in shiny apps, in particular when we use module like with the golem framework.
I am developping a golem app and I started by using your function that I borrowed from your hexmake app and it works well. Now that gargoyle is on CRAN I am changing the code by importing the needed functions. I never use
watch()
but onlytrigger()
andon()
(and obviouslyinit()
). After removing the internal function and switch to@importFrom gargoyle trigger on init
it didn't work anymore. I figured the problem out by addingwatch()
in the@importFrom gargoyle
section even if I never use directly thewatch()
functionI am under the impression that I shouldn't have to add
watch()
because it is included inon()
function, but maybe I am wrong. What do you think?Thanks