On Wednesday 07 January 2004 14:52, Derek Atkins wrote:
> Hi,
>
> I've been trying to put down into writing how I feel about the
> new qif importer.  I've got two open questions about it (inline
> in the text).

Ok, a few thoughts

>QUESTION: How does the importer relate the processing state back to
>the UI?  Simiarly, how does it pass back specific disambiguating
>questions to ask the user (and how are those responses returned to the
>importer)?

The way I see it every page in the importer Druid should provide some kind of 
service to the backend.  So I think it may be best for the backend to drive 
the gui, as not every backend will need every service.

So the flow would go something like this: (B is the backend, G is the GUI):

Backend is initialised by gnucash
B: Wake up and give me a list of filenames to process
(G asks user)
G: Here's a list of filenames
(B processes)
B: Oups, this date format is ambiguous, here's a list of typical dates, tell 
me the right format.
G: The right format is: (element in an enum or whatever)
B: Ok, done.  Now here's a table with a list of commodities in the file (Key 
in the file, description, link to gnucash commodity).  Ask the user to 
fill/verify them.
G:  Here's your table, 
B: Ok, now fill this table with gnucash accounts matching the following 
accounts/categories/investment income for stock X.
G:  Here your table
(B does complete merge and unambiguous duplicate detection)
B:  Ok, here's a list of the transactions to be imported.  For each one, tell 
me what to do (discard, reconcile, import as new) and while you are at it 
would you be so nice as to add a split to those that only have one split.
G:  Ok, here's what to do for each one.
B:  As computers always do what they are told, and never what the user want, 
could you show the user all transactions in a register so he can double 
check, comment them and otherwise mess them up
G:  Stupid biological unit in front of me says everything is ok.
(B commits transactions)
B:  The file contains dated balances for the following account.  Ask the user 
if he wants to reconcile the account with that amount.
(G displays a window with a reconcile button for each account)
G:  Ok done
(B destroys G)

If one of the step isn't needed, the backend tells the GUI to skip the page.  
The backend always wait's for a signal from the GUI that the requested step 
is complete, and the GUI never waits for anything.



-- 
Benoit Grégoire, http://step.polymtl.ca/~bock/
_______________________________________________
gnucash-devel mailing list
[EMAIL PROTECTED]
http://www.gnucash.org/cgi-bin/mailman/listinfo/gnucash-devel

Reply via email to