Updating list values

asmoly's Avatar

asmoly

22 Apr, 2014 02:04 PM

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

  1. Support Staff 1 Posted by Christopher Sta... on 22 Apr, 2014 02:15 PM

    Christopher Stawarz's Avatar

    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

  2. Support Staff 2 Posted by Christopher Sta... on 23 Apr, 2014 03:05 PM

    Christopher Stawarz's Avatar

    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

  3. 3 Posted by asmoly on 23 Apr, 2014 03:20 PM

    asmoly's Avatar

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

    Alex

  4. Support Staff 4 Posted by Christopher Sta... on 23 Apr, 2014 03:24 PM

    Christopher Stawarz's Avatar

    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

  5. 5 Posted by asmoly on 23 Apr, 2014 03:31 PM

    asmoly's Avatar

    No problem, thank you!

  6. Christopher Stawarz closed this discussion on 23 Apr, 2014 03:34 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac