Question about QofIdType assertion in QofCollection

2014-12-29 Thread Chenxiong Qi
Hi all, In qof_collection_add_entity and qof_collection_insert_entity, it expects, g_return_if_fail (col->e_type == ent->e_type); Is this the actual expectation by checking the equivalence of pointer locations, why not the values? -- Regards, Chenxiong Qi __

Re: Question about QofIdType assertion in QofCollection

2014-12-29 Thread Derek Atkins
Because it's a constant. -derek Sent on my mobile. Please forgive any typos. - Reply message - From: "Chenxiong Qi" To: "gnucash-devel@gnucash.org" Subject: Question about QofIdType assertion in QofCollection Date: Mon, Dec 29, 2014 3:35 AM Hi all, In qof_collection_add_entity and q

some questions on accounts/commodities

2014-12-29 Thread Sébastien de Menten
hello, I have some questions on gnucash behavior regarding some "limit" changes: - a placeholder account: an account can be converted to a placeholder account even if there are splits related to it. Is it expected behavior ? or should the placeholder flag be selectable only if there are no split i

Re: Question about QofIdType assertion in QofCollection

2014-12-29 Thread Chenxiong Qi
On Mon, Dec 29, 2014 at 8:22 PM, Derek Atkins wrote: > Because it's a constant. > Thanks! In following scenario, a QofInstance cannot be added into a QofCollection QofIdType type = "some type"; QofInstance inst = g_object_new (QOF_TYPE_INSTANCE, NULL); inst->e_type = type; QofCollection coll =

Re: Question about QofIdType assertion in QofCollection

2014-12-29 Thread John Ralls
> On Dec 29, 2014, at 7:32 AM, Chenxiong Qi wrote: > > On Mon, Dec 29, 2014 at 8:22 PM, Derek Atkins wrote: >> Because it's a constant. >> > > Thanks! > > In following scenario, a QofInstance cannot be added into a QofCollection > > QofIdType type = "some type"; > QofInstance inst = g_objec

Re: some questions on accounts/commodities

2014-12-29 Thread John Ralls
> On Dec 29, 2014, at 7:17 AM, Sébastien de Menten wrote: > > hello, > > I have some questions on gnucash behavior regarding some "limit" changes: > - a placeholder account: an account can be converted to a placeholder > account even if there are splits related to it. Is it expected behavior ?

Re: some questions on accounts/commodities

2014-12-29 Thread Sébastien de Menten
On Mon, Dec 29, 2014 at 6:36 PM, John Ralls wrote: > > > On Dec 29, 2014, at 7:17 AM, Sébastien de Menten > wrote: > > > > hello, > > > > I have some questions on gnucash behavior regarding some "limit" changes: > > - a placeholder account: an account can be converted to a placeholder > > accoun

Re: some questions on accounts/commodities

2014-12-29 Thread John Ralls
> On Dec 29, 2014, at 12:35 PM, Sébastien de Menten wrote: > > On Mon, Dec 29, 2014 at 6:36 PM, John Ralls > wrote: > > > On Dec 29, 2014, at 7:17 AM, Sébastien de Menten > > wrote: > > > > hello, > > > > I have some questions on gnucash