-
Notifications
You must be signed in to change notification settings - Fork 56
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
It is possible to overwrite methods in R6 objects #19
Comments
Sorry - should have said: this affects the current CRAN version (1.0.1), as well as development version a1177fc |
Yes, it probably makes sense to lock the bindings for methods when |
I decided that method bindings should always be locked; if users really want to modify them, they can always unlock the bindings themselves. |
I realized this was closed 6(!) years ago ... but I'm wondering how one would "unlock the bindings themselves". I suddenly find myself in a position where I'd like to update a method after an object has been created (i.e. an update on the instance). I tried creating the generator with |
|
@gaborcsardi ahhhh... I hadn't thought of that base function. Thanks! |
Once an R6 object has been constructed, it is possible to overwrite its methods, which seems undesirable:
And of course, putting the method "back" doesn't work because the environment of that function is wrong:
Is there any way of easily preventing this happen without sacrificing the speed goals of R6?
The text was updated successfully, but these errors were encountered: