Re: gvaluearray with all elements of the same type

On 31 May 2001, Martin Baulig wrote:

> Hi guys,
> currently, GValueArray allows you to add GValues of any arbitrary
> type and to mix differently typed values in the same array.
> Sure, this may be very useful in many situations, but it maps badly
> to a CORBA sequence.
> Any ideas ?

i'm not sure how you use it, however, as a GObject property
(or a container child property) you get to specify the pspec
for the value array, and if that has an element_spec != NULL,
it enforces all values to comply to that type.
of course you could also use that pspec with a value array
if you don't use the values for properties, you just need to
validate (g_param_value_validate()) the value array with a pspec
that has an element_spec and you're set.

> -- 
> Martin Baulig
> martin gnome org (private)
> baulig suse de (work)


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