IRC Log Viewer » #firebreath » 2012-08-29

IRC Nick Time (GMT-7) Message
beezboy 04:08 hello everybody
How can I call a JSAPIAuto (My JSAPI) from external object?
call a method
reichi 04:08 you really want to have a look at the wiki
plus what do you mean with "external object"?
beezboy 04:08 An object created with me
This object receive some events and I want send to JSAPIAuto to trigger some actions
Or, I am not sure, if is better trigger an JSevent directly from "my object"
reichi 04:08 is it a javascript object?
it's hard to help if you don't explain things more precisely
beezboy 04:08 Ok I try to explain it better with my english :)
reichi 04:08 where are you from?
beezboy 04:08 Spain
reichi 04:08 damn, my spanish is horrible
almost non-existent
beezboy 04:08 Don't worry :D
I have a FB project with some libs and c++ objects
This c++ objects receive some events from this external livs
reichi 04:08 ok
beezboy 04:08 And call some static methods from this objects
reichi 04:08 that sound's like events to me
i have something similar
and i am using sigc++ for it
beezboy 04:08 yes? Perfect
reichi 04:08 (we are using sigc++ everywhere, that's why)
beezboy 04:08 I am looking it, interesting
reichi 04:08 sigc add "classic" signals
meaning "connectable" events
so you basically connect your event handler method e.g. in the constructor
and it will be called whenever the instance of the class where you defined the signals emits that signal
dunno if boost has something similar
i guess taxillian will know, but you'll have to wait another 4h hours for him to wake up ;)
beezboy 04:08 :D ok
your help is very useful for me :D
and if possible send event to JS directly from my object with this lib?
and callbacks, with FB_JSAPI_EVENT macro?
reichi 04:08 well you can use firebreath to raise a "javascript event"
beezboy 04:08 I think your solution is more "clean" and better because the encapsulation isn't break
what do you think?
reichi 04:08 well, i am a big fan of event based architectures
you could also pass the a weakptr instance ofy our plugin to your "other objects instance"
and just call the method directly
which would be less effort
beezboy 04:08 weakptr is a global pointer?
(excuse my big ignorance...)
reichi 04:08 not it's a "smartpointer"
meaning it you don't have to take care of deleting it
as it refcounts itself
and is being deleted as soon as there's no more ref to it
at least kinda
beezboy 04:08 Ok, with it I call JSAPIAuto for example?
reichi 04:08 i don't know the very exact definition of boost weakptr
those PTrs are all around firebreath ;)
just look at your generated firebreath code
beezboy 04:08 Yes, Ok research about it
I think that an "pure event" architecture is better
reichi 04:08
it keeps your stuff seperated
that's why it's nice
beezboy 04:08 :D
u have twitter?
reichi 04:08 only for reading ;)
i am, btw, just a user of firebreath
taxillian is the main/lead developer
beezboy 04:08 Ok, I was sure u have a very interesting twitter account ;)
reichi 04:08 no
i suck at tweeting
beezboy 04:08 haha
Thank you very much for your help
Very helpful for me
If I achive some interesting result I share
in this channel
reichi 04:08 you're welcome
good luck
beezboy 06:08 Another problem :(
i can't use FB::JSAPIPtr->Invoke :(
rc1140 08:08 ahoy all , having a paticularly annoying issue with FB if anyone can help out t it would be appreciated , details here :
i have tried both the suggestions by taxilian_away and sadly no luck
taxilian 08:08 Does. Fbtestplugin work?
rc1140 08:08 yup , so anything works as long as i dont ref libgpgme and use it
i also just re read the FAQ and made sure the plugin starts with np
taxilian 08:08 Ok so it is library related
Means you are missing a DLL at load time
rc1140 08:08 so
while i kinda understand that
i have tried dropping in the following plugin and it works
but i dont want to be distributing someone elses binary
i have spoken to the auhor (kylehuff) and we have yet to find a lead
taxilian 08:08 I will be online in an hour or two and will try to help thenn
rc1140 08:08 sweeeet it would be really appreciated as this is driving me insane atm
taxilian 09:08 rc1140: try delay-loading the dependent DLL
if the DLL depedency is the problem that should cause it to crash instead of just not load =]
rc1140 10:08 cool i came across that somewhere on the forums but it had custom code that i didnt understand
so i couldnt really get that working
taxilian 10:08 do it in visual studio first
as a proof of concept
just edit the project and add the .dll to the list of delay loads
rc1140 10:08 1 sec
just trying the method on the faq page
just trying to avoid VS for abit
when it comes to VC++ it just has way too many switches
ok cmake loading didnt work , trying in VS
LINK : warning LNK4199: /DELAYLOAD:libgpg-error-0.dll ignored; no imports found from libgpg-error-0.dll
got that in the build process
taxilian 10:08 then that's not hte right .dll
figure out which one is =]
use dependency walker
rc1140 10:08 so i added 2 dll's to the delayload option
and only one gave that warning
taxilian 10:08 okay
rc1140 10:08 checking dependancy walker
it gives an error which im trying to understand
rc1140 10:08 so dependancy walker says it cant find , IESHIMS.DLL
also the delay loading doesnt seem to have helped
taxilian 10:08 ieshims is normal
but there should be another related to what you're doing
rc1140 10:08 cool ,it was missing libaussuan as well which i added
there isnt anything besides the first one
which is ieshims
taxilian 10:08 libaussuan could well be the one that was causing your plugin to not load
rc1140 10:08 yeah except i added it and it still doesnt load
rc1140 11:08 argh for the life of me this plugin wont load
taxilian 11:08 well, anytime you have an inexplicable problem, start turning things off until it works
rc1140 11:08 made sure i linked aussuan as well
taxilian 11:08 then turn them back on a little at a time
rc1140 11:08 well the problem is there isnt much to run off
taxilian 11:08 comment things out to where you can stop linking a library, then see if it loads
then do the same for another library, 'til there are no libraries left
rc1140 11:08 s/run/turn
taxilian 11:08 that's not a problem, that's a good thing; it means it won't take you long
rc1140 11:08 i know if i remove libgpgme and any code that uses it then it loads
taxilian 11:08 could you try statically linking libgpgme
rc1140 11:08 how
i have no idea how to do that
taxilian 11:08 you'd have to build it as a static library
rc1140 11:08 would stasticly linking mean setting , "Link Library Dependancies" to yes
taxilian 11:08 it would mean linking a static library instead of linking a dynamic one
right now your libgpgme is dynamic
you'd have to rebuild it to be a static library
I recommend doing some research on the difference; I need to get back to work
rc1140 11:08 kk thanks , googling now
rc1140 12:08 right rebuilt everything as static libs and still nada :(
kylehuff 14:08 rc1140: just for the record; webpg-npapi was written with the intention of being distributed -- that is why it is a separate project from my extension. It is designed to be a standardized interface to GnuPG within the browser, so extension/content providers can focus on the interface/logic. Use it or don't, I'm just clarifying that point.
rc1140 14:08 cool , i should mention I am using it, i just couldnt compile it
kylehuff 14:08 gotcha. just making sure that was clear, I wasn't sure if you were aware of that or not.
rc1140 14:08 meh , I now need to backtrack all the random changes i have been making to get to a point where its working again :(
taxilian 14:08 everyone's favorite taskā€¦ =]
rc1140 14:08 but seriously though thanks for all your work
taxilian 14:08 I'm glad it's helpful to you
rc1140 14:08 i have couple other q's for your but will send them once i figure out whats wrong and the plugin is loading
its loading
taxilian 14:08 =]
alei 18:08 Im using visual studio for create my plugin but it is very slow when I load the solution and when I build it
FireBreathBot 18:08 alei: 27 Aug 04:08Z <taxilian> tell alei MFC most likely not; QT? no idea. maybe. good luck, let us know if you get it working =]
alei 18:08 Why I have to compile all the libraries of FB when I build my plugin?
taxilian 20:08 FireBreathBot: tell alei there is a way to precompile some of FireBreath, but it won't fix most of your issue; after you build it once it won't require you to build any of the core firebreath stuff anyway. visual studio is slow because vs is slow with large codebases and FireBreath uses boost. You can build from the command line using cmake --build build/ if you want for the first build
FireBreathBot 20:08 taxilian: I'll pass that on when alei is around.
L 21:08 hellow
Guest13786 21:08 is normal that the compilation of the projects is slow?
(I'm using msbuild command)