Michaël, <br>can you send the class to the list, so we have an example?<br><br>All, this is somewhat related to the issue we had in the saveFile method. Moving those methods to the engine will have multiple benefits, as we can see.<br>
In my case, I'm interested on Akonadi for calendar and the FinanceStack and a datasource for Plasma (a quick entry plasmoid, anyone?). And from an architecture point of view, it's best to keep the layers separate.<br>
So, with Michaël's help we could check which methods need to be changed, and then work on them to split GUI and engine tasks.<br>What's your thought on this?<br><br>Regards,<br>Alvaro<br><br><div class="gmail_quote">
On Mon, Oct 19, 2009 at 2:38 PM, Michaël Lhomme <span dir="ltr"><<a href="mailto:papylhomme@gmail.com">papylhomme@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br><br>as I already discussed a bit with Thomas and Alvaro, I'm working on an Akonadi resource to display schedules as todos. The most difficult part was to use existing loading methods (in kmymoneyview) without loading the KMM GUI.<br>
<br>The solution I chose is to create a small class dedicated on data loading. I extracted the main method KMyMoneyView::readFile and related methods (checkAccountName, loadDefaultCurrency, loadDefaultCurrencies, loadAncientCurrency, loadAncientCurrencies and ungetString). Then I replaced every "messagebox" and "return false" statements by exceptions. This made the trick for the compilation.<br clear="all">
<br>The next problem was linkage : KGncReader depends on various dialogs, depending themselves on other part of the application, and so on. Finally I ended up including every KMM libs, and declaring a main pointer to the application in my resource (KMyMoney2App* kmymoney2). It's working but it's really ugly ;)<br>
<br>And voila, I hope my experience could help.<br><br>Regards,<br><font color="#888888"><br>Michaël Lhomme<br>
</font><br>_______________________________________________<br>
KMyMoney-devel mailing list<br>
<a href="mailto:KMyMoney-devel@kde.org">KMyMoney-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kmymoney-devel" target="_blank">https://mail.kde.org/mailman/listinfo/kmymoney-devel</a><br>
<br></blockquote></div><br>