Label
Standard Bindings
A label provides the following standard bindings:
returns | service | description |
Form | this.bind(aForm) | Returns a form containing the binding of this label to aForm. |
Boolean | this.exists(aForm) | Returns true if this label exists in aForm, returns false otherwise. |
String | this.name() | Returns a string representing the name of this label. |
Form | this.project(aForm) | Returns the projection of aForm to this label. |
Form | this.restrict(aForm) | Returns aForm without this label. |
Boolean | this == aForm | Returns true if this label is equal to aForm, false otherwise. |
Boolean | this != aForm | Returns true if this label is not equal to aForm, false otherwise. |
JPiccola
In JPiccola, a label additionally provides the following bindings:
Form | this.hide(aForm) | Returns aForm without this label. |
Examples
label = newLabel("a") form = label.bind("test") # form == (a = "test") label.exists(form) # returns true label.project(form) # returns "test" label.restrict(form) # returns ()