take_value


Description:

public bool take_value (owned Value value) throws Error

Sets the value within the holder.

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

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

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

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

Note2: before the change is accepted by this, 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 this can have, or implement some business rules.

Note3: if user previously set this holder with 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.

Parameters:

this

a Holder object

value

a value to set the holder to

Returns:

TRUE if value has been set