deleting variables

Lindsey Glickfeld's Avatar

Lindsey Glickfeld

04 Jun, 2015 03:11 PM

Hi Chris,

When editing the XML, sometimes I need to remove old variables. However, when I do this, it resets all of my saved variable sets to default values. Is there some way to avoid this reset?

I've considered just moving the variables to a junk site in the code so they're there, but don't show up in folders, but that seems a bit silly. Another alternative is to set up some versioning software so that I can roll back to the previous state before the switch to default. But I just thought I'd check with you and see if there's a more straightforward approach.

Thanks,
Lindsey.

  1. Support Staff 1 Posted by Christopher Sta... on 04 Jun, 2015 08:17 PM

    Christopher Stawarz's Avatar

    Hi Lindsey,

    When editing the XML, sometimes I need to remove old variables. However, when I do this, it resets all of my saved variable sets to default values.

    I think this is a flaw in the code for loading variable sets. Currently, if a saved variable set contains a value for a non-existent variable, the variable-loading code issues an error message and quits. Instead, it probably should issue a warning about the missing variable and then continue processing the rest of the set. I'll try to get this change in to the nightly build soon.

    In the meantime, one workaround would be to manually remove the deleted variables from your saved variable sets. Variable sets are stored as XML files in $HOME/Documents/MWorks/Experiment Storage/<experiment>/Saved Variables. You can open the relevant file in a text editor and remove the variable_assignment entry for any deleted variable.

    Cheers,
    Chris

  2. Support Staff 2 Posted by Christopher Sta... on 10 Jun, 2015 06:36 PM

    Christopher Stawarz's Avatar

    Hi Lindsey,

    Currently, if a saved variable set contains a value for a non-existent variable, the variable-loading code issues an error message and quits.

    This is now fixed. As of tonight's nightly build, if a saved variable set contains a non-existent variable, MWorks will issue an error message, but the remainder of the variable set will be processed as usual. To expunge the deleted variable and eliminate the error message, simply re-save your variable set after loading.

    Cheers,
    Chris

  3. 3 Posted by Lindsey Glickfe... on 10 Jun, 2015 06:39 PM

    Lindsey Glickfeld's Avatar

    Chris,
    Thanks so much- this is really helpful!
    Lindsey.

  4. Christopher Stawarz closed this discussion on 19 Jun, 2015 02:38 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