[NotUndoable] implementation

[NotUndoable] implementation

Old forum URL: forums.lhotka.net/forums/t/10016.aspx


rxelizondo posted on Wednesday, February 02, 2011

<<< DELETED>>>

----------------------------

[EDIT]

Ooops, sorry about replacing my original post with <<DELETED>>.

I wanted to post a question about the NotUndoable attribute but I was in a hurry to leave and ended up copy / paste the wrong thing. I wanted to delete it before anyone answered but Jonny responded at the same time I was deleting it… Sorry Jonny.

Since I can no longer delete the post…. the question that I originally intended to ask was if anyone could provide me with some links to other post where the issue about possible alternatives to not using the NotUndoable attribute had been discussed.

Basically why do we have to resort to using unmanaged field for undoable functionality when it appears that we could use the managed field with some flag that indicates the field is not undoable? I have a strong feeling that has been discussed before.

Sorry again.

 

JonnyBee replied on Wednesday, February 02, 2011

Or how about if we add some extra code to

DefaultPropertyInfoFactory

 

To check for NotUndoable attribute and store this in a boolean property in the PropertyInfo object?

DefaultPropertyInfoFactory already checks for DisplayNameAttribute on the property to set FriendlyPropertyName (if this is not specified) and is only run the first time the code touch the class so it wouldn't be time consuming reflection calls during CopyState or UndoChanges.

This would only require small changes to PropertyInfo and the IUndoableObject implementation in FieldDataManager.

rxelizondo replied on Wednesday, February 02, 2011

 

No need to answer this by the way, I quick search on this forum answered my question.

Thanks.

Copyright (c) Marimer LLC