I am currently writing code to change the background of my playfield with an user selected image.
For this I let the user select an image from the library and to save it and retain it’s state I write that image into the documents folder like this: “userid_back.jpg” …
Because I thought it is cool to save time rendering stuff I also overlay that image with data before I save it!
The thought was to pick an image… render stuff… save it… free the picked one… load the save one into the stage.
Next time the application starts it finds the image and loads it instead of the default backgrounds.
Problem: The name of this image… and a newly selected… overlayed… saved image is the same.
I have to create temp names to save/load … then rename it to the (standard) name used at load time.
I consider this a bug… reading again the same filename with different content in the filesystem should load the new image!
If you absolutely need to be “smart” caching stuff. Make it controllable! Let us free them… let us refresh them.
And! Check file modification dates if you cache anything loaded from the filesystem! [import]uid: 6928 topic_id: 1313 reply_id: 301313[/import]