Conversation
|
@colinkiama id love your input and help here and there :) Ive got my head in a lot of community projects already, and this is all very new to me |
Removed duplicate wishlist item for integrated debounce saving.
There was a problem hiding this comment.
For testing purposes, Taking advantage of meson’s test features would be convenient. These could run in CI actions too! For example: https://github.com/vala-lang/vala-lint/tree/master/test
There was a problem hiding this comment.
Probably. I was thinking of doing a local fork of the Slate app (text editor that saves in data unsaved files), so there is a everyday testing we can do
| // If the order is the same each time, there wouldnt be any storage clash | ||
| if (filename == "") { | ||
| filename = "storage_%i.json".printf (unnamed_storage_count); | ||
| unnamed_storage_count += 1; |
There was a problem hiding this comment.
Let’s say I do the following things in an app:
- Start new instance of app
- Create a StringStorage instance
- Save data on that instance
- Restart the app
- Create a new StringStorage instance
- Save data to that instance
What happens? Would there be a file clash? (trying to overwrite an existing file)
There was a problem hiding this comment.
mhm, yes by design. If you dont name your storages, it falls back on the dynamically allocated ones
So your first storage declared will always be the first one, ....your n-th storage declared will be the nth one
so if you declare three storage instances, but always load and save from the third one, it will still be the same one. Since your apps code will always create the instance in the same order anyway and therefore refer to the same files in the same order
so whether you call it "storage" or "flurp" or nothing (aka the auto one), you still load and save from the same one with whatever variable name you gave it.
It would be better if someone declare a file name for their storage and stands by it. But this way people can not bother, identify their object by their variable name, and it automagically follows the same order of declaration. Who cares about background hidden files name anyway.
…tions for classes
Uh oh!
There was an error while loading. Please reload this page.