IRC Log Viewer » #firebreath » 2012-03-02

IRC Nick Time (GMT-7) Message
niftylettuce 06:03 taxilian_away: any ideas for a name for the extension equivalent of Firebreath?
trying to think up a good name for open source extension framework
linearray 06:03 how is that going to work?
you abstract away browser differences?
niftylettuce 06:03 well firefox/chrome/safari/opera are relatively the same
and this is the groundwork for the IE extension
if you're interested in collaborating lmk
linearray 06:03 it sounds really cool, but I'm up to my head in projects right now :/
niftylettuce 06:03 i hear this so much, shows such high demand in tech
one thing about production-like client work, is you have to continually be progressing in knowledge and learning, otherwise you're repeating the same mistakes and doing mundane tasks
whether its every friday you have a hack day, or you tell the clients what technologies you'll use, instead of the other way around
linearray 07:03 what I see is that specialization outside of larger companies is dead
dreijer 08:03 taxilian: is there a way to get the cmake script generated such that it doesn't include the boost libs directly but just adds the library directory (since boost knows how to include itself (at least on Windows))
taxilian 08:03 no; we've explicitly turned that off, in fact, because when we tried doing it that way it caused problems
or rather I should say there is no way without hacking the firebreath source
dreijer 08:03 so if I need to add some more boost libs (such as regex) I need to manually add the name?
taxilian 08:03 add_boost_library(regex) should do the trick
put it in your PluginConfig.cmake file
dreijer 08:03 ah, brilliant, let me give that a try
worked, cheers
taxilian 08:03 =]
dreijer 16:03 when the firebreath plugin fires an event, what thread does that get handled on by the browser's js? Or is it always singlethreaded?
taxilian 16:03 always singlethreaded
except for webworkers, browsers are always single threaded
dreijer 16:03 excellent
so if I call into my plugin and that starts an async operation which eventually fires an event, I know it'll happen on the same thread
taxilian 16:03 yes
you need to put it on a different thread in your plugin
but yes, the callback will come back to the main thread
dreijer 16:03 yeah
that's what I meant by starting an async operation :)
taxilian 16:03 just making sure =]
Binbo 22:03 JSObjectPtr callback is javascript function
taxilian 22:03 it can be
Binbo 22:03 still unclear how the postAsyc work
means the callback is called after the post reuest amde?
dougma 22:03 yes, that's how it works
async means "receive the result later"
Binbo 22:03 so if i wanna get the response header
i have to make a js function that get the header?
so it will be called as the callback then?
taxilian 22:03 there are two callbacks
dougma 22:03 !wiki postasync
taxilian 22:03 the first is in c++, then it calls the js callback
FireBreathBot 22:03 0 results found. Note: Results limited to 8
taxilian 22:03 !find PostAsync
FireBreathBot 22:03 Could not find any tags matching PostAsync
taxilian 22:03 go look at FBTestPlugin
where it makes the call
it passes in a C++ function to be called back
Binbo 22:03 based on my understanding
when i wanna call the method
for example in fbtestplugin
plugin().postAsync("", "myadata", the callback)
its postURL()
taxilian 22:03 that callback is not a JSObject
yeah, your'e talking from javascript
anyway, read the source code more carefully; there is a c++ callback that calls the javascript callback
gotta run
Binbo 22:03 for my case i do not use any call from page
so i just used the postAsync
inside my fucntion void post()
which is called within plugin
now i need a callback that can access the http response header
dougma 22:03 are you looking at FBTestPluginAPI::postURL ?
Binbo 22:03 yes
the postasync then call the geturlcallback
which take along the callback parameter from the posturl
dougma 22:03 yep.
Binbo 22:03 which i dunno where it come form
sorry to be a burden
dougma 22:03 see the boost::bind in postURL?
Binbo 22:03 yup
dougma 22:03 do you understand what it does?
Binbo 22:03 getURLcallback will be called after the method executed?
dougma 22:03 no, it 'creates' a callback suitable for SimpleStreamHelper::AsyncPos
and it 'binds a few of the arguments, SimpleStreamHelper will provide the last four arguments (_1, _2, _3, _4)
so that's how the callback parameter gets into FBTestPluginAPI::getURLCallback
boost::bind changed my life
Binbo 22:03 actually i dunno where the callback parameter come from in the posturl fucntion itself
before it get into getURL