OmSessionStore and SnapshotDone event (was: saving an image on windows and opening it on mac problems)
Hi, OmSessionStore registers an action (OmSessionStore>>#store) when the event SnapshotDone is triggered. However this event is triggered immediately when an image is opened after being saved, before the file system was reset. This means that OmSessionStore>>#store is called before the file system is reset. Hence, if you save an image on windows and open it on mac you run into issues as OmSessionStore>>#store performs file operations that will work with a WindowsStore instead of a MacStore. Does OmSessionStore need to register to SnapshotDone events? When the image is opened OmSessionStore>>#store will be called anyway as OmSessionStore registers a start-up action. Cheers, Andrei
El 26/4/2017 12:22, "Andrei Chis" <chisvasileandrei@gmail.com> escribió: Hi, OmSessionStore registers an action (OmSessionStore>>#store) when the event SnapshotDone is triggered. However this event is triggered immediately when an image is opened after being saved, before the file system was reset. This means that OmSessionStore>>#store is called before the file system is reset. Hence, if you save an image on windows and open it on mac you run into issues as OmSessionStore>>#store performs file operations that will work with a WindowsStore instead of a MacStore. Does OmSessionStore need to register to SnapshotDone events? When the image is opened OmSessionStore>>#store will be called anyway as OmSessionStore registers a start-up action. #store doesn' t need to be done twice. I can see it tonight. MartÃn Cheers, Andrei
2017-04-26 17:21 GMT+02:00 Andrei Chis <chisvasileandrei@gmail.com>:
Hi,
OmSessionStore registers an action (OmSessionStore>>#store) when the event SnapshotDone is triggered. However this event is triggered immediately when an image is opened after being saved, before the file system was reset. This means that OmSessionStore>>#store is called before the file system is reset. Hence, if you save an image on windows and open it on mac you run into issues as OmSessionStore>>#store performs file operations that will work with a WindowsStore instead of a MacStore.
Maybe we should remove this event at all because subscribing on it is not safe. Users should use SessionManager registration mechanizm driven by categories and priorities
2017-04-27 21:11 GMT+02:00 Denis Kudriashov <dionisiydk@gmail.com>:
2017-04-26 17:21 GMT+02:00 Andrei Chis <chisvasileandrei@gmail.com>:
Hi,
OmSessionStore registers an action (OmSessionStore>>#store) when the event SnapshotDone is triggered. However this event is triggered immediately when an image is opened after being saved, before the file system was reset. This means that OmSessionStore>>#store is called before the file system is reset. Hence, if you save an image on windows and open it on mac you run into issues as OmSessionStore>>#store performs file operations that will work with a WindowsStore instead of a MacStore.
Maybe we should remove this event at all because subscribing on it is not safe. Users should use SessionManager registration mechanizm driven by categories and priorities
I think SnapshotDone is supposed to be announced after all startup actions. And here is a bug where it is wrong
I open issue 20004 <https://pharo.fogbugz.com/f/cases/20004/SnapshotDone-should-be-not-announced...>. We need decide what the proper logic 2017-04-27 21:15 GMT+02:00 Denis Kudriashov <dionisiydk@gmail.com>:
2017-04-27 21:11 GMT+02:00 Denis Kudriashov <dionisiydk@gmail.com>:
2017-04-26 17:21 GMT+02:00 Andrei Chis <chisvasileandrei@gmail.com>:
Hi,
OmSessionStore registers an action (OmSessionStore>>#store) when the event SnapshotDone is triggered. However this event is triggered immediately when an image is opened after being saved, before the file system was reset. This means that OmSessionStore>>#store is called before the file system is reset. Hence, if you save an image on windows and open it on mac you run into issues as OmSessionStore>>#store performs file operations that will work with a WindowsStore instead of a MacStore.
Maybe we should remove this event at all because subscribing on it is not safe. Users should use SessionManager registration mechanizm driven by categories and priorities
I think SnapshotDone is supposed to be announced after all startup actions. And here is a bug where it is wrong
participants (3)
-
Andrei Chis -
Denis Kudriashov -
Martin Dias