ecl-logo Documentation

ValidWidgetQ

ValidWidgetQ[myWidget]boolean

returns True if myWidget is a valid Widget.

Details

    Input
    Output

Examples

Basic Examples  (5)

The following enumeration Widget is valid because A|B|C matches Alternatives[...]:

The following number widget is not valid because the value of Increment does not match the Pattern field:

The following number Widget is invalid because One Taco is not a valid increment:

ValidWidgetQ is recursive and will check for valid widgets at all levels. The following primitive widget is valid since each of the Object and Number widgets are valid:

ValidWidgetQ is recursive and will check for valid widgets at all levels. The following primitive widget is invalid because the increment of the number widget doesn't match its pattern:

Additional Examples  (27)

The following enumeration Widget is invalid because the Pattern does not match _Alternatives:

The following number widget is invalid because units cannot be specified in the Min field:

The following Quantity widget is valid because all of the units match:

The following Quantity widget is invalid because Taco is not a known unit:

The following Color widget is valid because the Pattern matches Verbatim[ColorP]:

The following Color widget is invalid because the Pattern does not match Verbatim[ColorP]:

The following Date widget is valid because the Pattern matches Verbatim[_?DateObjectQ]:

The following Date widget is invalid because the Pattern does not match Verbatim[_?DateObjectQ]:

The following String widget is valid because each of the fields match their pattern:

The following String widget is invalid because 1 Meter is not a known Textbox Size:

The following Object widget is valid because each of the fields match their pattern:

The following Object widget is invalid because Model[Food,Taco] is not a valid type:

The following Field Reference widget is valid because each of the fields match their pattern:

The following Field Reference widget is invalid because Model[Food,Taco] is not a known type:

The following MultiSelect widget is valid because the pattern matches ListableP[_Alternatives] and the items in the alternatives are in the Items field:

The following MultiSelect widget is invalid because the Items key is missing:

The following Expression widget is valid because each of the fields match their pattern:

The following Expression widget is invalid because Taco is not a known Textbox size:

The following Adder widget is valid because each of the quantity widgets are valid:

The following Adder widget is invalid because it contains an invalid Quantity Widget:

The following Alternatives widget is valid because each of the internal widgets is valid:

The following Alternatives widget is valid because each of the internal widgets is valid (test with labels):

The following Alternatives widget is invalid because the enumeration widget is invalid:

The following Alternatives widget is invalid because the enumeration widget is invalid (test with labels):

The following Tuples widget is valid because each of the internal widgets is valid:

The following Tuples widget is invalid because labels for each widget must be provided:

The following Molecule Widget is Valid: