Field

Ticket #68 (closed defect)

Opened 5 months ago

Last modified 1 month ago

Templating.simpleCopy() doesn't copy a python box spline drawer

Reported by: mikey Assigned to: mikey
Priority: major Milestone:
Component: core Version:
Keywords: Cc:

Description (Last modified by marc)

I'm trying to copy a VE that has Mixins().mixInOverride(SplineComputingOverride?,_self) called on it so it can draw splines. However, I'm getting an error when trying to do a Templating.simpleCopy() of that VE. This is what I get

Traceback (most recent call last):
  File "<string>", line 1, in <module>
	at field.core.dispatch.VisualElement.createWithName(VisualElement.java:104)
	at field.core.plugins.history.Templating.simpleCopy(Templating.java:204)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)

IllegalArgumentException: java.lang.IllegalArgumentException: java.lang.InstantiationException: $Proxy13

Change History

07/29/2008 05:46:22 PM changed by marc

  • status changed from new to assigned.
  • description changed.

Could you try again with the most recent repository. I've just pushed what might be a quick fix for it.

07/30/2008 06:11:13 AM changed by mikey

  • description changed.

Still doesn't work with newest repository. I get this:

Traceback (most recent call last):
  File "<string>", line 3, in <module>
	at field.core.dispatch.VisualElement.createWithName(VisualElement.java:104)
	at field.core.plugins.history.Templating.simpleCopy(Templating.java:204)
	at sun.reflect.GeneratedMethodAccessor73.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)

07/30/2008 10:48:30 AM changed by marc

  • status changed from assigned to closed.
  • resolution set to fixed.
  • description changed.

Ok, fixed the exception in changeset:122

I'm a little concerned that there doesn't seem to be enough code in simpleCopy to correctly (that is, deeply) copy properties correctly. But in the case of splines, you, fortunately, don't end up with two spline drawing boxes looking at the same storage for _self.lines, you get a new, empty ArrayList?.

So, right now, in order to get simpleCopy() to do what you'd expect (that is, not just copy the box and its code and its type correctly, but actually duplicate the PLines) we're going to need some more code inside performCopy. One possibility is to actually deep copy these things using a FluidPersistance? stream (since these can, by definition, duplicate anything that can be stored in a property. You should close this if this is working for your use case, and follow #71

07/30/2008 10:48:36 AM changed by marc

  • status changed from closed to reopened.
  • resolution deleted.

08/01/2008 07:35:35 AM changed by marc

  • owner changed from marc to mikey.
  • status changed from reopened to new.

11/28/2008 11:35:48 AM changed by marc

  • status changed from new to closed.
  • severity changed.