IRC Log Viewer » #firebreath » 2011-11-24

IRC Nick Time (GMT-7) Message
raymond1 00:11 taxilian, say I want to implement some web api spec by NPAPI plugin with FB, DOM4 style events need to be fired.
And , also, if I want to fake a Mouse Click event in the plugin
And also another question, Can I have a interface created by JSAPI object, that can be new from the js code?
e.g. obj = new MyObj(), instead of obj=MyObj.createInstance()
seems a MyObj() method to return the obj won't work for this. you cal call obj= MyObj(), but you can not call new MyObj(), which is quite different from the JS's function() object
anyway, I found some workaround by eval some js code, and get property to retrieve them, while seems a little bit trick
Gil 02:11 Hi
I'm using firebreath 1.5.2
i'm having issues with events on core animation model
Our system is already in Beta and we discovered that we had a degradation afer upgrading from firebreath 1.4 to 1.5.2
We are using firebreath to change our window size (plugin) and when we receive notification for this we repaint
When I use safari and FF I don't receive the events anymore (chrome works fine)
emicastro 07:11 anybody knows why GetWindow is returning null ? Some known reason?
taxilian 10:11 raymond1: theoretically JSAPI does support "new", but I don't know that anyone has really played with it.
!find Construct
FireBreathBot 10:11 Found 10 possible matches. Displaying 5
/^FB::variant IDispatchAPI::Construct(const std::vector<FB::variant>& args)$/ (f) found in src/ActiveXCore/IDispatchAPI.cpp: http://goo.gl/DX5Jt
/^bool NPJavascriptObject::Construct(const NPVariant *args, uint32_t argCount, NPVariant *result)$/ (f) found in src/NpapiCore/NPJavascriptObject.cpp: http://goo.gl/XgUBq
/^FB::variant NPObjectAPI::Construct( const FB::VariantList& args )$/ (f) found in src/NpapiCore/NPObjectAPI.cpp: http://goo.gl/LMh7K
/^bool NpapiBrowserHost::Construct(NPObject *npobj, const NPVariant *args,$/ (f) found in src/NpapiCore/NpapiBrowserHost.cpp: http://goo.gl/AMLjZ
/^FB::variant FB::JSAPIAuto::Construct(const std::vector<variant> &args)$/ (f) found in src/ScriptingCore/JSAPIAuto.cpp: http://goo.gl/tIOol
taxilian 10:11 you'd need to implement Construct on that object
FireBreathBot: tell gil please upgrade to 1.6 and ask us again if the problems continue. We don't support older versions, and it's quite likely in any given situation that if you are reporting a bug on an older version then it may very likely be fixed in the newer
FireBreathBot 10:11 taxilian: I'll pass that on when gil is around.
taxilian 10:11 emicastro: going to guess that GetWindow is returning null because it doesn't have a window
possibly you are calling it before AttachedEvent is fired?
linearray 10:11 firebreath.org: Website Offline, No Cached Version Available
intentional?
aha, cloudflare screwup
taxilian 10:11 hmm. working fine for me
linearray 10:11 yup, now it does
taxilian 10:11 well, nothing is perfect, I suppose
emicastro 11:11 If possible to call a javascript function (allocate in my html page) from the plugin?
emicastro 12:11 linearray: ping
taxilian 13:11 emicastro: yes, it is possible to call a javascript function from the plugin
emicastro 13:11 Hi taxilian, how are you doing?
taxilian 13:11 tired, but not bad
emicastro 13:11 :S
lot of work?
taxilian 13:11 I'm on a cell phone tethered connection; I may disappear wtih no notice
drove 8 hours yesterday, been watching my two kids most of the day today
so just the usual tired that goes with any vacation
emicastro 13:11 Oh, well but your are happy! :)
you saw your kids! so... It a very good reason to be tired
*it's
taxilian 13:11 yep
emicastro 13:11 ok... so... How I can call a js function from my plugin?
there are some doc in the firebreath webpage?
taxilian 13:11 a global function?
FB::JSObjectPtr func = m_host->getDOMWindow()->getProperty<FB::JSObjectPtr>("functionName"); if (func) { func->invoke("", FB::variant_list_of(param1)(param2)); }
linearray 13:11 http://www.firebreath.org/display/documentation/Invoking+methods+on+the+DOM
taxilian 13:11 hey, there we go. forgot about that page
emicastro 13:11 yeah a global function
taxilian 13:11 well, there you have it
code samples
from the web page
emicastro 13:11 if the function doesn't recive a parameter, the FB::variant_list_of has to be called like this: func->invoke("", FB::variant_list_of()); ???
taxilian 13:11 that would work fine, yes
emicastro 13:11 thanks you taxilian! It's working! ;)}
taxilian 13:11 you could also in that case just pass FB::VariantList() as the parameter, since you just need an empty one, but I'd use variant_list_of simply for consistency and to make it easy to add a parameter later if needed
emicastro 13:11 ok... is cleaner in that way
linearray 18:11 taxilian_away: there will soon be a logging framework in boost. maybe this will be of interest.
taxilian 19:11 linearray: I have looked at the boost logging framework that has been in proposal; I spent almost a full day trying to get it working
it was a horrendous waste of time
linearray 19:11 :)
let's hope the released version will be more helpful
taxilian 19:11 yeah. It is actually really not hard to add other logging framework support
but nobody has done so and contributed the code back
linearray 19:11 do you have any experience with persisting objects to disk? I'm looking into OR mapping for c++ right now.
taxilian 19:11 boost serialize seems decent; I haven't actually used it, but may be worth looking at
linearray 19:11 it is, unfortunately it's not useful to me
taxilian 19:11 honestly, I'd probably use json myself :-P
but it depends on what you need to persist
linearray 19:11 write json to a file?
i have a tree of objects, in total some 100,000. when the user performs any changing action I need to persist the changes.
oh well, I will play around with hiberlite... if all fails I will write traditional SQL