Skip to content

Using box::reload within a function #351

Answered by klmr
TymekDev asked this question in Q&A
Discussion options

You must be logged in to vote

reload depends on its caller

It certainly does! And, since it’s intended exclusively for interactive development, it is designed to be only ever called from the global environment (and on modules that are loaded in the global environment). Calling it from anywhere else doesn’t really make sense, except (as I suspect you are trying to) inside a function that acts as a convenience shortcut for interactive use. — If this isn’t your intended use, would you mind telling me more about your use-case? Maybe I have a better solution, or this is a legitimate use-case I hadn’t thought of, and which ‘box’ should accommodate in the future.

At any rate, you can make your code work with a bit of scope…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@TymekDev
Comment options

Answer selected by TymekDev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants