Re: QOF iteration and callbacks

2004-06-20 Thread Derek Atkins
[EMAIL PROTECTED] (Linas Vepstas) writes: >> True. I was sort of thinking in terms of "g_object" (or gtk_object).. >> Which sort of makes some basic level of sense to me.. *shrugs* > > Is this an explicit statement of support for g_objects? In the past, > you've seemed allergic to them, and so

Re: QOF iteration and callbacks

2004-06-20 Thread Linas Vepstas
On Sun, Jun 20, 2004 at 02:20:17PM -0400, Derek Atkins was heard to remark: > > But I see no reason not to combine them.. > Unless there is a strong reason why queriable objects and 'storable' > objects need to be (or should be) different. OK. > >> So what's your conceptual distinction between

Re: QOF iteration and callbacks

2004-06-20 Thread Derek Atkins
[EMAIL PROTECTED] (Linas Vepstas) writes: > Well, you're the guy who made this distinction when you wrote > the code way back when ... :) > > -- object defines the relationship to the 'backend'. > -- class defines parameters. I had no QofClass, only QofObject... "Class" (and "Instance" were add

Re: QOF iteration and callbacks

2004-06-20 Thread Linas Vepstas
On Sun, Jun 20, 2004 at 12:45:37PM -0400, Derek Atkins was heard to remark: > [EMAIL PROTECTED] (Linas Vepstas) writes: > > > On Sun, Jun 20, 2004 at 12:16:20PM -0400, Derek Atkins was heard to remark: > >> > void qof_class_foreach (QofClassForeachCB, gpointer user_data); > >> > >> We already had

Re: QOF iteration and callbacks

2004-06-20 Thread Derek Atkins
[EMAIL PROTECTED] (Linas Vepstas) writes: > On Sun, Jun 20, 2004 at 12:16:20PM -0400, Derek Atkins was heard to remark: >> > void qof_class_foreach (QofClassForeachCB, gpointer user_data); >> >> We already had qof_object_foreach_type(); why do we need a >> qof_class_foreach()? > > I am thinking a

Re: QOF iteration and callbacks

2004-06-20 Thread Linas Vepstas
On Sun, Jun 20, 2004 at 05:12:09PM +0100, Neil Williams was heard to remark: > > The final code should open up all sorts of possibilities, like closing books > easily I've already got code that closes books; its been checked in and operational for a while (years?), except that the business clas

Re: QOF iteration and callbacks

2004-06-20 Thread Linas Vepstas
On Sun, Jun 20, 2004 at 12:16:20PM -0400, Derek Atkins was heard to remark: > > void qof_class_foreach (QofClassForeachCB, gpointer user_data); > > We already had qof_object_foreach_type(); why do we need a > qof_class_foreach()? I am thinking about merging object and class into one thing. Maybe

Re: QOF iteration and callbacks

2004-06-20 Thread Derek Atkins
[EMAIL PROTECTED] (Linas Vepstas) writes: > On Sun, Jun 20, 2004 at 12:02:28PM -0400, Derek Atkins was heard to remark: >> >> The idea here is a general BookMerge, to allow you to combine two >> books together. This has many purposes: > > Ahh, OK, that makes sense. I've sort-of wanted that featu

Re: QOF iteration and callbacks

2004-06-20 Thread Neil Williams
On Sunday 20 June 2004 4:46, Linas Vepstas wrote: > > I've posted the code as it was this morning (see other message) and I can > > explain why a GSList of parameter names is sufficient for me and, > > probably, would be better than a foreach of the entire list for my needs. > > Hmm. I've found tha

Re: QOF iteration and callbacks

2004-06-20 Thread Linas Vepstas
On Sun, Jun 20, 2004 at 12:02:28PM -0400, Derek Atkins was heard to remark: > > The idea here is a general BookMerge, to allow you to combine two > books together. This has many purposes: Ahh, OK, that makes sense. I've sort-of wanted that feature for a while. (well, for gnotime, actually, but

Re: QOF iteration and callbacks

2004-06-20 Thread Derek Atkins
[EMAIL PROTECTED] (Linas Vepstas) writes: >> The original scenario involved just adding a single invoice - in that case, I > > I haven't yet read the back-emails. If you're working with invoices, > why would you need to know about all objects or all paramters? > Don't you already ahve a clear i

Re: QOF iteration and callbacks

2004-06-20 Thread Neil Williams
On Sunday 20 June 2004 4:28, Neil Williams wrote: > > The original scenario involved just adding a single invoice - in that case, > I only need to work on certain accounts. Sure, when merging a closed book > into an open book, it'll all come in to play but that may take some time. i.e. The user ma

Re: QOF iteration and callbacks

2004-06-20 Thread Linas Vepstas
On Sun, Jun 20, 2004 at 04:28:43PM +0100, Neil Williams was heard to remark: > On Sunday 20 June 2004 4:12, Linas Vepstas wrote: > > On Fri, Jun 18, 2004 at 04:49:37PM -0400, Derek Atkins was heard to remark: > > > Neil Williams <[EMAIL PROTECTED]> writes: > > > > "one can then ask, at run time, wh

Re: QOF iteration and callbacks

2004-06-20 Thread Neil Williams
On Sunday 20 June 2004 4:12, Linas Vepstas wrote: > On Fri, Jun 18, 2004 at 04:49:37PM -0400, Derek Atkins was heard to remark: > > Neil Williams <[EMAIL PROTECTED]> writes: > > > "one can then ask, at run time, what parameters are associated with a > > > given type, even if those parameters were n

Re: QOF iteration and callbacks

2004-06-20 Thread Linas Vepstas
On Fri, Jun 18, 2004 at 04:49:37PM -0400, Derek Atkins was heard to remark: > Neil Williams <[EMAIL PROTECTED]> writes: > > > "one can then ask, at run time, what parameters are associated with a given > > type, even if those parameters were not known at compile time." > > src/doc/html/group__Cla

Re: QOF iteration and callbacks

2004-06-18 Thread Derek Atkins
Neil Williams <[EMAIL PROTECTED]> writes: > "one can then ask, at run time, what parameters are associated with a given > type, even if those parameters were not known at compile time." > src/doc/html/group__Class.html Yes, at this point there are no APIs to implement this. > I can see how to

Re: QOF iteration and callbacks

2004-06-18 Thread Neil Williams
On Friday 18 June 2004 9:24, Neil Williams wrote: > The most recent (working) draft is back on codehelp: http://www.codehelp.co.uk/code/basic.c Sorry. -- Neil Williams = http://www.codehelp.co.uk/ http://www.dclug.org.uk/ http://www.isbn.org.uk/ http://sourceforge.net/projects/isbn

Re: QOF iteration and callbacks

2004-06-18 Thread Neil Williams
"one can then ask, at run time, what parameters are associated with a given type, even if those parameters were not known at compile time." src/doc/html/group__Class.html I can see how to query individual parameters from qofclass when you know the name and I've got access to the getter and sette

Re: QOF iteration and callbacks

2004-06-18 Thread Derek Atkins
Neil Williams <[EMAIL PROTECTED]> writes: > On Friday 18 June 2004 3:08, Linas Vepstas wrote: >> On Thu, Jun 17, 2004 at 10:46:33AM -0400, Derek Atkins was heard to remark: >> > > void gnc_bm_foreach (QofEntity obj, gpointer ud1); doesn't work. Why? >> > >> > You need (QofEntity* obj, gpointer ud1

Re: QOF iteration and callbacks

2004-06-18 Thread Neil Williams
On Friday 18 June 2004 3:08, Linas Vepstas wrote: > On Thu, Jun 17, 2004 at 10:46:33AM -0400, Derek Atkins was heard to remark: > > > void gnc_bm_foreach (QofEntity obj, gpointer ud1); doesn't work. Why? > > > > You need (QofEntity* obj, gpointer ud1). > > I'm guessing that the * was dropped accide

Re: QOF iteration and callbacks

2004-06-18 Thread Linas Vepstas
On Thu, Jun 17, 2004 at 10:46:33AM -0400, Derek Atkins was heard to remark: > > void gnc_bm_foreach (QofEntity obj, gpointer ud1); doesn't work. Why? > > You need (QofEntity* obj, gpointer ud1). I'm guessing that the * was dropped accidentally, and then Niel had a very hard seeing that it was m

Re: QOF iteration and callbacks

2004-06-17 Thread Derek Atkins
Neil Williams <[EMAIL PROTECTED]> writes: > On Thursday 17 June 2004 4:22, Derek Atkins wrote: >> Neil Williams <[EMAIL PROTECTED]> writes: >>qof_object_foreach(QOF_TYPE_XXX, book, my_foreach_cb, my_cb_arg); >> Well, DUH, gnc_book_merge_foreach doesn't match the QofEntityForeachCB >> type! >

Re: QOF iteration and callbacks

2004-06-17 Thread Neil Williams
On Thursday 17 June 2004 4:22, Derek Atkins wrote: > Neil Williams <[EMAIL PROTECTED]> writes: >qof_object_foreach(QOF_TYPE_XXX, book, my_foreach_cb, my_cb_arg); > Well, DUH, gnc_book_merge_foreach doesn't match the QofEntityForeachCB > type! That's what I can't get straight. I haven't used