Replicator - 2 questions

Using Replicator COMP with a Table DAT to create my UI of 10 stacked vertical buttons
Stumbling on 2 issues.

1- How do I get the parent Container COMP to ignore the ‘Master Operator’ button used in my Replicator?
2- How can I get my vertical alignment in the parent Container COMP to be based on the Table DAT?
ie I don’t want the order of the buttons to be alphabetical but rather in the same order as the Table row data they were created from.

Set the display parameter of the master component to off and use the c.par.display = True line in the callacks of the replicator.

Also under layout there is a numeric alginment parameter at the bottom of the page. Put in the following expression “me.digits” so the digits in the name of the component gets put into that value, orderring them.

Thanks.

When you say under layout are you referring to the parent Container COMP? Or the Layout tab of the Master Operator Button COMP?
For the first issue in case anyone is attempting the same thing master.par.display = False in callback
and enable
c.par.display=True

@art3mis this file uses replicator and it’s pretty simple to understand the logic inside the master operator.

You can use the mouse instead leap motion:

Thanks. Will have a look. One thing that would be handy is if there was a way to use an expression in Operator prefix so that it dynamically retrieved the rowIndex value from the Template DAT table.

@art3mis

op(‘…/table1’ )[int(parent().digits), 0]

When you put this in the master operator, each item of the replicator (having a different me.digits) goes to take from the same table a different row.

For the Operator Prefix: if you want to add inside its dynamic generated name, the total rowIndex value from the Template DAT Table try this:
‘item’ + str(op(‘table1’).numRows) + ‘n’
it should generate you items that includes in their name (before the Suffix) the total value of the rows from the DAT table.

Replicator_operator_prefix.tox (1.3 KB)

this is what i understood from your question.
Hope it helps, cheers
Nima

There is a setting on the replicator comp that allows using a specified column of the source table instead of the suffix being the row index. You could then set the prefix to be empty if you want just the table column value for the names.

From the replicator COMP docs:

The nodes that are created can be named in two ways. Copies can be named/numbered sequentially using the prefix specified by the Node Prefix parameter: item1, item2, … Alternately, copies can be named based on the string in a column of the table, specified with the Name from Table parameter.

The parameter that configures this is “Name from Table”. You can then choose to specify a column index or name to use for each row replicated.