Makes no difference – I had tried that but thanks
From: ajj3085
[mailto:cslanet@lhotka.net]
Sent: Friday, February 06, 2009 10:39 AM
To: jaddington@alexandergracie.com
Subject: Re: [CSLA .NET] Need help fixing yet another
BeginEdit()/CopyState issue
I think you need a NotSerializable attribute as well.
The problem is within the FieldDataManager and it’s
CopyState method. If I swap the field from being a Managed backing field to a private
backing field then the NotUndoable attribute works.
[NotUndoable]
private MissingDataField
_missingData;
//
private static PropertyInfo<MissingDataField> MissingDataProperty =
RegisterProperty<MissingDataField>(typeof(DataField), new
PropertyInfo<MissingDataField>("MissingData"));
Is this expected? It seems to me that the FieldDataManager
may not be checking if the underlying field is NotUndoable?
???
From: ajj3085
[mailto:cslanet@lhotka.net]
Sent: Friday, February 06, 2009 10:39 AM
To: jaddington@alexandergracie.com
Subject: Re: [CSLA .NET] Need help fixing yet another BeginEdit()/CopyState
issue
I think you need a NotSerializable attribute as well.
Jack:The problem is within the FieldDataManager and it’s CopyState method. If I swap the field from being a Managed backing field to a private backing field then the NotUndoable attribute works.
Yes, I've found that managed fields (without backing fields) are generally always serialized and pushed/popped from the state stack in Undo.
I posted a request to have some way to tag such fields (e.g. properties in IPropertyInfo) so they could be not undoable or nonserialized, but I don't think it attracted much interest.
Well I’m on board J. It seems there is one
gotcha after another. A slight misuse of the terminology and you waste a
morning. I’m sure I have type and read managed field, managed property,
managed backed field, backed field, etc. and not really known what it means.
I think I’m going to suggest a Wiki or an online glossary to
help make sense of all this stuff.
jack
From: rsbaker0
[mailto:cslanet@lhotka.net]
Sent: Friday, February 06, 2009 12:44 PM
To: jaddington@alexandergracie.com
Subject: Re: [CSLA .NET] RE: Need help fixing yet another
BeginEdit()/CopyState issue
Jack:
The problem is within the FieldDataManager and it’s CopyState method. If I swap the field from being a Managed backing field to a private backing field then the NotUndoable attribute works.
Yes, I've found that managed fields (without backing fields) are generally
always serialized and pushed/popped from the state stack in Undo.
I posted a request to have some way to tag such fields (e.g. properties in
IPropertyInfo) so they could be not undoable or nonserialized, but I don't
think it attracted much interest.
Copyright (c) Marimer LLC