Re: [Multi-valued V2 (grilo) 11/12] core: Merge GrlDataMulti into GrlData




On Wed, 02 Mar 2011 16:43:48 +0100, "Juan A." Suárez Romero <jasuarez igalia com> wrote:
On Wed, 2011-03-02 at 15:12 +0000, Iago Toral wrote:
> grl_data_remove_property (data, <key>, <index>)


 Also, now that I think about it.
 Do we have API to remove independent values? Something like
 grl_data_remove_nth (data, key, index) that does not take into
account
 relations?
 If we do not have that (and I think we shouldn't have it because it
 would break the semantics of the relations) I think
 grl_data_remove_property could be just renamed to
grl_data_remove_nth.

 What I mean is that when we remove the value for one key we should
 always automatically remove all the data related to it, so I guess
there
 is no reason here to have both remove_nth and remove_property.


No, we do not provide a specific api to remove a specific data: either
you remove all related values, or remove nothing.

Good, I think that is what we should have.
Then I think we should rename grl_data_remove_property to grl_data_remove.

But users can still remove a specific element if they really want: get
the property with the element, and then remove the key from that
property.

Shouldn't we remove that API from GrlProperty then?

Iago


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