IRC Log Viewer » #firebreath » 2013-08-23

IRC Nick Time (GMT-7) Message
taxilian 00:08 chesspro: you're not going to be able to compile and insert it with angular
jquery has a similar issue
I spent about 6 hours trying to track it down and find a way to fix it one day before finally deciding it wasn't worth it
just use innerHTML
besides, if you set the type before adding it to the DOM it can cause issues anyway
tax_rules 05:08 Hello
I have a char* array filled in one of my pluginAPI functions. I want to pass this array back to the javascript code. How can i do this?
morteh 05:08 could serialize it and pass it back to the js as a string?
tax_rules 06:08 hmm. thanks for the reply. actually, i am receiving a 4MP image, unsigned chars. And I would like to pass this data to the javascript. I am not sure if serializing it would be efficient, or would it be?
is there a way to pass the pointer of the image to the js?
diorcety 06:08 don't pass pointer to js
because on js you can modify this value .. then modify the pointer
add a whiteboard
with a map ... associating an id to a void * for example
tax_rules 06:08 thanks a lot for the reply. I am quite a newbie, and will definitely check those concepts, but if you already have a tutorial or stackoverflow article etc. in hand, could you share?
btw, i am not going to display the image, i want to give the image to ,for example, to webgl. so, if whiteboard is a display tool, i would not like to limit myself to that option.
taxilian 07:08 tax_rules there is no good way to do what you are trying to do
the most performant option is probably to base64 encode it
and send it as a string
npapi doesn't have a good way to send binary data, unfortunately
tax_rules 07:08 thanks a lot for the information.
McEasy 16:08 So I have an issue I am hoping there are other options for. I'm currently telling my plugin to copy a file to somewhere else. The issue is that this process takes at least 1 minute and the browser thinks it is locked up since the plugin is not responding (I return a string saying "complete" when the plugin is done). Is there any way the browser would not appear to be "not responding"? And hopefully.. update a progress bar on the website with how far along
kylehuff 16:08 McEasy: you should probably be using a thread for a long-running locking method. I use boost::thread for that
McEasy 16:08 kylehuff: Alright, I'll look into it. Is there any way to get the "progress" of the thread? ie figure out where or how far it's gone and update the site with that?
kylehuff 16:08 sure, there are ways, but I couldn't tell you the best way.
McEasy 16:08 As long as there are ways, that's all I need. Thanks for pointing me in the right direction!