LazyGui icon indicating copy to clipboard operation
LazyGui copied to clipboard

use sketchPath() instead of dataPath()

Open KrabCode opened this issue 2 years ago • 3 comments

there are no actual issues with dataPath(), but the docs warn against it and it might get deprecated, so let's move to sketchPath()

based on a warning found here: https://stackoverflow.com/questions/36530876/how-to-get-the-path-of-the-sketch-in-processing-datapath-not-working

KrabCode avatar Jan 04 '24 10:01 KrabCode

but this changes the actual path, it removes the data/ from it...

KrabCode avatar Mar 12 '24 13:03 KrabCode

drawbacks of moving to sketchPath() include:

  • changing the default save folder location JsonSaveStore.dataFolderRootPath from "gui" to "data/gui"
  • changing the docs to reflect that, especially in LazyGuiSettings.setCustomGuiDataFolder()

~~possible behavior change: consider whether to stop storing things in "data" altogether and instead put the "gui" directory inside the sketch folder next to the .pde files? it seems recommended by the sketchPath() javadocs~~

~~but this breaks loading from existing saves in their old locations... so probably a bad idea~~

KrabCode avatar Mar 12 '24 13:03 KrabCode

let's not break any functionality - let there be no changes to save folder location

KrabCode avatar Aug 09 '24 15:08 KrabCode