Holder.takeValue

Sets the value within the holder. If holder is an alias for another holder, then the value is also set for that other holder.

On success, the action of any call to gda.holder.Holder.forceInvalid is cancelled as soon as this method is called (even if holder's value does not actually change).

If the value is not different from the one already contained within holder, then holder is not changed and no signal is emitted.

Note1: if holder can't accept the value value, then this method returns FALSE, and holder will be left in an invalid state.

Note2: before the change is accepted by holder, the "validate-change" signal will be emitted (the value of which can prevent the change from happening) which can be connected to to have a greater control of which values holder can have, or implement some business rules.

Note3: if user previously set this holder with gda_holder_take_static_value () the GValue stored internally will be forgiven and replaced by the value. User should then take care of the 'old' static GValue.

class Holder
bool
takeValue

Parameters

value gobject.value.Value

a value to set the holder to

Return Value

Type: bool

TRUE if value has been set

Throws