Class: Gtk::TryExpression

Inherits:
Expression show all
Defined in:
(unknown)

Overview

A GtkExpression that tries to evaluate each of its expressions until it succeeds.

If all expressions fail to evaluate, the GtkTryExpression's evaluation fails as well.

Instance Method Summary collapse

Methods inherited from Expression

#bind, #evaluate, #is_static, #ref, #unref, #value_type, #watch

Constructor Details

#initialize(n_expressions, expressions) ⇒ Gtk::TryExpression

Creates a GtkExpression with an array of expressions.

When evaluated, the GtkTryExpression tries to evaluate each of its expressions until it succeeds.
If all expressions fail to evaluate, the GtkTryExpression's evaluation fails as well.

The value type of the expressions in the array must match.

Parameters:

  • n_expressions (Integer) —

    The number of expressions

  • expressions (Array<Gtk::Expression>) —

    The array of expressions