Read the statement by Michael Teeuw here.
programming model
-
not class variable (I got that now), but shared would solve a ton of problems.
-
@sdetweil I solved this problem by using
this.sendSocketNotification
This allows me to communicate with the modules interface. -
yeh, but all this notification event handling really messes up the code i have which is all angular promise based.
I want to open my own browserwindow (show image), but u can’t do that in a module, only in a helper,
but then the window handle object needs to be stored inside the object which is managing the list of images for this ‘viewer’. that object is stored in the module… so, how do I transport the window handle object to the module… is the object valid in the other context (helper vs module).see the topic ‘what can i do in a module’. (which u already have)
-
@sdetweil I don’t think that. The helper is running on your Raspberry Pi, the module is running in every browser instance you open.
You need to coordinate your “show image event” from the helper and send out a notification to the module what image to show.
The ViewManagement must be in the module, the image downloading, handling must be in the helper.
Note: You only have one helper, but you can have multiple modules!
-
thanks… the image is not shown in the dom, it is shown in a separate ‘browserwindow’, floating over the dom. i just loadUrl the image into the window, after creating and positioning it.
the mirror code doesn’t know the images are therepictorial calendar reminders.
I have tested that the helper needs to do all this window mgmt
The scheduler module does scheduling (compare db data to calendar entries), start/stop viewer(s), and provide indirect services to load images depending on their source (file, dropbox, google drive, one drive).
The viewer module just walks thru a list of urls (getNext()) and opens a window hidden, loads image, hides old window, shows new window, deletes old window. (avoid dead window during load and, minimize screen flash)