IRC Log Viewer » #firebreath » 2011-12-01

IRC Nick Time (GMT-7) Message
shaheenbanu 04:12 Hi
linearray 04:12 hi
shaheenbanu 04:12 I have one confussion
I have a desktop application which is used to configure like changing the password of the device , veryfy password, reboot the device etc(all the functionality is working when i am running through command prompt)..
My question is i need to convert this project to web based application. I used firebreath, Existing code have diffrent classes for each functionality. I Registered the method and called the function like ChangePasscode , it got executed and changed the device passcode. When again i clicked on the same function from th Javascript it is not getting executed. could you please suggest whats wrong in my method.
linearray 04:12 so it works the first time, but not the second time?
shaheenbanu 04:12 ya
I debuged
its telling
device is not functioning
please reconnect
linearray 04:12 what device is this?
shaheenbanu 04:12 if i do so it works fine
Its round table
"CX5000Manage"
linearray 04:12 alright
shaheenbanu 04:12 what might be the problem?
linearray 04:12 so if it works every time from the command prompt, but only the first time from the plugin, I would assume you are not closing/freeing/shutting down something
shaheenbanu 04:12 I too thought so and did all memory reset for all the variable i used
even though same result
could you please help me
I am badlly need help
linearray 04:12 well, it's impossible for me to say what's wrong
maybe it's even something outside of your code... maybe some library you use
shaheenbanu 04:12 ok , i declared on structure variable in my API class as static
and same variable i am passing all over
will it create ant pblm
linearray 04:12 static and global variables are a 'bad idea' (tm)
shaheenbanu 04:12 Then will be an alternative?
that variable i used in all the classes defined
linearray 04:12 !wiki lifecycle
FireBreathBot 04:12 4 results found. Note: Results limited to 8
"Plugin Object and Lifecycle": http://goo.gl/1IFtg
"Plugin Lifecycle": http://goo.gl/nVhKS
"Using FireBreath": http://goo.gl/IHwid
"FireBreath 1.4 beta 2 released": http://goo.gl/F0P4B
linearray 04:12 read the second link
raffa 04:12 hi
shaheenbanu 04:12 hello
raffa 04:12 i have a problem with the getDOMElement function in browserhost
shaheenbanu 04:12 ya sure will do, i have read earlier
raffa 04:12 i successfully injected some html code when i run my plugin on firefox
but the same does not work on IE
it creashes when i call getDOMElement
which could be the problem?
shaheenbanu 04:12 @Raffa : I am not the right person to answer your questions, I am also a biggner and i am also chatting with some expert over here
linearray 04:12 raffa: all i can suggest is you attach a debugger and see where it crashes
raffa 04:12 FB::ActiveX::ActiveXBrowserHost::getDOMElement()
linearray 04:12 and when you step into it?
raffa 04:12 it fails calling executing site->GetExtendedControl(&dispatch);
linearray 04:12 site == NULL by any chance?
raffa 04:12 both site and dispatch
dougma 06:12 raffa: probably you are calling getDOMElement too early
raffa 06:12 mmm
i called it as a result of a timer tick
the timer is started a the end of the onPluginReady function
When can I securely call the function?
taxilian 09:12 raffa: I don't know why that would happen; getDOMElement was working on IE last I checked. where is it being called from? a javascript function?
raffa 09:12 hi taxilian
i called it in my plugin JSAPI object
taxilian 09:12 as a result of a setInterval call?
raffa 09:12 no
i'm using a boost timer
taxilian 09:12 so you are calling it from your timer, not from a JSAPI function?
!findfile ActiveXBrowserHost
FireBreathBot 09:12 Found 2 matching file(s) in the master branch. First 2 are:
src/ActiveXCore/ActiveXBrowserHost.cpp http://goo.gl/fiNiP
src/ActiveXCore/ActiveXBrowserHost.h http://goo.gl/WlCdw
taxilian 09:12 okay, tha'ts the problem, then… you can't call that from a secondary thread
hmm; it should probably automatically shunt that to the main thread to make the call, but does not currently do so
use m_host->CallOnMainThread
raffa 09:12 ok
taxilian 09:12 if you know how to use a boost timer, you probably know how to use boost::bind
use boost::bind to build the functor for calling getDOMElement
you'd be even better off, though, if you just called the function doing all of your DOM operations on the main thread
because otherwise every single call touching javascript or the DOM will have to make a cross-thread call
raffa 09:12 mmm
it craches again,
taxilian 09:12 what is the line you're using to call it?
raffa 09:12 m_host->CallOnMainThread(boost::bind(&xvrnpapiAPI::prepare4Progress, ptr));
this one?
taxilian 10:12 err, what is ptr?
raffa 10:12 xvrnpapiAPIPtr ptr = FB::ptr_cast<xvrnpapiAPI>(this->getRootJSAPI());
i have to go :(
i will try tomorrow to remove the call from the timer thread
thanks again taxilian
bye
taxilian 10:12 hmm
good luck
linearray 11:12 I didn't look at WiX yet. Is it possible to install everything with a single click on the .msi, without showing any dialogs and asking anything at all?
taxilian 11:12 hmm; not sure about no dialogs, but without requiring clicks yes
linearray 11:12 good!
chris2_ 11:12 hello, hello
taxilian 11:12 hi
(I'm on a call, busy)
chris2_ 11:12 I'm seeing a situation where NPP_GetValue (on OSX) doesn't get called 1/5 times plugin is started
have you seen something like this
linearray 11:12 I assume you do not use FB
chris2_ 11:12 correct
taxilian 11:12 chris2_: it doesn't get called to get the NPObject until you try to access it
chris2_ 11:12 I was under the impression that when I call NPN_SetValue with the drawing model, the browser would call NPP_GetValue, where I provide the drawing context
taxilian 11:12 depends
chris2_ 12:12 What do you mean by "access it"?
taxilian 12:12 I'm on a call; give me 30 min or so
chris2_ 12:12 sure, sorry
I'll just give you a bit of background. I've got my plugin's NPP_GetValue checking for NPPVpluginCoreAnimationLayer, and in that case I set the "value" param of the getValue call to a CALayer object from my plugin. This way any updates I do in my plugin to the CALayer get shown. This all seems to work most of the time. 1/5 of the time I never get a call to NPP_GetValue
I had assumed that NPP_GetValue would be called after I called NPN_SetValue(drawing model) from NPP_New
linearray 12:12 i think i remember now. you are the guy who needs small plugin sizes?
chris2_ 12:12 correct (small plugin size)
linearray 12:12 is there any particular reason why that's important to you?
chris2_ 12:12 well, my architect wanted a very small plugin (~200K) so as to present as quick dl/install as possible. I personally think the benefits of firebreath outweigh these concerns ....
linearray 12:12 i agree
taxilian 13:12 back, sorry
chris2_: well, you pay for it one way or another
either in plugin size or in development time and possibly stability
I'm not 100% sure what order things are called in; I was talking about getvalue being called to get your NPObject, not to get the CALayer
all I know is that the firebreath implementation works and works consistently
so I'd look at that
!findfile npapipluginmac
!findfile pluginwindowmacca
FireBreathBot 13:12 Found 2 matching file(s) in the master branch. First 2 are:
Found 2 matching file(s) in the master branch. First 2 are:
src/PluginAuto/Mac/NpapiPluginMac.h http://goo.gl/84MLN
src/PluginAuto/Mac/NpapiPluginMac.mm http://goo.gl/fQia3
src/PluginAuto/Mac/PluginWindowMacCA.h http://goo.gl/L3VVq
src/PluginAuto/Mac/PluginWindowMacCA.mm http://goo.gl/rmvy3
taxilian 13:12 !findfile pluginwindowmacica
FireBreathBot 13:12 Found 2 matching file(s) in the master branch. First 2 are:
src/PluginAuto/Mac/PluginWindowMacICA.h http://goo.gl/pKEqW
src/PluginAuto/Mac/PluginWindowMacICA.mm http://goo.gl/xqGyD