Hi, Christian Stimming <[email protected]> writes:
> Zitat von Derek Atkins <[email protected]>: >> How about also putting it into the KVP? This way it would >> survive a 2.2.x read/save. > > Yes, I though of that, too. First I though SX don't have a kvp slot > anyway, but apparently SchedXaction.h says there is a > xaccSchedXactionGetSlot(). However, it's the complete Recurrence > object that won't be loaded by 2.2.x if there is a > <recurrence:weekend_adj> child element. Hence, if KVP should be used > to store the recurrence data as a backup, we would have to store the > complete content of the struct Recurrence (defined in Recurrence.h). > Alternatively the weekend_adj content wouldn't be stored as a child > element at all but it would always be stored as a KVP in the parent > SX. However, in that case I don't know where to place the code to 1. > write the weekend_adj data in the the KVP on savind and 2. read the > data from the KVP on reading and write it into the actual Recurrence > object at the correct time. So basically this solution was all that I > knew about the reading/writing code. Oh, well.. then I guess that wont work. Ah well. >> Obviously if it's none you can >> just leave it blank, but if it's NOT "none" then store it >> in the KVP.. on READ look both for the XML and the KVP >> (where the XML tag takes precedence over the KVP, but the KVP >> is a backup just in case you're loading in from 2.2.x) >> >> Then in 2.5/2.6/3.0 we can turn off the KVP and turn on the >> XML tag. >> >> I believe Phil did this with some other tags recently; I think >> it's the better way to approach the problem. > > Yes, but in Phil's recent case the data was belonging to an object > which already had a KVP, where here, we are dealing with the > Recurrence object which doesn't have KVP. :-( > Regards, > > Christian -derek -- Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory Member, MIT Student Information Processing Board (SIPB) URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH [email protected] PGP key available _______________________________________________ gnucash-devel mailing list [email protected] https://lists.gnucash.org/mailman/listinfo/gnucash-devel
