THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/07/2008 at 15:54, xxxxxxxx wrote:
You need to implement CopyTo/Read/Write and save/load the data 'manually' in these methods. So, when the document is saved, Write() is called and you write out your variable. When the document is loaded, Read() is called and you read the value into the variable. CopyTo() should be implemented as well so that copies of your tag perpetuate the same values.
That said, why not add the 'String check' as a resource to your tag. Anything (and I really mean EVERYTHING) that can be stored as a resource will mitigate this type of issue as the BaseContainer (data instance) is automatically written and read with the document save/load. The only type of data that BaseContainer cannot handle well is arrays.
So, instead of "String check" in your class definition, add an resource description ID to your .h file and something like this to your .res file:
STATICTEXT MYPLUGIN_CHECK { HIDDEN; }
Note that I use STATICTEXT and not STRING as the latter represents an editable field. Why do that for an internal data variable?
Now you have a String data which is not displayed but automatically saved/loaded with the document when your tag is present.