-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why do we need () at end of callModule(bookmark_mod, ...)? #2
Comments
I don't have perfect recall of this but I think there's a problem with calling onBookmark inside of a module (i.e. when callModule is still on the callstack), if you're intending to bookmark stuff from outside that module? Something like that? If that's not enough of a hint for you to connect the rest of the dots, let me know and I'll take a closer look. |
You are certainly right about calling To give more context what I'm trying to do with my latest attempt: Yes I certainly want to have a section of the UI devoted to saving and loading state, much like your example app. But I also want to have an "auto-bookmark" functionality after a key system process has completed (in this case a HPC job). That HPC submission piece is in a separate module, and it has a text input for the user to name the session before launching the job. In the ideal case I want to do a customized version of |
I ended up using one of my "contingency plans" to get a solution for my immediate use case:
Probably not elegant, but it was enough to get the job done for now. |
@jcheng5 I tried using this approach in a new app at the day job and I was going nuts trying to figure out why my app would never enter the customized
onBookmarked()
callback within the bookmark module (i.e. the part that writes to the SQLite database):rpharma-demo/modules/bookmark_module.R
Lines 131 to 161 in 1e8bd67
It turns out that when I invoked the bookmark module's server function, I forgot to put the
()
at the end like you did in this repo's example app:rpharma-demo/app.R
Lines 69 to 71 in 1e8bd67
I should know this, but I still can't figure out why you need to add the
()
at the end of this call? Does it have to do with the module returning a function that wraps theonBookmarked
callback?The text was updated successfully, but these errors were encountered: