Updating list values

Hi Chris,

I’ve been messing a bit with lists in MWorks and am wondering if there is any way to update values in the list within MWorks (e.g. list[index] = 5). When I try to do this, as in the attached example, the values are not updated. If not, is the only way to update lists via the Python bridge? Or will this be part of the upcoming release we heard about in January?

Thanks!
Alex

Attachment: list_update_demo.xml (1.52 KB)

Hi Alex,

No, updating list values is not (yet) supported, so I would expect your example to fail. However, I would not expect it to fail silently, as it currently does, so I need to investigate why that’s happening.

Cheers,
Chris

Hi Alex,

I would not expect it to fail silently, as it currently does

I’ve added some checks to ensure that assignment targets are writable. Your example now fails with a load-time error.

Cheers,
Chris

Thanks! So, is it correct that the only way to update lists during run-time
is via the Python bridge?

Alex

So, is it correct that the only way to update lists during run-time is via the Python bridge?

Yes, that’s correct. (Sorry, I forgot about that part of the question.)

Chris

No problem, thank you!