On 13.09.2013 01:56, Zelazny, Michael Stanley wrote:
If the db library hard codes the time field, it is reasonable for
autosave to similarly hard code the time field?
Not really.
Well, maybe.
Pointing TSEL to other fields (like .VAL) is valid. The obtained value
is interpreted as an event number, and the timestamp of the last
occurence of that event is being used. (Requires an event system driver.)
The only way autoSaveRestore could find out if that link to .VAL was
put there intentionally or if it was converted from a link to .TIME
would be looking at the internal flag of the pv_link.
(ppv_link->pvlMask & pvlOptTSELisTime)
I don't know ... that looks a lot like working around a dirty hack
with another dirty hack.
Maybe using a new magic number for TSE would be a cleaner solution:
"-3" = use timestamp of record that TSEL points to.
That would make things a lot more obvious and autoSaveRestore would
just work.