m_peretz
01-23-2008, 11:29 AM
I am not sure if this is a bug or not, but I am unable to use ProxyTargetType = true on a Form class. I get an error with the proxy at configuration time. I tried on an empty winform and it crashed, but when I use my factory on a regualr class it works... here is a the code
Note: Form1 = a regualr .net winform with nothing in it, Expect .net generated code when creating it.
<object id="foo" type="MvpExample.Form1, MvpExample" singleton="false"/>
<object id="LogonViewProxy"
type="Spring.Aop.Framework.ProxyFactoryObject, Spring.Aop">
<property name="ProxyTargetType">
<value>true</value>
</property>
<property name="TargetSource">
<object type="Spring.Aop.Target.PrototypeTargetSource, Spring.Aop">
<property name="TargetObjectName" value="foo" />
</object>
</property>
</object>
I am using Spring 1.1, the error I get is this:
Error creating context 'spring.root': The property with name ArraySubType can't be found in the type System.Runtime.InteropServices.MarshalAsAttribute, but is present as a named property on the attributeData [System.Runtime.InteropServices.MarshalAsAttribute( (System.Runtime.InteropServices.UnmanagedType)44, ArraySubType = 0, SizeParamIndex = 0, SizeConst = 0, IidParameterIndex = 0, SafeArraySubType = 0, MarshalType = "System.Windows.Forms.Control+ActiveXFontMarshaler", MarshalTypeRef = System.Windows.Forms.Control+ActiveXFontMarshaler, MarshalCookie = "")]
Please let me know if this is a bug, or if I am using the feature wrong. I am trying to create an Aspect on a Form using inheritance, for the simple reason that I need to have Application.Run work with it.
Note: Form1 = a regualr .net winform with nothing in it, Expect .net generated code when creating it.
<object id="foo" type="MvpExample.Form1, MvpExample" singleton="false"/>
<object id="LogonViewProxy"
type="Spring.Aop.Framework.ProxyFactoryObject, Spring.Aop">
<property name="ProxyTargetType">
<value>true</value>
</property>
<property name="TargetSource">
<object type="Spring.Aop.Target.PrototypeTargetSource, Spring.Aop">
<property name="TargetObjectName" value="foo" />
</object>
</property>
</object>
I am using Spring 1.1, the error I get is this:
Error creating context 'spring.root': The property with name ArraySubType can't be found in the type System.Runtime.InteropServices.MarshalAsAttribute, but is present as a named property on the attributeData [System.Runtime.InteropServices.MarshalAsAttribute( (System.Runtime.InteropServices.UnmanagedType)44, ArraySubType = 0, SizeParamIndex = 0, SizeConst = 0, IidParameterIndex = 0, SafeArraySubType = 0, MarshalType = "System.Windows.Forms.Control+ActiveXFontMarshaler", MarshalTypeRef = System.Windows.Forms.Control+ActiveXFontMarshaler, MarshalCookie = "")]
Please let me know if this is a bug, or if I am using the feature wrong. I am trying to create an Aspect on a Form using inheritance, for the simple reason that I need to have Application.Run work with it.