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
|
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) |
In reply to this post by Uko2
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 |
In reply to this post by Uko2
You could also use the session checking logic NativeBoost uses. Take a look at NativeBoost>>sessionChanged et al.
Cheers, Max
|
There is also SnapshotDone, announced in SystemAnnouncer. Martin On Thu, Sep 3, 2015 at 1:32 PM, Max Leske <[hidden email]> wrote:
|
Free forum by Nabble | Edit this page |