https://linen.dev logo
Join Discord
Powered by
# ceramic
  • f

    faint-toothbrush-51643

    02/18/2023, 11:43 PM
    like many things, saving is one of those things that works differently between platforms
  • f

    faint-toothbrush-51643

    02/18/2023, 11:44 PM
    like on Windows, it might use files in a specific folder in AppData
  • f

    faint-toothbrush-51643

    02/18/2023, 11:44 PM
    while on Web, it uses localStorage
  • f

    faint-toothbrush-51643

    02/18/2023, 11:44 PM
    Files, however, is more specific
  • f

    faint-toothbrush-51643

    02/18/2023, 11:44 PM
    > Filesystem-related utilities. Only work on sys targets and/or nodejs depending on the methods
  • g

    gifted-whale-78169

    02/18/2023, 11:45 PM
    yea im fine with it only working on native platforms
  • g

    gifted-whale-78169

    02/18/2023, 11:45 PM
    how would you use persistentData though, the functions look different
  • f

    faint-toothbrush-51643

    02/18/2023, 11:45 PM
    it's simple JSON
  • f

    faint-toothbrush-51643

    02/18/2023, 11:46 PM
    you create a new PersistentData with an ID
  • f

    faint-toothbrush-51643

    02/18/2023, 11:46 PM
    the ID could be something like "file1", "file2", "settings", "achievements"
  • f

    faint-toothbrush-51643

    02/18/2023, 11:47 PM
    you use "set" to store a key-value pair and "get" to get the value for a given key
  • f

    faint-toothbrush-51643

    02/18/2023, 11:47 PM
    and "save" to make it actually write
  • g

    gifted-whale-78169

    02/18/2023, 11:47 PM
    ah ok, it automatically manages the file location?
  • g

    gifted-whale-78169

    02/18/2023, 11:48 PM
    that was the main part i didnt understand
  • g

    gifted-whale-78169

    02/18/2023, 11:49 PM
    ill have to look into later though, not on my computer rn
  • b

    billowy-waiter-28954

    02/19/2023, 11:17 AM
    Again, saving data deserve a guide article in itself 😅. But yea @faint-toothbrush-51643 is right, PersistentData is the most straightforward way to save data in Ceramic apps that works on every platform
  • b

    billowy-waiter-28954

    02/19/2023, 11:17 AM
    If you only need to save a few strings that's the way to go
  • b

    billowy-waiter-28954

    02/19/2023, 11:18 AM
    For more advanced things there are other options but this will need a real guide as there are a lot of things involved
  • f

    faint-toothbrush-51643

    02/19/2023, 11:15 PM
    How can I get ceramic to change compilation flags? I need to add
    -xml
    because I need the XML file for a project
  • g

    gifted-whale-78169

    02/19/2023, 11:37 PM
    isnt there an hxml file?
  • b

    billowy-waiter-28954

    02/19/2023, 11:47 PM
    https://ceramic-engine.com/guides/ceramic-yml-reference/#custom-hxml
  • f

    faint-toothbrush-51643

    02/19/2023, 11:53 PM
    i need this thing > HaxeUmlGen uses the xml file created when the -xml flag is passed in to the haxe compiler.
  • f

    faint-toothbrush-51643

    02/22/2023, 8:13 PM
    @billowy-waiter-28954 sorry to pester but i have a thing due like tomorrow. how can i make ceramic generate the XML file as needed by this thing? https://github.com/ianxm/haxeumlgen
  • a

    ambitious-knife-25690

    02/22/2023, 8:16 PM
    he linked you to the page on where to learn how to send flags to the generated .hxml
  • a

    ambitious-knife-25690

    02/22/2023, 8:17 PM
    what's the issue?
  • a

    ambitious-knife-25690

    02/22/2023, 8:19 PM
    going through the readme, it looks like you don't even both with ceramic at all
  • f

    faint-toothbrush-51643

    02/22/2023, 8:19 PM
    ?
  • a

    ambitious-knife-25690

    02/22/2023, 8:19 PM
    oh nvm
  • a

    ambitious-knife-25690

    02/22/2023, 8:19 PM
    anyway, yeah what's the issue you had with the docs
  • a

    ambitious-knife-25690

    02/22/2023, 8:19 PM
    they're pretty clear?
1...737475...124Latest