2009-09-08 GnuCash IRC logs

00:05:37 *** warlord is now known as warlord-afk
00:07:37 *** mark1 has quit IRC
00:14:07 *** XiXaQ has quit IRC
00:18:30 *** Michael1 has joined #gnucash
00:19:30 *** Michael1 has left #gnucash
00:26:58 *** XiXaQ has joined #gnucash
00:30:30 *** abhinav has joined #gnucash
00:54:21 *** fuse512 has joined #gnucash
01:21:03 *** abhinav has quit IRC
01:39:34 *** hvx has joined #gnucash
01:57:05 *** fuse512 has joined #gnucash
02:42:48 *** Demitar has quit IRC
02:47:57 *** Demitar has joined #gnucash
03:01:39 *** hvx has quit IRC
03:05:27 *** fuse512 has quit IRC
03:42:24 *** goodger has quit IRC
03:44:35 *** gjanssens has joined #gnucash
04:22:11 *** ErKa has joined #gnucash
04:26:11 *** gncbot` has joined #gnucash
04:28:24 *** gncbot_ has joined #gnucash
04:34:30 *** gncbot has quit IRC
04:37:03 *** gncbot` has quit IRC
05:09:17 *** nomeata has joined #gnucash
05:52:03 *** ErKa has quit IRC
06:06:37 *** bentob0x has joined #gnucash
06:26:24 *** goodger has joined #gnucash
06:43:01 *** bentob0x has quit IRC
07:44:14 *** Jimraehl has left #gnucash
07:58:44 *** JimRaehl2 has joined #gnucash
08:01:23 *** JimRaehl2 has left #gnucash
08:01:57 *** warlord-afk is now known as warlord
08:02:16 *** JimRaehl2 has joined #gnucash
08:02:58 <gjanssens> I'm fighting with the automake build system (this is my first experience with it), so if someone could give me some help:
08:05:04 <gjanssens> I have made changes in gnc-general-search, that now include gncVendor.h, gncJob.h and friends from business/business-core
08:05:43 <gjanssens> I had to create #include statements with full paths to these header files for the compile to continue
08:05:58 <gjanssens> I wonder if there is a better way ?
08:06:15 <gjanssens> Like adding something to the makefile directly instead.
08:06:52 <gjanssens> But I have never done this before, so I have no idea where I should be adding something: makefile.am, makfile.in ?
08:07:54 <gjanssens> Anyway, next is the link step failing, with errors like
08:08:42 <gjanssens> this /home/janssege/Development/gnucash-trunk/src/gnome-search/.libs/libgncmod-gnome-search.so: undefined reference to `gnc_job_get_type'
08:11:55 <gjanssens> This is no doubt because I have to define somewhere that libgncmod-gnome-search.so now depends on libgncmod-business-core.so
08:12:14 <gjanssens> Where should I add this in the makefiles ?
08:13:14 <gjanssens> [Sidenote]: I hope you don't mind all these beginner's questions too much...
08:13:57 <gjanssens> It's been more that 10 years since I did some basic C/C++ coding and that was before the automake system. So I really have a lot to catch up...
08:21:13 * gjanssens made changes to gnc-general-search' Makefile.am, let's see if that works...
08:30:53 <gjanssens> Ok my changes seem to have worked. On to the next...
08:42:05 <gjanssens> gncQueryCreateFor(type) followed by gncQuerySetBook(book) followed by gncQueryRun
08:42:27 <gjanssens> Is this sufficient to get all entries of type "type" ?
08:44:18 *** nomeata has quit IRC
08:45:29 <gjanssens> Ok, it seems to be. I was looking at a book that didn't have any vendors defined, hence no vendor could be returned from the query
08:54:10 <warlord> gjanssens: you can't do that.
08:54:28 <warlord> That would be a circular dependency.
08:54:37 <warlord> src/gnome-search cannot depend on src/business
08:55:38 <warlord> ... src/business gets built after src/gnome-search, so the .so wont exist.. You can't build it that way.
08:55:50 <gjanssens> Then how do I deal with this ?
08:56:04 <warlord> You've clearly architected your changes wrong.
08:56:13 <warlord> What exactly are you trying to do?
08:56:21 <gjanssens> No doubt
08:56:30 <warlord> Still working on that GtkCompletion?
08:56:33 <gjanssens> Yes
08:56:58 <gjanssens> I am trying to get a list of eg Vendors to display in the GtkCompletion
08:57:28 <gjanssens> For that I need to be able to query for Vendors
08:57:29 <warlord> Ignore that it's a Vendor.. Use the abstract QofInstance.
08:57:59 <warlord> Yes... But you already get the GNCIdTypeConst passed in..
08:58:18 <warlord> so what do you need from the Vendor API that you can't get from the QofInstance API?
08:59:02 <gjanssens> I don't know. I haven't investigated the QofInstance API yet.
08:59:22 <gjanssens> I wonder for example how to get the Vendor name from the QofInstance
08:59:49 <gjanssens> Or how to get the {anyownertype} name from it, to make it more generic
09:00:32 * gjanssens goes of to read about QofInstance some more...
09:00:49 <warlord> Actually, it's QofObject..
09:01:02 <warlord> It's got a "printable" method.
09:01:21 <warlord> What do you mean by "anyownertype"?
09:02:12 <gjanssens> Well there is gncVendor, gncCustomer, gncJob and gncEmployee
09:02:26 <warlord> Right......
09:02:29 <gjanssens> Depending on when gnome-search is instanced, I'll need to query for any of those
09:02:58 <gjanssens> By the way, there's a weird inconsistency between gncEmployee and the others:
09:03:02 <warlord> Right, but the caller knows and specifies it in gnc_general_search_new()
09:03:20 <gjanssens> gncEmploye has a username while all the others have name
09:03:22 <warlord> So YOU dont have to worry about it.
09:03:32 <warlord> Right....
09:05:45 <warlord> @nick gncbot
09:05:46 *** gncbot_ is now known as gncbot
09:05:51 *** warlord sets mode: +o gncbot
09:06:42 <gjanssens> I'm with you on the caller specifying it. But right now I'm still to ignorant on the Qof internals to really get how that helps me setting up a proper query. Give me some time to grok your suggestions...
09:07:49 <warlord> You can just use basic qof params.
09:08:00 <warlord> You don't need any APIs out of src/business.
09:08:08 <warlord> take a look at how the rest of src/gnome-search works.
09:08:36 <gjanssens> ok, thanks
09:10:46 *** XiXaQ has quit IRC
09:11:30 <warlord> You're welcome.
09:11:47 <warlord> Sorry you did all this work and have to re-do it, but honestly what you did just wont build, even with your makefile changes.
09:11:57 <warlord> you can't have circular dependencies.
09:13:16 <gjanssens> No problem. That's part of learning.
09:13:39 <warlord> Glad you feel that way :)
09:14:09 <gjanssens> Heh, as long as you still allow me to ask all these basic questions here :)
09:15:57 <warlord> :)
09:26:44 <gjanssens> warlord:An off-topic question
09:26:54 *** XiXaQ has joined #gnucash
09:26:55 <warlord> shoot
09:27:09 <gjanssens> You have a nick in irc all the time, even if you're not available
09:27:13 <gjanssens> How do you do that ?
09:27:23 <gjanssens> You have some kind of irc-proxy setup ?
09:27:47 <warlord> Nope, I just leave my laptop on 24/7
09:28:01 <gjanssens> Oh, right...
09:28:28 <warlord> :)
09:29:16 <gjanssens> No can do here, so I hoped you had a nifty solution... :)
09:34:13 <warlord> Oh.
09:34:29 <warlord> No, generally you need something to run 24/7. I just leave xchat open
09:36:00 <gjanssens> Great ! The alternative route with QofObject and qof_object_printable is working ! I now have a list of Vendors in a GtkCompletion.
09:36:13 <gjanssens> On to actually do something useful with them now...
09:38:16 *** mark1 has joined #gnucash
09:39:03 <warlord> :)
09:39:38 <warlord> I kinda wish you could delay the query until after the user has typed something. It's quite unfortunate that you have to pre-load the GtkCompletion with all the potential answers.
09:39:51 <warlord> What if you have thousands or tens of thousands of them?
09:39:59 <warlord> (e.g., an invoice search)
09:41:17 <gjanssens> Hmm, if you don't mind, I'd rather leave that an excercise for version 2.
09:41:45 <gjanssens> I think the principles are the same, but the list then has to be populated from another callback.
09:42:36 <gjanssens> I'd rather first focus my attention on actually using "a" list in a way that the selection is also used further in the program. Now it only displays.
09:42:48 <gjanssens> But I'll keep your suggestion in mind.
09:43:26 <gjanssens> As far as I know, gnc-general-search is currently not used for invoices, or am I mistaken ?
09:44:38 <gjanssens> Or should be be kept very generic because it "could" be used for invoices as well in the future ?
09:44:51 <gjanssens> s/be be/it be/
09:49:53 <warlord> It is...
09:50:12 <warlord> It's used as a callback for the various invoice reports to choose which invoice to print.
09:50:17 <warlord> (for example)
09:53:29 *** XiXaQ has quit IRC
10:33:03 *** mark1 has left #gnucash
11:04:20 <gjanssens> I didn't know that. I'll see if I can get it to work as you propose then.
11:04:36 <gjanssens> But after getting it functionally first.
11:04:46 <gjanssens> I'm having another issue
11:05:34 <gjanssens> For me the business functions seem to segfault repeatedly in the svn version.
11:08:07 <gjanssens> To verify, I have removed all my changes, and started with a new, empty book
11:08:23 <gjanssens> Creating a new vendor segfaults
11:09:21 <gjanssens> I'll try a make clean all to see if that changes it
11:18:10 <warlord> If it still happens please get a backtrace in gdb and file a bug report.
11:18:26 <gjanssens> I will
11:31:52 *** XiXaQ has joined #gnucash
11:34:20 *** ErKa has joined #gnucash
11:37:41 <warlord> THanks
11:45:46 *** KaiForce has joined #gnucash
11:46:46 <gjanssens> Bugzilla Bug 594513
11:48:47 *** blizgerg has quit IRC
11:51:23 *** abhinav has joined #gnucash
11:53:29 <warlord> great.
11:54:33 <gjanssens> I discovered this issue first when trying to open the Easy invoice report to look at the gnc-general-search use there
11:54:49 <gjanssens> That crashed Gnucash right away.
11:55:08 <gjanssens> In a new file there are no invoices yet, so I can't test it there.
11:55:34 <gjanssens> Would you like me to also send a backtrace from a crash when opening the Easy Invoice report ?
11:56:00 <gjanssens> I'm not sure it's the same issue, but I may be.
11:56:27 <warlord> I bet it's the same issue.. W
11:56:32 <warlord> What version of swig are you using?
11:56:57 <warlord> The bug appears to be in SWIG, or at least in the swig-generated code.
11:57:11 <warlord> Did you have a partially-built tree and then upgrade your dist?
11:57:17 <gjanssens> rpm -q swig
11:57:20 <warlord> ... or did the swig version change?
11:57:29 <gjanssens> swig-1.3.38-2mdv2009.1
11:57:58 <warlord> you're on Mandriva?
11:58:02 <gjanssens> yes
11:58:08 <warlord> Hmm. FWIW:
11:58:09 <warlord> rpm -q swig
11:58:09 <warlord> swig-1.3.39-3.fc10.i386
11:58:22 <warlord> I wonder if there's a bug in 1.3.38?
11:59:03 <gjanssens> I think I have had the build tree already since the previous install of my dist.
11:59:13 <gjanssens> I did make distclean before building though
11:59:39 <gjanssens> Should I wipe my source dir and start from scratch ?
11:59:57 <gjanssens> (It's all svn so I can easily readd my changes)
12:01:46 <warlord> Umm.. couldn't hurt.
12:01:55 <warlord> I dont think "distclean" is sufficient.
12:02:00 <gjanssens> Ok, there I go...
12:02:03 <warlord> "maintainer-clean" might be sufficient.
12:02:17 <gjanssens> I didn't know that one yet.
12:03:27 *** XiXaQ has quit IRC
12:29:44 <gjanssens> When starting from a clean checkout, the bug is no longer reproducible. I have closed the bug as INVALID.
12:29:52 <warlord> Okay.
12:29:54 <warlord> Thanks.
12:30:42 *** hvx has joined #gnucash
12:39:39 <gjanssens> toolchain question
12:40:00 <gjanssens> each time I run a make install, about all of the shared libraries get relinked
12:40:10 <gjanssens> is that necessary?
12:40:26 <gjanssens> It takes a very long time on my machine (5-10 minutes)
12:51:53 <warlord> Yes, but it may not be necessary to rebuild all of gnucash..
12:52:01 <warlord> (or re-install all of gnucash)
12:52:18 <warlord> if all you're doing is modifying some .c files, then you only need to rebuild/reinstall that subdir.
12:52:35 <warlord> (if you modify .h files then yes, you need to rebuild/reinstall the full tree)
12:52:39 <gjanssens> ok, I'll try that
13:01:01 *** ErKa has quit IRC
13:24:01 *** bentob0x has joined #gnucash
14:15:43 <gjanssens> Running into another segfault, but this time it's because of my changes.
14:16:00 <gjanssens> I could use some advice here (again)
14:17:08 <gjanssens> I set up a QofQuery to query for Jobs/Vendors/Customers/Employees, depending on what is searched.
14:17:39 <gjanssens> This query is created locally inside the creation code for the search widget.
14:18:51 <gjanssens> This works fine while opening the new invoice window for a vendor, I see in gdb that the creation code is run twice, once for vendors and once for jobs
14:19:29 <gjanssens> Then I continue to select a vendor (the old way via the select button)
14:20:02 <gjanssens> When the search window closes (because I actually selected a vendor), the creation code is run again
14:20:27 <gjanssens> I presume the search widget is completely recreated at this point.
14:20:58 <gjanssens> But this time, as soon as the QofQueryCreateFor function is called, GC segfaults.
14:21:38 <gjanssens> So far I never free the queries I create. So I wonder, should I do so ?
14:22:08 <gjanssens> I read I shouldn't free the query *results*, but now I'm not sure about the query itself.
14:22:43 <gjanssens> Can/should it be freed after the results have been processed ?
14:27:06 <warlord> Well, yes, you should free the queries..
14:28:24 *** RobotCow has joined #gnucash
14:30:35 *** RobotCow has quit IRC
14:47:27 *** blizgerg has joined #gnucash
15:08:36 *** blizgerg has quit IRC
15:11:43 *** sjc has joined #gnucash
15:57:30 *** ErKa has joined #gnucash
16:03:43 *** hvx has quit IRC
16:23:52 <gjanssens> The HACKING file contains a procedure to attach the gdb debugger to a running GnuCash instance
16:24:30 <gjanssens> As I understand it, this was the only valid procedure in older versions of Gnucash, where the starting "executable" was a Guile script.
16:25:50 <gjanssens> Now that the starting application is gnucash-bin (a c app), is it not simpler to set the environment and then start
16:25:53 <gjanssens> gdb gnucash-bin <command line params> ?
16:26:02 *** ErKa has quit IRC
16:26:15 <gjanssens> This is what the gnucash-gdb script in bin appears to do
16:26:38 <gjanssens> Just wondering if I should mention this in HACKING
16:37:02 *** XiXaQ has joined #gnucash
16:41:11 <gjanssens> Well, I've created a patch for HACKING anyway and sent it to the devel mailinglist
16:43:47 <warlord> Either way. Sometimes I think a gdb attach is just easier. Or you can use the gnucash-gdb.
16:44:25 <gjanssens> That's why I have kept both ways into the HACKING file
16:53:02 *** nimrod has joined #gnucash
16:53:57 *** nimrod has left #gnucash
17:01:25 *** XiXaQ has quit IRC
17:13:01 *** Simon has quit IRC
17:13:04 *** Simon has joined #gnucash
17:15:47 *** cortana has joined #gnucash
17:20:19 *** gjanssens has quit IRC
18:28:12 *** XiXaQ has joined #gnucash
18:52:25 *** XiXaQ has quit IRC
19:00:28 *** abhinav has quit IRC
19:11:47 *** bentob0x has quit IRC
19:19:19 *** abhinav has joined #gnucash
19:31:43 *** warlord is now known as warlord-afk
20:42:00 *** cortana has quit IRC
20:51:41 *** blizgerg has joined #gnucash
20:53:37 <blizgerg> hmmm
20:56:46 <blizgerg> Is there a way to tell gnucash on windows to not appear off screen? (I have a multi monitor setup and apparently gnucash remembers it's real coordinates, I remember reading somewhere that you could use some other api feature and it would always appear 'correct' automatically but whatever)
20:57:37 <blizgerg> I like to place it on my second monitor when I have it connected but then if I forget to move it back I have to use the move menu trick to get it back on screen...
20:57:48 <blizgerg> when I have only one connected
20:58:30 <blizgerg> only a minor niggle to me as I know how to fix it each time with two key presses...
21:02:35 *** sjc has quit IRC
21:40:49 *** KaiForce has quit IRC
21:56:56 *** JimRaehl2 has left #gnucash
21:57:16 *** Jimraehl has joined #gnucash
22:06:21 *** twunder has joined #gnucash
23:51:22 *** abhinav has quit IRC