IRC Log Viewer » #firebreath » 2010-11-16

IRC Nick Time (GMT-7) Message
_vizZ 01:11 hi, how do i import prepeclipse project into Eclipse CTD? :>
DFUN 01:11 sorry, I don't work with eclipse
I thought the script creates a working project
doesn't it?
_vizZ 01:11 anybody? ;p
yeah, it does create the makefiles
but i don't see any eclipse prject specific files
DFUN 01:11 and there is no way to open these files with eclipse? Maybe it converts the makefile to a project
_vizZ 01:11 i searched for an option to import c++ make file managed project, but i don't see such an option
i can create a managed make file project with New -> Project etc.
but when i do Import
DFUN 01:11 ok, maybe you have to use CMake for eclipse...
_vizZ 01:11 there is no such option
DFUN 01:11 but that's a guess. As I said, don't know it actually...
_vizZ 01:11 i'll check it, thx for advice
tempie 01:11 hellow
nock nock someone outh there
i have a question about the jsapi
are there some examples how to use it from the main plugin, i would like to make a debugging window (simply a textarea)
and call a function from the main plugin to the plugin api to raise an event
but i couldt get the right pointer to the object
DFUN 01:11 hi tempie
I'm actually a guest/questioner myself.
it takes some hours till taxilian gets up :)
maybe you're looking for something like this:
if I got you right
this way you can call a JS-method to write any data to the text area.
in PluginCore.h the pointer is received by "m_host->getDOMWindow()->getProperty<FB::JSObjectPtr>(value);"
you should try that
tempie 02:11 kewl i have a look
DFUN_ 02:11 so does it work?
tempie 02:11 dont know i dont under stand it, so i have to try before i know
actualy i want to use the fireEvent from my main plugin and not from the api class
to i tried to cast the jsGetroot some thing to my api class and call the function debug (i made)
but i think i cannot cast it the right way
and maybe it isn't the right way to do
DFUN_ 02:11 no, that doesn't sound quite right.
tempie 02:11 :s
DFUN_ 02:11 but I'm not sure, either
tempie 02:11 so where is the getRootJSApi function in the pluginCore class for
DFUN_ 02:11 I'd say the jsGetRoot returns some DOM objects
tempie 02:11 hmm that makes sense
the casting isnt working
do you know how to get the object jsapi object from the pluginCore class
DFUN_ 02:11 you're main plugin derives from PluginCore and thus owns the m_api pointer that can fire events
just try m_api
tempie 02:11 the documentation is saying i shouldt use it directly
and use getRootJSAPI()
pff it just returns the pointer
and a aditional check if its set
the following code should work right'
MyPluginApi (has a public method debug() who fires an event)
i call from the main class
derrived plugincore
dynamic_cast<MyPluginApi>( this->getRootJSAPI() )->debug( "test 123" );
correction should use
its base to derrived
DFUN 03:11 hmmm
why do you actually need events to communicate between your classes inside the plugin code?
I thought you wanted to invoke JS methods from inside the plugin
tempie 03:11 i wanted to trigger an event in js ondebug"
DFUN 03:11 this code doesn't seem to do that job
tempie 03:11 in the debug function there is a FireEvent who calls the ondebug in js world
DFUN 03:11 so why don't you just call that debug method?
which function calls it?
Maybe you should put your code inside the PluginAPI class and leave the Plugin class as is
tempie 03:11 from MyPlugin i want to call the function debug in the MyPluginAPI who currently fires the fireEvent("ondebug",.....)
DFUN 03:11 my PluginCode-derivative is basically untouched after its generation
ok, what I meant... just write your code inside the API-class
then you get direct access to all the JS-API methods
tempie 03:11 hmm i need to call some events from the windowAttached for debugging
DFUN 03:11 ah, ok...
sorry, then you'd better wait for someone from the developer team
tempie 03:11 ok
btw do you know some sample projects who use the fb code base
DFUN 03:11 I am still wondering why getRootJSAPI shouldn't work
that seems to be the interface between the PluginCore and the JSAPI
tempie 03:11 i think i have a wrong cast
DFUN 03:11 it returns a boost-pointer to that class
tempie 03:11 thats probaly it
DFUN 03:11 maybe you don't need any cast
tempie 03:11 didn't work.
DFUN 03:11 there are two samples
tempie 03:11 well i out for lunch, well see you later
i noticed
the media and a simple example
but none of them i could find the code for accessing the js from core plugin
but i'm out
tempie 04:11 how to cast the JSAPIPtr returned by getRootJSAPI() to MyPluginApi, i have no idea how to use the boost shared_ptr
iaincollins 04:11 taxilian was explaining the boost shared_ptr to me recently, was very helpful
not sure if you will find this relevant:
It was very helpful, but might be even handier if one of the examples had populating and returning an object (like a vector of strings or something) as a practical example
(which I would do if I go the the time :( )
rstanwar 04:11 hi
anyone there
how to build firebreath on windows
tempie 04:11 okay i read the article, still a bit fuzzy but i think i get it now (its a some sort of ref counter)
so boost::dynamic_ptr_cast<MyPluginApi>(this->getRootJSAPI())->mypublicmethodhere("test")
\should work
building on windows its easy i just followed this :
and used VS2008
(pro to be exact)
just run the prepxxxx.bat files to create your project files and open the solution file
ohw make sure you have phyton and cmake installed, buts its all on the page
but iaincollins the syntax:
should be the way to go?
DFUN 04:11 boost::shared_ptr<FBTestPlugin> FBTestPluginAPI::getPlugin()
{ boost::shared_ptr<FBTestPlugin> plugin = m_pluginWeak.lock(); if (!plugin) throw FB::script_error("The plugin object has been destroyed"); return plugin; }
is what taxilian meant to use
DFUN 05:11 now I have a question again
I'm wondering if it's possible to unregister an EventSink-instance from events?
DFUN_ 05:11 sounds like a topic for neilg again.... are you there?
DFUN 05:11 ok, found what I was looking for.
tempie 05:11 thanks DFUN
DFUN 05:11 so you finally had some success on the debug method?
tempie 06:11 no can't test it yet have to wait untill i am home, still at work
i'm only dooing some php things around here
not very exiting
DFUN 06:11 the plugin is my work right now. .. quite exiting :)
taxilian's time may come soon. He can definitely help you with the API call, tempie
tempie 07:11 kewl i wish i had work for it
just for fun right now
DFUN 07:11 hmm,... I think I might get interested in invoking JS methods, too
nitrogenycs 08:11 hey
you guys still having a problem with the stream completed event?
DFUN 08:11 not anymore
we fixed my issue last week
I just ran into another problem when I deleted the stream handler after completion and the event was called again.
WarGloom 08:11 sory, what the problem? maybe it is related to crash in my pluing...
DFUN 08:11 but now I detached the observer before deleting the handler and it works fine
we discovered a bug last week. The StreamCompleted-event for the stream handler wasn't called
id should be fixed with the FB 1.4 devdrop
when does your plugin crash?
WarGloom 08:11 when I try to use object recieved with event fired FireEvent("onsome", FB::variant_list_of(shared_ptr()));
and it is depends on place where is fire this event...
where I call fireevent ..
DFUN 08:11 hmm... I don't know. That's something for.... someone else. Sorry.
WarGloom 08:11 eh, i see...
DFUN 08:11 hope you get a clou. Or taxilian comes around =] For me this is it for today. See you.
WarGloom 08:11 good luck
tempie 09:11 laters
taxilian 09:11 morning all
nitrogenycs 09:11 hey
taxilian: do you still need me to fix the stream completed event or did that land in 1.4 dev?
taxilian 09:11 it hasn't landed there yet
neilg_away has been playing with it
but he hasn't submitted a patch
if you're available to look at it that would be awesome
hey, it's neilg!
neilg_ 09:11 Yes, I suck. lol
taxilian 09:11 or… neilg_?
neilg_ 09:11 Apparently neilg is a registered nick... lol
taxilian 09:11 neilg_: could you explain to nitrogenycs what the problem you were running into is?
and I'll brb
neilg_ 09:11 Sure, no problem
The root cause of it all is that the streamable variable gets set if the server supports it - whether the user requested it or not. That changes the behavior of the stream because lots of things check for streamable and change their behavior based upon that
It seems to me that there should be one member variable for whether the user requested the stream to be seekable
(I meant seekable, not streamable...)
And another variable for whether the stream supports seeks
I think I have actually fixed all of the issues though, I just need to commit or create a patch
taxilian 09:11 if you could get those in a clone, nitrogenycs could look at them
it's really not that hard =]
MisterK2: Welcome! Were you one of those who had questions while I was sleeping? I think all of them have left already, but just checking...
neilg_ 09:11 I can absolutely do that, I just need to port my changes back into my local hg repository
taxilian 09:11 you know you want to. All the cool kids are doing it
neilg_ 09:11 Do I have to jump into a fire too? ;)
taxilian 09:11 well, you know, if everyone else is doing it, maybe there is actually a good reason?
might at least be worth checking into before you dismiss it out of hand
neilg_ 09:11 It's true, it only feels hot for the first few seconds. Then... REALLY cold...
taxilian 09:11 lol
I really can't explain the frustration of coming back and seeing that someone was spending hours trying to solve a problem that I could have explained in seconds… yet now that I'm back, they are gone :-(
why don't they post a question on the mailing list?
MisterK2 09:11 taxilian : hello ! no I haven't any question for the moment, but I'm interested in plugins development so I hang around looking at the topics for the moment
taxilian 09:11 cool =] glad to have you
neilg_ 09:11 Perhaps it would be worth setting the topic for this room to say that?
taxilian 09:11 probably not a bad idea
neilg_ 09:11 Okay, so I have my changes in my cloned hg repository, how would I commit them?
taxilian 09:11 did you create yerself a clone?
neilg_ 09:11 Cool, I think that topic will help
taxilian 09:11 we can hope
neilg_ 09:11 I already had one, I just didn't have the changes in it ;)
taxilian 09:11 I feel bad when I miss people that I could have easily helped :-/
then you just need to hg push https://path/to/your/clone
neilg_ 09:11 Sure, I understand how you feel perfectly!
taxilian 09:11 after you commit
neilg_ 09:11 Well, clearly I don't have a clone then. lol I thought a clone was a local copy?
taxilian 09:11 well, it is
but you want a gcode clone as well =]
let's see… did you clone dev or trunk?
neilg_ 09:11 Ah, okay, I was just confused by the terminology
Erm... Dev I think
taxilian 09:11 ok
neilg_ 09:11 Is there a way to know?
taxilian 09:11 look at .hg/hgrc
is it https://dev.firebreath or https://firebreath.
so if you cloned dev (ideal) go here
neilg_ 09:11 Just firebreath so it must be trunk
taxilian 09:11 ok; that's probably fine
these are bugfixes anyway
neilg_ 09:11 That's unfortunate (but hopefully fine!)
taxilian 09:11 and I can pull them in regardless, since that code hasn't changed much in dev create yourself a clone from here, then
neilg_ 09:11 Right now my changes are commented out lines of code (rather than removing the lines) because that made things easier for me. It may not be a perfect patch though because of that
taxilian 09:11 sok; we'll take a look at it
this doesn't have to be the final version
neilg_ 09:11 Okay, I have a remote clone now
Not sure how to push my changes to it though
taxilian 09:11 go to your clone, then click "source"
click "checkout"
that will show you the URL for your clone
one of mine, for example, is
so to push to mine I would do hg push
neilg_ 09:11 Oh, I was adding too many arguments
So... it tells my "no changes found" yet if I do a "hg diff" it shows me changes
taxilian 09:11 you need to commit to your local repository first
hg commit -m "message"
then hg push ...
I don't suppose you'd have some time a bit later to start a wiki page on doing this, could you? and I promise to update it to add other things you'd need to know?
neilg_ 09:11 I'd be happy too
taxilian 09:11 awesome =]
nitrogenycs 09:11 i'm back
taxilian 09:11 hey, nitro. we almost have neilg_'s changes in a clone so you can look at 'em =]
nitrogenycs 09:11 cool
i'll do as soon as it's available somewhere
taxilian 09:11 I'll be back in a little bit, guys
neilg_ 09:11 Done!
I don't think the problems are 100% fixed, I've just solved them for now. I think the trick is to store whether the user requested a seekable stream and whether the stream is seekable in two member variables
What I did solves the problem but may have caused other issues
nitrogenycs 09:11 neilg_: Exactly, splitting the single bool into two is the way to go
neilg_ 09:11 Well, I didn't do that but probably should have ;)
nitrogenycs 09:11 neilg_: the streams code didn't enjoy much testing yet I think
neilg_ 09:11 Sure, I suspect I'm one of the few!
nitrogenycs 09:11 neilg_: I'll take a look, maybe I split it up
neilg_: I used the request range functionality more, but I'm dropping that now, so I've ran into the stream completed event problem as well
neilg_ 09:11 nitrogenycs: That makes perfect sense
Well, my clone "fixes" that issue... but in a bad way
nitrogenycs 09:11 neilg_: It also makes sense to test on all the browser, their implementations of the stream npapi vary so wildly that there might have to be a lot more checks
neilg_: do you have a link?
neilg_ 09:11
nitrogenycs 10:11 neilg_: ok, I see the changes. I will probably go and split the bools for the streams now and see how that goes. If it works, I'll commit something
taxilian: I hope changing the streams api a bit is ok
neilg_ 10:11 Do you think the API actually has to change? At least the interface should be fine. Maybe. ;)
nitrogenycs 10:11 I need at least to add stuff to it
and maybe I want to rename "seekable"
to something like "seekableRequested" and "seekableByServer" or something
taxilian 10:11 nitrogenycs: Since streams is still not used a lot, I consider it in beta
so changing the API is fine
let's get it to where it ought to be
neilg_ 10:11 That makes sense. You may also want a function "isSeekable()" that only returns true when it was requested and is supported
nitrogenycs 10:11 yes, something like that
taxilian 10:11 I'm also contemplating a simplified API for when you just need to make a basic request
something that you pass a callback (probably using boost::bind) and it gets called with the HTTP response when the request finishes
that you don't have to set up a full class for, as that is automatically done for you
(it would use the real API, of course)
nitrogenycs 10:11 sure, i've done something like this in my application, too. Write to a memory buffer or to a file stream or whatever
taxilian 10:11 right
basically something to make it easy to use web services
the 1.4 branch even has a JSON library that you can easily add
nitrogenycs 10:11 testing my changes now...
the c++ part of my plugin will remain very stupid, it just starts a file it downloads (and verifies before of course). All the fancy stuff is implemented in python which has json stuff and more builtin. That means no awful C++ hackery :)
taxilian 10:11 hehe. there are advantages to that, I'll agree
I'd really like to see some projects for embedding simple scripting languages (python, javascript, dunno) that can still be small into plugins
nitrogenycs 10:11 I can see how it's cool to have a json library though
taxilian 10:11 with a bridge for exposing objects in that language through JSAPI
there are definitely times when you need to just do it all in C++ =]
be back in a bit; gotta go find a good place to study
nitrogenycs 10:11 I have yet to see a case where that's true :) Almost all scripting languages can use C/C++ libraries for performance critical pathes
taxilian 10:11 nitro: but in some cases what you need to do that could be done with scripting languages isn't nearly worth the additional overhead of adding a scripting language
nitrogenycs 10:11 taxilian: yes, for very simple stuff it's overkill
taxilian 10:11 and for some more complicated stuff it's just not performant enough; the job I started doing plugins for they ended up embedding LUA in the plugin and it has been a disaster (though the people who made the decision aren't yet convinced)
honest I think python might have been better, but again there are just too many things that need to perform better; the real problem occurs on lower end machines
when there is also heavy graphics stuff going on
nitrogenycs 10:11 yes, you wouldn't write all of that in the scripting language
taxilian 10:11 I think the scripting language could have been a great benefit if they had used it for the right things; problem is that they used it for the wrong things
things that could have been done well in the scripting language they did with C++ and things that really should have been c++ was done in LUA
nitrogenycs 10:11 :)
of course you can fuck it up if you try hard enough
taxilian 10:11 I probably could; these guys were just naturals, though
nitrogenycs 10:11 :)
i think my stream changes work, testing a bit more
taxilian 10:11 cool =]
nitrogenycs 10:11 where do i commit to? currently i am still against the "default" firebreath repository
taxilian 10:11 hmm. are there API changes?
nitrogenycs 10:11 I think I only added stuff
let me check quickly
taxilian 10:11 if there are just bugfixes then it can go into default
and will be in 1.3.1
if there are any breaking changes then it needs to go into 1.4, which is in dev
nitrogenycs 10:11 I think the changes should be ok
I've renamed a protected and a private member in browserstream
taxilian 10:11 ok
nitrogenycs 10:11 that's the only things
taxilian 10:11 probably fine, then
thanks for checking =]
nitrogenycs 10:11 and people should not subclass browserstream anyway
taxilian 10:11 when I get there, think you might be able to give me some suggestions on implementing an HTTP uploader class? I don't have time this week, but I'm going to need it soon
currently I have one that uses libcurl and openssl, but I'm thinking that winInet would be better
nitrogenycs 10:11 personally I'd stay away from wininet as much as possible, it's not a nice api
i would it use only if you need built-in proxy (with passwords) support
taxilian 11:11 well, the alternative is that I will probably have to build openssl again for me :-P
and I do need proxy support
also with openssl I have to include my won root certificate store
whereas with wininet I can use the system/IE one
nitrogenycs 11:11 the wininet stuff is really hairy, I found a single code sample after days of googling. I had to do a lot of experimentation.
taxilian 11:11 hmm. fun
nitrogenycs 11:11 but it should be possible
taxilian 11:11 all the more reason that it should be packaged into a library for easier use =]
nitrogenycs 11:11 you need to change the GET for POST and do a few more things
taxilian 11:11 ok
neilg_ 11:11 I'd avoid wininet in any case because it's only going to work on Windows
taxilian 11:11 I have other code for Mac and Linux
nitrogenycs 11:11 it also works only in IE
neilg_ 11:11 libcurl isn't that difficult to build once you've figured out the correct parameters - I have a batch file to help
taxilian 11:11 why would it not work in firefox?
neilg_ 11:11 You can use wininet in any browser on Windows
taxilian 11:11 right
nitrogenycs 11:11 well it would, but you might have problems witrh the proxies
neilg_ 11:11 It just reads the settings from IE
taxilian 11:11 that's what I need
the proxy problems will be there regardless
wininet will probably have the least problems there
nitrogenycs 11:11 that's true
taxilian 11:11 on mac and linux I can rely on libcurl and openssl being there
neilg_ 11:11 That's why I'd avoid wininet because you have to deal with the proxies on other platforms
taxilian 11:11 on windows it is one more dependency that I have to deal with, more proxy issues, etc
I'd rather just use the "correct" API for windows
also it will reduce the size of the download
since this is a project for Facebook, having a smaller download size will be a big deal
nitrogenycs 11:11 and supporting IE only might be enough for facebook users xD
neilg_ 11:11 You're correct there but I'm not sure that using the IE certificate store is a win in any case because getting your certificate into that store can be a hassle
taxilian 11:11 I don't need to; the certificate I'm concerned about is a normal SSL cert, so it's already there
the root one is
lol. no, they definitely want support for all browsers =]
neilg_ 11:11 But what about other people who've signed things with a different root certificate?
nitrogenycs 11:11 the main reason I used wininet in firebreath activex is because it routes all traffic through the browser's default pipes. Including proxies and password authentication etc. If it didn't provide that I'd not use it at all.
neilg_ 11:11 It might work in this case but isn't very general-purpose
taxilian 11:11 neilg_: those people aren't my problem =] but I will leave the curl/openssl code around if anyone needs it
neilg_ 11:11 It's your project and you're free to do what you want, just trying to offer a different POV ;)
taxilian 11:11 well, right now I'm concerned less with the project and more with my immediate needs :-P I will, of course, contribute the code to the project as well =]
nitrogenycs 11:11 what does the ssl root cert have to do with this?
taxilian 11:11 my particular use case is a need to upload images to an HTTPS server (facebook's, in particular)
so I need to validate that it really is their server I am talking to
if I use openssl (like I currently am), it can't access the root CA database
so I have to include the root cert hardcoded into the source file
or in add even more into it
neilg_ 11:11 Right. I've had this problem too. :)
I solved it for libcurl by providing it with our own certificate store with the root certificate
taxilian 11:11 also, if wininet works for most basic http access, then I would prefer to use it for the project as the default simply because the dependencies are already there, and one of the design goals of the project is to keep the dependencies to a minimum. that doesn't mean we can't have alternatives available as well, of course =]
and I do currently have a HttpClient class that does exactly what neilg_ described
which is, btw, in 1.4
neilg_ 11:11 But in any case, I'd suggest using wininet to pull the proxy information out but use libcurl and OpenSSL in any case. Though if you're only targetting Windows then what you're doing is fine!
I'm currently in porting mode ;)
taxilian 11:11 I will continue to use openssl / libcurl on mac
but I would prefer to use wininet for uploads over openssl/libcurl on windows simply because it will knock another 300k or so off the size of the download
I plan to add proxy detection support to firebreath 1.4 as well
nitrogenycs 11:11 ok
taxilian 11:11 firefox 3.6 finally has added an API for getting the firefox proxy stuff
nitrogenycs 11:11 thanks for the explanation
taxilian 11:11 =]
neilg_ 11:11 I have the bad habit of assuming that if I know something, everybody must know it! =)
taxilian 11:11 me too
so why do people keep asking questions about firebreath? I mean, the implementation is so inherently brilliant and intuitive that everything should be obvious!
Andrew___ 11:11 Hi Richard, are you about?
taxilian 11:11 yep
some days I'm not sure what I'm about, but I'm definitely about something
Andrew___ 11:11 I emailed you yesterday saying I had some questions for you - and dont worry all developers get like that!
taxilian 11:11 fire away. I promise to have answers. some might even be relevant
Andrew___ 11:11 Right, bear with me, ill try to explain best I can:
The company I work for currently ru
nitrogenycs 11:11 I've committed the stream fix, neilg_, want to review it?
Andrew___ 11:11 has a project which uses an ActiveX control. Obviously that limiting and we were looking for ways to give better support across browsers and OS. We looked into NPAPI and then found firebreath.
taxilian 11:11 sounds like a good option so far
Andrew___ 11:11 Whats not clear to me from the documentation is where to go after the Hewll
neilg_ 11:11 nitrogenycs: Sure, sounds good!
taxilian 11:11 Andrew__: after the hewll?
Andrew___ 11:11 Hello World examples you provide.
sorry, bad typing
taxilian 11:11 neilg_:
Andrew__: well, what do you want to do? what is your goal? what do you not understand how to do?
Andrew___ 11:11 Ok let me try an give you a bit more background.
nitrogenycs 11:11 OOOPS
part of my own plugin snuck in there :D
taxilian 11:11 lol.
I can't believe you did that. I'm cutting your FB team salary by 50%
Andrew___ 11:11 The current ActiveX control works very much like a VNC clone. So its for remote control. We use a lot of graphics stuff, TCPIP with HTTP and multithreading.
taxilian 11:11 Andrew__: that should be doable with FireBreath
Andrew___ 11:11 If we didnt use firebreath and attempted to use NPAPI directly, would we face the same challenges?
taxilian 11:11 well, some of the challenges FireBreath abstracts or fixes for you
but other than that, eys
nitrogenycs 11:11 that just happened because I have to use TortoiseHG, TortoiseSVN and TortoiseGit simultaneously and if you press the button on the wrong one... I could swear I didn't see it in the commit summary though
taxilian 11:11 lol
neilg_ 11:11 nitrogencys: That seems like a good fix!
nitrogenycs 11:11 feel free to cut it 100% :)
Andrew___ 11:11 Ok, well thats a good start!
nitrogenycs 11:11 ok, removing the file now...
taxilian 11:11 nitrogenycs: ok. in thanks for your work, though, we'll also give you a 75% discount on firebreath licensing fees
neilg_ 11:11 Andrew__: We have a similar plugin except we moved from NPAPI to ActiveX using FireBreath
Andrew___ 11:11 The control is very Windows heavy at the moment, in fact on other platforms, we have emulated the Windows API for ease of porting. Im guessung thats something we couldnt do with FB?
neilg_ - interesting!
At least I know it can be done
neilg_ 11:11 Well, similar in that we're drawing into the window handle
It can definitely be done
taxilian 11:11 Andrew__: it would depend on which APIs you are faking. FireBreath tries very hard to provide the interface with the browser and then get out of your way so you can do everything else however you want
neilg_ 11:11 In our case we're rendering 3D scenes but it's very, very similar it sounds like
Andrew___ 11:11 We use a lot of GDI related calls for drawing the remote sides screen.
taxilian 11:11 if you're talking about drawing stuff, you should be able to do it however you want, but with the caveat that the browser places restrictions on what drawing and event models you use on mac
that should be fine
Andrew___ 11:11 Ok well sounds v promising - would you be able to give me a push in the right direction for my next steps?
taxilian 11:11 sure; but I still need to know what you consider to be the next steps =]
did you want to figure out how to draw? how to add API calls to the javascript API? how to crash the browser process in one easy line of code?
nitrogenycs 11:11 ok, naughty file removed, too bad mercurial keeps a history :)
Andrew___ 11:11 Ah, all im at so far is the Hello World example and can get it building on Windows and Mac - linux is crying about some wrong version of the boost libraries, but Im not too bothered about that atm. How to draw would be an obvious first step
taxilian 11:11 nitrogenycs: yeah, and that file seems to have so much confidential IP in it too!
Andrew__: by hello world example do you mean you created a plugin with fbgen or you built FBTestPlugin?
Andrew___ 11:11 Sorry for not being specific, actually both!
nitrogenycs 11:11 taxilian: completely :)
taxilian 11:11 ok. see, my issue is that it is hard for me to suggest what to do next when I don't know what you are trying to do =]
so if you have used fbgen to create your own plugin, then I would suggest that you decide what functionality you want to start with. Perhaps some basic drawing? dunno
Andrew___ 11:11 Im trying to make a case to use FB in our company. A simple way to prove the point would be to demonstrate TCPIP connectivty and some level of drawing
taxilian 11:11 ok; TCPIP connectivity will probably still be the same libraries you used before
Andrew___ 11:11 Ok thats fine
taxilian 11:11 for an example of how to get the drawing you can look at BasicMediaPlayer
basically you want to handle the attachedevent and detachedevent
nitrogenycs 11:11 drawing can be even easier. If your current code just needs an HWND, you can get that out of firebreath
taxilian 11:11 when the window is attached you can start drawing; cast the pluginwindow to a PluginWindowWin
Andrew___ 11:11 Aha - that looks like a great starting point - Ill have a go tomorrow and see how I get on! Thanks for the push and Im sure this wont be the last you hear from me!
neilg_ 11:11 Good luck! If you need help you can also ask me too - I've done very similar things
taxilian 11:11 cool. please consider contributing back by adding documentation to the site to help clarify things that you had to ask about
there is usually someone in here that can help with various aspects
Andrew___ 11:11 Ok thanks - i like to contribute to projects like this so Ill certainly consider it once I know a bit more about what Im on about!
taxilian 11:11 documentation is the easiest way to contribute, but with the experience it sounds like you have there are definitely some other areas we could probably use some help with =]
maybe some simple GDI stuff, if you have a few minutes sometime
but let's get your plugin going first =]
Andrew___ 11:11 Ok thanks for all your help guys - be in touch soon
taxilian 11:11 you're welcome
nitrogenycs: one easy way to keep your files from accidently getting sucked in is to keep your project outside of the firebreath root
that's what I do now
as of 1.2.2 you can put the projects folder (as well as the build folder) wherever you want
nitrogenycs 11:11 yes, I've seen the change, but didn't yet have enough time to move stuff outside
I've just started on the plugin again
I've simplified my plugin quite some. For example I wrote a tool which would sign chunks of a file and you could download parts of the file and verify them
taxilian 11:11 cool
nitrogenycs 11:11 I've moved all of that out of the c++ plugin
taxilian 11:11 good to have you back, then =]
nitrogenycs 11:11 brb
taxilian 13:11 welcome, chucksplatt
chucksplatt 13:11 Hi. Thanks. I anticipate I'll be dropping in from time to time with questions.
taxilian 13:11 sounds good =] any questions to start out?
chucksplatt 13:11 I think there's a lot of NPAPI I'm still trying to get my head around. I'm writing something write now using the npruntime example from the Mozilla site, but it seems to crash in Chrome, and I'm chasing that down right now.
taxilian 13:11 any reason you're doing it by hand instead of using FireBreath?
chucksplatt 13:11 It seems to be choking on calling InvokeDefault. I don't suppose anything comes to mind?
taxilian 13:11 (I'll help as I can anyway, just wondering)
what are you calling InvokeDefault on?
chucksplatt 13:11 I was actually in here a couple weeks ago or so. We were talking about Firebreath not having a way to have a plugin get invoked on opening a file type in such a way that the file being opened is atuomatically determined as the file stream.
taxilian 13:11 ahh. I remember now
how's your progress on that going, then? is it something that could be added into FireBreath, do you think? I know very little about how that type of plugin works
chucksplatt 13:11 Well, like I said before, I'm fairly new to a lot of this, so I don't understand the inner workings of these things myself to know whether or not it would be easy to add to Firebreath.
taxilian 13:11 =] well, when you feel like you have a handle on it, explain it to me, eh? =]
chucksplatt 13:11 I glean mostly what I can from the Gecko doc.
taxilian 13:11 in the mean time, you say it's croaking on InvokeDefault? When something calls InvokeDefault on your plugin or when you call it on something from the browser?
chucksplatt 13:11 It's calling it on the browser. The example code creates a struct of function pointers, and as part of the intialization, it assigns the function pointers to... I think... the NPN function pointers passes into NP_Initialize.
taxilian 13:11 right; that's required to do anything. as explained here:
chucksplatt: where are you located?
chucksplatt 13:11 Austin
taxilian 13:11 I have to run in a few minutes; would you like to just call me real quick? if I can ask you questions faster we can probably get you going faster
chucksplatt: I sent you a URL to a page with a gvoice widget that you can use to call me
chucksplatt 13:11 Sure. I feel like I need to investigate more to better understand my problem, but it could probably only help.
taxilian 13:11 did you get the PM?
meh, gotta run. here it is here:
please nobody prank call me ;-)
be back later. chucksplatt, feel free to give me a call; I won't be in class for 45 min
chucksplatt 13:11 I got it. I tried using the widget but I think I"m just getting voicemail.
I'll try again later with hopefully more info.
sabotaged|wk 14:11 hmm, trying to figure out how i can get boost_system to be built
taxilian 14:11 add_boost_library(system)
put it in your pluginConfig
assuming you are using 1.3.0 or later
sabotaged|wk 14:11 hmm
its weird, boost_system.pdb is being generated but not boost_system.lib, at least in \build\boost\libs\system\Debug
should i see a boost_system subproject in my solution, just like boost_threads?
taxilian 14:11 yes, you should
did you re-run the prep script?
sabotaged|wk 15:11 yeah
ok i see it now, i just needed a dependency
taxilian 15:11 ? add_boost_library in your pluginconfig should add the dependency automatically
sabotaged|wk 15:11 thanks
taxilian 15:11 are you using system boost?
sabotaged|wk 15:11 system boost?
taxilian 15:11 ok; what version of firebreath are you using?
sabotaged|wk 15:11 1.3.0
taxilian 15:11 try using the latest stable build
I think there was a bug in 1.3.0 that has been fixed, though I wouldn't expect it to affect you unless you're using WITH_SYSTEM_BOOST
sabotaged|wk 15:11 ok
taxilian 15:11 good luck everyone; I'm off for a few hours
taxilian 21:11 it's slow here in the evenings these days
I guess it only picks up again after I go to bed :-P
DriesSt 22:11 Hi, I have a quick question... Is there a way to "lock" a JSObject that was made by the browser and keep it existing and alive inside the plugin?
I would use it to store a callback without using the event mechanism. Now when I keep the JSObjectPtr, by the time I use it to do a callback the object is already destroyed and the plugin crashes.
taxilian 22:11 hey, Dries
well, if the browser works correctly, that shouldn't happen
because a JSObjectPtr *does* hold a reference to the object
what browser/os?
DriesSt 22:11 Minefield on OSX :s
I'll test it in Safari, hold on
taxilian 22:11 well, either somehow we're buggy (I've spent hours on this one; even looking at logs, doesn't seem possible), or the browser is
I'm even doing 10 retains on the object they give us
just in case
DriesSt 22:11 yeah, I've seen that in the code
I also think there could be a memory leak in the Invoke method in that file
taxilian 22:11 point me to it
DriesSt 22:11
line 176 news an array of NPVariant structs
but it seems te me it's never released
taxilian 22:11 you're absolutely right
good catch
I will fix that
this is why I like other eyes on my code =]
DriesSt 22:11 ok, the callback works in safari
so it's a minefield problem
taxilian 22:11 yeah :-/
DriesSt 22:11 my fault for not testing on multiple browsers :s
taxilian 22:11 no problem; this way I found out about my memory leak =]
DriesSt 22:11 I'll try firefox beta
taxilian 22:11 memory leak should be fixed; if you have a second, could you verify the fix for me?
DriesSt 22:11 ok, hold on
taxilian 22:11 I committed it to the stable repo
haven't put it in dev yet
but that's the link you gave me, so I imagine that's fine
DriesSt 22:11 a better solution might be to put the new into a boost::shared_array, because if the function that is invoked throws an exception in this case it might be possible that delete[] is never called
taxilian 22:11 hmm. good point.
why don't we leave it this way until I can test more carefully
to make sure there are no side effect
but I will add an issue for it
DriesSt 22:11 ok
the strange thing is that minefield even crashes on invoke while the function is still in memory, because still accessible from the javascript
taxilian 22:11 yeah
well, most likely the NPObject is wrapping something else
which is probably reference counted
and the reference counting is likely broken
Safari and Firefox seem to have broken refcounting, which is why we have to retain 10x. I keep wanting to blame us for that, since it doesn't make sense, but I can't find a single problem in our reference counting and suddenly the refcount they have is invalid
DriesSt 22:11 any recounting issues in chrome?
taxilian 22:11 not sure if I've seen any in Chrome or not; definitely both Firefox and Safari, but Safari seems to be the worst
DriesSt 22:11 true, behaviour in Safari is very erratic
sometimes it works perfectly
and then I refresh and it crashes
things like that
taxilian 22:11 yeah
DriesSt 22:11 I wonder how other plug-ins keep it stable
taxilian 22:11 that's what I'm trying to figure out
found a flaw with the way 1.3.0 handles async callbacks
I've been using weak_ptr, but that doesn't work if we don't keep around the reference
for example when someone passes in a callback that you use to make a async callback and then discard
DriesSt 22:11 ok, that might be something
because my callback is async
taxilian 22:11 this fix should be portable back into 1.3.0; let me get it working and then I'll commit it for you
however, the result would not be a crash
the callback just wouldn't get called
DriesSt 23:11 How are things with MSIE?
taxilian 23:11 pretty good for the most part; aparently IE sometimes sends a WM_CLOSE event when it's not really ready to shutdown, though, and that's causing me some issues
I would *really* like to have more control of what happens there :-/
it's just finding time...
DriesSt 23:11 WM_CLOSE does not mean shutting down, it just means no longer drawing the window
taxilian 23:11 might be an easy fix, then; I'll tell it to only shutdown when WM_DESTROY happens
does WM_DESTROY *always* get fired?
DriesSt 23:11 that's what you should do
because WM_CLOSE is meant for asking for user confirmation for example
like "do you really want to quit?" "do you want to save your stuff?"
taxilian 23:11 ahh
see, I'm a plugin expert… don't actually know much about the platform APIs themselves :-P
DriesSt 23:11 it takes a lot of frustration to learn the windows API
taxilian 23:11 yeah; and a lot of reason
I do okay, but since the only time I've really needed it is with plugin stuff...
DriesSt 23:11 but once you've figured it out it makes sense in some twisted way
taxilian 23:11 this is why I keep asking you questions; you know probably both activex and the windows API better than I do
DriesSt 23:11 maybe, but NPAPI is very new to me
and NPAPI seems like a very quirky thing
taxilian 23:11 tell you what; any time you have NPAPI problems, bring them to me. I'll keep asking you for help with ActiveX and windows :-P
DriesSt 23:11
taxilian 23:11 oh, it is, my firend… it is =]
DriesSt 23:11 gotta go, time for lunch