-
Notifications
You must be signed in to change notification settings - Fork 14
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
ForeignObject does not support shallowCopy/deepCopy #153
Comments
Copying is not (yet) supported by the interop protocol. We've done some preliminary experiments with copying but need more use cases. Not all objects from other languages are copiable, so it's unclear what to do with them. What do you expect from copying a Java enum? An error may be more intuitive than returning the same enum (although it's a singleton), right? |
The example could be better, that is true. In the case of singleton classes an error is probably the better choice than not copying the object (since that points at a design issue). |
Do you have other examples where copying should be supported? |
Another use-case is using the duplication halo functionality on morphs in addition to registering events on morphs that point to objects that transitively store foreign objects as instance variables.
|
Ok good, here are some ideas for solving your issue:
I'd probably go with option 4 for now. Could you give it a try and report your experience? |
I agree. It sounds like option 4 is most sensible for me. I will try it out and report back (though it may take a while) |
Trying to copy Smalltalk objects that hold references to ForeignObjects (e.g., host Java values) fails, since ForeignObject does not support
shallowCopy
.An example where the ForeignObject is a Java enum:
The text was updated successfully, but these errors were encountered: