QFX import problems

Benoit Grégoire bock at step.polymtl.ca
Thu Aug 5 18:47:57 EDT 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> > Well, since I was told at the time not to use the engine's revert
> > function, there isn't much choice is there...
>
> What "engine's revert function"?

xaccTransRollbackEdit()

> But yes, there is a choice -- you could do what the QIF importer does:
> not actually create a Transaction* or Split* until *after* the user
> hit's OK.  Until the user hit's OK the importer makes no changes
> to the CoA.
>
> Basically the import does the following:
>
> 1) Duplicate the account tree, and always present the new account
>    tree to the user when trying to add new accounts or choose existing
>    accounts.
> 2) Make all transactions with respect to the duplicate account tree.
>    Note that these are not really Transaction* objects, but
> importer-internal objects.
> 3) Once the user is done and clicks "finish" or "ok" then merge back
>    into the real CoA...  Create new accounts as necessary, and create
>    the Transaction*s.

That used to be WAAY too much work.  Maybe now that we have a common framework 
for the importer it would be worth it.  

Still, you have to admit that if I could just xaccTransRollbackEdit() to 
cancel and xaccTransCommitEdit() all at once, we'd have a much cleaner 
solution.  What good is having an engine if we have to reimplement parts of 
it each time we want to mess with it's data? 

- -- 
Benoit Grégoire, http://benoitg.coeus.ca/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBErkdmZ6zzPlLuwMRAogkAKDcD4/lA5e4jX6YO12wJBzL85KJDgCgl9e+
IOvXSCjPndKcpbPPp5VLunE=
=H40g
-----END PGP SIGNATURE-----



More information about the gnucash-devel mailing list