[Kmymoney-devel] Some experimentd trying to move loading methods out of the GUI

Alvaro Soliverez asoliverez at gmail.com
Wed Oct 21 13:48:55 CEST 2009


On Wed, Oct 21, 2009 at 6:09 AM, tonyb <tonyb.lx at ntlworld.com> wrote:

> On Tuesday 20 Oct 2009 13:48:55 Alvaro Soliverez wrote:
> > Tony, can you check if it's possible to have the GNC work differently?
> >
> > I don't know if the GNC loader should remain in the GUI or in the engine,
> > depending on which resources it uses.
> > If it should be in the engine, then the GUI calls have to be separated
> and
> > the dialogs should be replaced by exceptions.
>
> I've been sorta following this thread, but I'm not quite clear what the
> problem is vis-a-vis the GNC reader.
>
> The original reader was part of the engine. Rewriting it was my first KMM
> project (since I converted from GNC and was reasonably familiar with it). I
> introduced the GUI stuff to provide some options and more flexibility - in
> perfect ignorance of the 'no GUI in engine' rule. When Thomas pointed that
> out
> to me, we moved it into the converter section.
>
> (I'm on holiday tomorrow - again! - for 6 days so don't look for an early
> reply.)
>
>
Ok. I had a quick glance at the code and I think in your case you don't have
to do anything, at least for now.
What I think we should do is separate all the GUI from the actual code doing
the reading. That way, if other application intend to access our file, they
can do it. In case of errors, exceptions should be thrown, so that our GUI,
or other application's GUI can catch the errors and treat them accordingly.

So, what Thomas told you still stands, but we are moving, or at least, I
intend this to happen, some code, which is not GUI but rather IO, back to
the engine.

So, should we go ahead with the change? Do we move the open/close/save IO
code to the engine? Which class? MyMoneyFile I think has the best odds here,
rather than a new class.

I have been kind of on and off lately. Life has been rough here, with
changes at work, and too much stuff going on at home. I haven't had much
time to code lately, and then I haven't been sleeping much, so my code
mostly sucks. :)
Just a quick explanation as to why I don't do this myself. My concentration
skills are on par with those of a kid with attention disorder. :)

Regards,
Alvaro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kmymoney-devel/attachments/20091021/ca198102/attachment.htm 


More information about the KMyMoney-devel mailing list