r21577 - gnucash/trunk/src/backend/xml - Fix xml backend to load and save invoice kvp values.
John Ralls
jralls at ceridwen.us
Fri Dec 9 18:28:43 EST 2011
On Dec 9, 2011, at 6:53 AM, Derek Atkins wrote:
> Christian Stimming <christian at cstimming.de> writes:
>
>> Am Donnerstag, 8. Dezember 2011, 07:12:37 schrieb John Ralls:
>>> Actually, just checking for the existence of any keys starting with
>>> "feature" in the Book's KVP and raising a GNC_BACKEND_TOO_NEW could be done
>>> pretty quickly in both.
>>
>> Yes. However, I wonder how in the long run the error message could be
>> slightly more helpful. As an error message should tell about features
>> that are in the data file, but not yet known to the older program
>> version trying to load the data file, such a feature list should
>> contain at least one string that can be shown to the user. It will be
>> english only (no translations), but at least the error message will
>> say something like this:
>>
>> "Cannot load the data file. It is from a newer version of gnucash and it
>> uses the feature "Invoices for a cup of coffee". As the newer version of
>> gnucash has stored some data for this new feature, you cannot use the data
>> file with this older version anymore."
>>
>> Then, users wanting to avoid this error can go to the FAQ and/or gnucash-user
>> and ask how to avoid this particular feature in the newer gnucash, so that
>> they will still be able to use the file in older gnucash.
>
> Sure. So how about a KVP that looks like:
>
> /features/
> name <string> = description
>
>
> So, the 'features' subtree would only exist once there is a named
> feature, so we can still look (in 2.4) for the existence of the
> 'features' subtree to decide whether to error out. And the named
> features' value would be the printable description which can be used for
> the error message. So in this case:
>
> /features/credit-notes<string> = "Business Credit Notes"
OK, that will work.
I've just made sure that make distcheck passes on the 2.4 branch, but I guess we want to hold the release until this is in.
Regards,
John Ralls
More information about the gnucash-devel
mailing list