Image-specific "cache"
Hi, I want to persist some value (in a singleton), but when a user creates a copy of the image, it want to regenerate that data, so the will be no who images with the same persisted data. Is there some way to act on image launch? Or maybe you have more suggestions⦠Cheers, Uko
Sorry, my last email is UNREADABLE! Here is the spellchecked version: Hi, I want to persist some value (in a singleton), but when a user creates a copy of the image, I want to regenerate that data, so there will be no two images with the same persisted data. Is there some way to act on an image launch? Or maybe you have better suggestions⦠Cheers, Uko
On 03 Sep 2015, at 12:25, Yuriy Tymchuk <yuriy.tymchuk@me.com> wrote:
Hi,
I want to persist some value (in a singleton), but when a user creates a copy of the image, it want to regenerate that data, so the will be no who images with the same persisted data. Is there some way to act on image launch? Or maybe you have more suggestionsâ¦
Cheers, Uko
Hoi Uko--
I want to persist some value (in a singleton), but when a user creates a copy of the image, I want to regenerate that data, so there will be no two images with the same persisted data. Is there some way to act on an image launch?
Sure, you can tie into the StartUpList and ShutDownList in SmalltalkImage. This is how the delay scheduler is restarted on system startup, for example.
Or maybe you have better suggestions...
This seems like the conventional way of doing things like that, as long the system doesn't need the assistance of another running system to compute the data. cheers, -C -- Craig Latta netjam.org +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS)
On 03-09-15 12:33, Yuriy Tymchuk wrote:
I want to persist some value (in a singleton), but when a user creates a copy of the image, I want to regenerate that data, so there will be no two images with the same persisted data. Is there some way to act on an image launch? Or maybe you have better suggestionsâ¦
You could use SHA1 hashMessage: FileSystem workingDirectory fullName to see if you are in the same image, and you could add a class to the startuplist like GTPlayBook does Stephan
You could also use the session checking logic NativeBoost uses. Take a look at NativeBoost>>sessionChanged et al. Cheers, Max
On 03 Sep 2015, at 12:33, Yuriy Tymchuk <yuriy.tymchuk@me.com> wrote:
Sorry, my last email is UNREADABLE!
Here is the spellchecked version:
Hi,
I want to persist some value (in a singleton), but when a user creates a copy of the image, I want to regenerate that data, so there will be no two images with the same persisted data. Is there some way to act on an image launch? Or maybe you have better suggestionsâ¦
Cheers, Uko
On 03 Sep 2015, at 12:25, Yuriy Tymchuk <yuriy.tymchuk@me.com <mailto:yuriy.tymchuk@me.com>> wrote:
Hi,
I want to persist some value (in a singleton), but when a user creates a copy of the image, it want to regenerate that data, so the will be no who images with the same persisted data. Is there some way to act on image launch? Or maybe you have more suggestionsâ¦
Cheers, Uko
There is also SnapshotDone, announced in SystemAnnouncer. Martin On Thu, Sep 3, 2015 at 1:32 PM, Max Leske <maxleske@gmail.com> wrote:
You could also use the session checking logic NativeBoost uses. Take a look at NativeBoost>>sessionChanged et al.
Cheers, Max
On 03 Sep 2015, at 12:33, Yuriy Tymchuk <yuriy.tymchuk@me.com> wrote:
Sorry, my last email is UNREADABLE!
Here is the spellchecked version:
Hi,
I want to persist some value (in a singleton), but when a user creates a copy of the image, I want to regenerate that data, so there will be no two images with the same persisted data. Is there some way to act on an image launch? Or maybe you have better suggestionsâ¦
Cheers, Uko
On 03 Sep 2015, at 12:25, Yuriy Tymchuk <yuriy.tymchuk@me.com> wrote:
Hi,
I want to persist some value (in a singleton), but when a user creates a copy of the image, it want to regenerate that data, so the will be no who images with the same persisted data. Is there some way to act on image launch? Or maybe you have more suggestionsâ¦
Cheers, Uko
participants (5)
-
Craig Latta -
Martin Dias -
Max Leske -
Stephan Eggermont -
Yuriy Tymchuk