Bonobo::Unknown



Maciej Stachowiak <mjs@eazel.com> writes:


> 
> > Also, imagine I have A, B and C with interfaces IA, IB, and IC.
> > 
> > I make: 
> > bonobo_object_add_interface (A, B)
> > bonobo_object_add_interface (A, C)
> > B = bonobo_object_QI (A, IB)
> > bonobo_object_QI (B, IC)   ------> this will not return C.
> > 
> > object B does not know about object C.
> 
> That is not correct. the final expression in your list above _will_
> return C. `query_interface' is reflexive, transitive, and symmetric,
> i.e. it is an equivalence relation.

I know what QI is supposed to do and what its properties are supposed to be. 
My point is that the current implementation does not look like it works in 
the case described above.

look at the folowing: 

       for (l = newobj->priv->ao->objs; l; l = l->next) {
               if (!g_list_find (object->priv->ao->objs, l->data)) {
                       object->priv->ao->objs = g_list_prepend (object->priv->ao->objs, l->data);
                       ((BonoboObject *)l->data)->priv->ao = object->priv->ao;
               }
       }

If you use this code to merge A and B and then to merge A and C, 
A's linked list will be updated together with C's one but
the B linked list will not be updated. B will still hold a pointer
to the old linked list (which is gfree'd actually, so, we may have 
a segfault)

Unless I missed something really important, I doubt I am wrong.

Mathieu

-- 
Mathieu Lacage, mathieu@gnu.org
http://www.advogato.org/person/mathieu
ch 224, 212 Rue de Tolbiac, 75013 Paris, France




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]