Storing/Loading settings of an extension

RoboFont Forums Help / General Storing/Loading settings of an extension

This topic contains 2 replies, has 2 voices, and was last updated by  Roberto Arista 5 years, 5 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #6134

    Roberto Arista
    Participant

    Hello Frederik, Hello Robofont users,
    I am working on a robofont extension and I need someway to store settings.
    Just to give an idea of what I want to do:
    – when the extension is closed (clicking on the red cross), the last results from controls callbacks have to be stored in a file
    – when the extension is launched these settings have to come back in interface/variables (if setting file is provided)

    Basically I need to write and read this data somewhere.
    A text or csv file could be a solution, but is it a best practice?

    I found this interesting Python module
    https://docs.python.org/2/library/shelve.html
    but I noticed that is not bundled with Robofont.

    What kind of format do you suggest?
    PList?

    Thanks

    #6135

    frederik
    Keymaster

    I would advice you to use getExtensionDefault(key, fallback) and setExtensionDefault(key, value)

    see http://doc.robofont.com/api/mojo/mojo-extensions/

    #6142

    Roberto Arista
    Participant

    Ok, I will try!
    Thanks

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.