<booleanList>
<booleanList> is a Logic
component that stores multiple <boolean> components within a list.
When creating a <booleanList>, separate items by spaces, not commas.
The component will default to displaying the list with commas.
Attributes and Properties
Attributes for <booleanList>
Other (3)
asListboolean. Default value: true. Whether to render the items separated by commas (true) or with no separator (false).
number. Default value: Infinity. Maximum number of items to retain in the list.
boolean. Default value: false. Whether the order of items in this list should be treated as unordered (e.g. for matching).
Common to all components (9)
copyreference. Create an independent copy of another component by reference. Enter a references a $name.
disabledboolean. Default value: false. Whether this component is disabled and cannot be interacted with.
extendreference. Extend another component by reference, inheriting its children and attributes. Enter a reference as $name.
fixedDefault value: false. Whether this component's value is fixed and cannot be modified.
fixLocationboolean. Default value: false. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).
hideboolean. Default value: false. Whether to hide this component from the rendered output.
isResponseWhether this component is treated as a response for the purposes of assessment.
nametext. The name used to reference this component from elsewhere in the document.
styleNumberinteger. Default value: 1. The style number used to select this component's visual styling from the available style definitions.
Properties for <booleanList name="b">
Other (4)
$b.maxNumbernumber. Maximum number of items to retain in the list.
number. The number of items in the boolean list.
$b.numValuesnumber. The number of booleans in the list.
$b.unorderedboolean. Whether the order of items in this list should be treated as unordered (e.g. for matching).
Common to all components (3)
$b.doenetMLtext. The DoenetML source code that produced this component.
$b.hideboolean. Whether to hide this component from the rendered output.
$b.styleNumberinteger. The style number used to select this component's visual styling from the available style definitions.
Examples
Example: Accessing an item in a <booleanList>
Individual <boolean> components are listed directly between the opening
and closing <booleanList> tags, with spaces (not commas) to separate list items.
The individual list items can be accessed with the index of the desired item.
Example: <booleanList> from user-input
The user is prompted to provide three agree/disagree type responses with
the <booleanInput/> component.
These are gathered into a <booleanList>.
Attribute Examples
Attribute Example: unordered
The unordered attribute is specified in order to make
comparisons between boolean lists without regard to order.
The <booleanList> component is ordered by default.
Attribute Example: maxNumber
Use the maxNumber attribute to limit the number of boolean values
rendered by the <booleanList>.
Property Examples
Property Example: numComponents
The numComponents property renders the number of boolean values stored in the list.
Property Example: numValues
The numValues property is an alias for numComponents: it also renders the number of boolean values stored in the list (respecting the maxNumber cap, if set).