G
Guest
I have a custom CollectionEditor which has been working nicely for a long
time in .NET 1.1. We just converted to .NET 2.0, recompiled everything, got
rid of the deprecated function calls, etc...
Now, when I run my app, I can bring up the collection editor initially with
no problems, but when I attempt to bring it up a second time, within the
lifetime of the app, I get a null reference error from my override on
EditValue, right on the call to base.EditValue. Here is the stack trace:
System.NullReferenceException was unhandled by user code
Message="Object reference not set to an instance of an object."
Source="System.Windows.Forms"
StackTrace:
at System.Windows.Forms.PropertyGrid.set_SelectedObjects(Object[]
value)
at
System.ComponentModel.Design.CollectionEditor.CollectionEditorCollectionForm.UpdateEnabled()
at
System.ComponentModel.Design.CollectionEditor.CollectionEditorCollectionForm.ResumeEnabledUpdates(Boolean updateNow)
at
System.ComponentModel.Design.CollectionEditor.CollectionEditorCollectionForm.OnEditValueChanged()
at
System.ComponentModel.Design.CollectionEditor.CollectionForm.set_EditValue(Object value)
at
System.ComponentModel.Design.CollectionEditor.EditValue(ITypeDescriptorContext context, IServiceProvider provider, Object value)
at
Pathfinder.EditProfileForm.AttribCollectionEditor.EditValue(ITypeDescriptorContext
dc, IServiceProvider sp, Object o) in
C:\VSSBLD\06.09.01\WindowsApplication\Pathfinder\EditProfileForm.cs:line 10055
at
System.Windows.Forms.PropertyGridInternal.GridEntry.EditPropertyValue(PropertyGridView iva)
Are there some new properties and/or methods on the CollectionEditor in .NET
2.0 that we need to be aware of?
Thanks,
-- TB
time in .NET 1.1. We just converted to .NET 2.0, recompiled everything, got
rid of the deprecated function calls, etc...
Now, when I run my app, I can bring up the collection editor initially with
no problems, but when I attempt to bring it up a second time, within the
lifetime of the app, I get a null reference error from my override on
EditValue, right on the call to base.EditValue. Here is the stack trace:
System.NullReferenceException was unhandled by user code
Message="Object reference not set to an instance of an object."
Source="System.Windows.Forms"
StackTrace:
at System.Windows.Forms.PropertyGrid.set_SelectedObjects(Object[]
value)
at
System.ComponentModel.Design.CollectionEditor.CollectionEditorCollectionForm.UpdateEnabled()
at
System.ComponentModel.Design.CollectionEditor.CollectionEditorCollectionForm.ResumeEnabledUpdates(Boolean updateNow)
at
System.ComponentModel.Design.CollectionEditor.CollectionEditorCollectionForm.OnEditValueChanged()
at
System.ComponentModel.Design.CollectionEditor.CollectionForm.set_EditValue(Object value)
at
System.ComponentModel.Design.CollectionEditor.EditValue(ITypeDescriptorContext context, IServiceProvider provider, Object value)
at
Pathfinder.EditProfileForm.AttribCollectionEditor.EditValue(ITypeDescriptorContext
dc, IServiceProvider sp, Object o) in
C:\VSSBLD\06.09.01\WindowsApplication\Pathfinder\EditProfileForm.cs:line 10055
at
System.Windows.Forms.PropertyGridInternal.GridEntry.EditPropertyValue(PropertyGridView iva)
Are there some new properties and/or methods on the CollectionEditor in .NET
2.0 that we need to be aware of?
Thanks,
-- TB