IRC Log Viewer » #firebreath » 2012-11-14

IRC Nick Time (GMT-7) Message
uuulf 04:11 hi
anyone?
diorcety 04:11 yes
uuulf 04:11 how can i detect when user closes the browser window
that is holding a plugin instance?
i need to close a thread when this happens
reichi 04:11 well, the descturctors will be called
diorcety 04:11 reichi: Faster than his shadow
reichi 04:11 hmm?
uuulf 04:11 both api and plugin instance?
reichi 04:11 if you close the window
all instances ;)
uuulf 04:11 nice! thanks
i'll trace the calls with debugview
reichi 04:11 in generell
general
the plugin will be destroyed by the browser
when the browser thinks it's not required anymore
(that's why display: none produces a hell of a mess)
uuulf 05:11 if I have 2 <object> tags in the browser window, there is 2 instances of the plugin right?
reichi 05:11 yes
uuulf 05:11 nice, I'll try that...
brb
reichi 05:11 a good pratice for ensuring that is to log the pointer (as int)
but usually any kind of debug output in the constructor should be enough to be sure about that ;)
taxilian 05:11 uuulf: use the shutdown method on the plugin
that's when you shut down threads for a plugin instacne
reichi 05:11 sorry, i keep forgetting about that over and over again
uuulf 05:11 thanks
another thing...
reichi 05:11 uuulf: don't hesitate ;)
uuulf 05:11 I'll download a file inside this thread... its a "big" file, so I need to keep firing status events...
reichi 05:11 just be patient when waiting for an answer
uuulf 05:11 but, how can I do that with SimpleStreamHelper/
reichi 05:11 taxilian: isn't it in the middle of the night at your place?
or at least pretty early in the morning?
uuulf 05:11 i saw the onStreamDataArrived
do I have to inherit the stream class?