OFX Select Account dialog- Cancel button doesn't cancel import

Benoit Grégoire bock@step.polymtl.ca
Wed, 18 Sep 2002 23:21:29 -0400

On Wed 18 September 2002 11:12, John wrote:
> Situation:
> -gnucash does not recognize an account in an .ofx file when performing
> an .ofx import
> -'Select Account' dialog pops up
> -press 'Cancel' button
> Actual Response
> -'Select Account' dialog closes but then reopens at same point
> -pressing "Cancel' button multiple times does not cancel dialog nor .ofx
> import

Argh, this is actually the expected behavior, but it was pretty silly of me.  
What happens is that gnucash cancels successfully, and then receives the 
first transaction for that account.  It searches for an account matching the 
account id for that transaction, fails (we didn't create it), so asks to 
create an account for that transaction.  Ad nauseum.

> Proposed Response
> -Another dialog pops up and asks 'Do you want to cancel the import?'
> 'Yes/No'

What I propose instead is to make it so when you cancel, it will ignore all 
transaction until the next account is encountered.  If the ofx file contains 
more than one account, the user will still have to press cancel multiple 
times (but only once for each account).  This way he can skip a account 
downloaded by error (very common) without aborting the whole process and 
downloading a new OFX file.

Benoit Grégoire
LibOFX http://step.polymtl.ca/~bock/libofx/