dat select default by index expression

Noticing in the recent 088 build

When you drop a select dat, or DAT to CHOP or similar and instead of wiring into it, you refer it by path and select “by Index” selection the default ‘numRows - 1’ expression for the End Row is made to work via the input Op ( me.inputs[0].numRows - 1 ), so it fails when you are via network path instead of wire…

what would be the manual fix for this, refer to the op’s ‘dat’ parameter and do numRos - 1 on that I guess? Should there be a catch all method for these types of DAT’s that can get either the input wired op or the specified op?

Good point.
For input it would be something like:

me.par.dat.eval().numRows - 1 (assuming the name of the parameter in question is named ‘dat’)

for catchall it could be something like:

(me.inputs[0] or me.par.dat.eval()).numRows-1

We’ll make the changes in the default.

Cheers,
Rob.

On further reflection…
that should be:

(me.par.dat.eval() or me.inputs[0]).numRows-1

as me.inputs[0] will trigger an out-of-bounds exception with no inputs.

In other words, we’re currently discussing a simple solution to this request :slight_smile:
Possibly something along the lines of me.selectDAT which represents the above.

Cheers,
Rob.