Store changed values on quit without external file

    Feb 06 2011 | 8:50 pm
    I'm probably overlooking something really basic, but is it possible to have either pattr or pattrstorage retain a changed value on quit without writing to an external file?

    • Feb 07 2011 | 2:27 pm
      If you save your .maxpatch before quitting Max , pattr will keep its value. Make sure "Restore Saved Value at Patcher Load" is checked it the inspector.
      If you open the following patch , the number box should display -55, which is saved in the pattr hop instance.
    • Feb 07 2011 | 8:40 pm
      Hi Patrick,
      Thanks, but what I'm trying to do is have it store without making the user save the document. I'm working on a standalone app that I want the user to be able to enter some information and have that information retained for subsequent launches of the app.
    • Feb 08 2011 | 6:29 am
      Reading your request literally, I don't think there is a way to do this *without* writing to an external file or modifying the patch, however it is entirely possible to automate the process of writing a preset file so the user does not need to be involved.
      There's probably be a more elegant way to do this. This example requires the manual creation of the preset file in the first instance.
    • Feb 08 2011 | 7:07 am
      Try storing your values in message boxes (prepend set >> message box, or use the right inlet), then on load, use a loadbang connected to the same message box to pass the data along.
      It should do what you want...I think...
    • Feb 08 2011 | 7:37 am
      Thanks for the suggestions,
      @spectro my concern is I'm wanting to allow folks to change the administrator password to a standalone and I don't want it in an external file where someone could access it.
      @David wouldn't that still require a save function?
    • Feb 08 2011 | 7:46 am
      oops. drr. yes, it would. i thought i was being so clever ;)
    • Feb 08 2011 | 7:54 am
      /I'm to tired to make something with it right now
    • Feb 08 2011 | 8:16 am
      Couldn't you save your sensitive datas in a coll or text file with some encryption algorithm, and decipher the file when needed?
    • Feb 08 2011 | 6:32 pm
      @AudioMatt: is embedMessage a 3rd-party external? I'm not familiar with it.
      @Patrick: coll was actually my first thought, but I couldn't get the data to stick without either saving or writing to an external file. It's beginning to look like I need to explore some sort of data encryption as you suggest.
    • Feb 08 2011 | 6:55 pm
      You can't avoid the encryption. Collective files and even standalones would also be readable with a normal text editor...