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

IRC Nick Time (GMT-7) Message
physicsrob 00:03 seems like good content
and then in a couple of weeks go in and change the order :)
taxilian 00:03 lol
nah; people will look at them and choose FireBreath
and if they don't, that's their issue :-P
you can change the order if you want
taxilian 00:03 good night, everyone
_vizZ 02:03 hello, is there anybody there? :)
do you guyz know of any specific tutorials on cmake worth attention?
coz the cmake docs are not necessarily helpful and the sample project tutorial is too simple for my needs :/
i need wrap an existing project ( not a cmake project ) with firebreath
and it's a lot of pain as for the cmake begginer ;p
*beginner? ;p
ok, so i'll try to show you my point
there is this project ( it's a Qt library project generated and maintained by the qmake meta compiler )
well, actualy it was a Qt plugin project done with the QBrowserPlugin tool, but the Core was extracted in order to be reused with FB ( there is a main object/class which is the API to the Core )
so i have all the sources, all the includes, all the libraries and no idea how to wrap it with firebreath project
btw, it's a multiplatform project, so it needs to run on Windows, Linux and MacOSX ( but it should be a piece of cacke with CMake and FB, right? ;p )
oh, and i need the sources to be outside of the "projects" directory
so, as you can see, it's a little more that a sample project @ CMake tutorial :/
ah, btw i', quite aware of your tutorials on using cmake with fb
but it, for ex., the library tutorial, depends on installed libraries ( find_library ) while i would like to use cmake with compiled local libraries ( no make install )
or is it THE EVIL way? ;p
btw, i need them to be staticaly linked to the plugin, is some kind of a problem?
( ofc they are compiled to be static )
saiaman 02:03 hello everyone
saiaman 03:03 Does anyone knows how to add 7z decompression feature to a plugin ? :(
:$ :$ :$
Shailendra 03:03 Hi
I want to know whether following scenario is possible using firebreath plugin
Inside iframe i want a container which will hold a default browse control. Initially I'll set google URL and later user can browse through different url
and in parent page of iframe, i'll have one button which will give me current URL accessed in iframe.
Lta 04:03 Shailendra: i personnaly don't know but wait for a few hours, for the chan to be more active, same for you saiaman
saiaman: actually you question isn't precise enough for me to answer
Shailendra 04:03 normally you can not access crossdomain link using iframe
Lta 04:03 saiaman: i would say the question is not firebreath relevant, but again is not precise enough, decompress what, in which context, for what reason ?
Shailendra 04:03 i want a container which will be inside iframe with initial url as say
user will search thru google for say apple. google will provide many links
user will go thru some of links and finally open link he wats
i want that url in my parent page from where iframe is called
Lta 04:03 Shailendra: i told you i could not answer you question, i don't know much about html, im a c++ developper.
Shailendra 04:03 ok
Does this plugin host browser control?
_vizZ 04:03 why there are no project sources while doing prepeclipse on linux?
i mean, there are no relevant project files ( *.cpp and *.h ) available form whithin eclipse
all i did was just creating the basic project stub
any ideas? :>
ah, ok, they are in includes
quite not intuitive ;p
Lta 04:03 _vizZ: people aren't spending their days on irc, if you have a question, stay a few hours if you want an answer
the chan is more active the afternoon (depending on your timezone)
these guys ... doesn't understand how irc works
DFUN 08:03 Hi there! Is there any date prospective to release version 1.4? If it's somewhen the next week(s) I might not need to update twice. I'm going to check the logs tomorrow. Thanks and good afternoon
taxilian 08:03 DFUN: 1.4 should be released this week or next, but there will be no breaking changes from RC2
NoAntzWk 10:03 hi taxilian1
taxilian 10:03 how you doing today?
NoAntzWk 10:03 I have tested the streams on MacOS (using getURL) and it works.
taxilian 10:03 excelent
NoAntzWk 10:03 But.... I think that I found a new issue.
taxilian 10:03 okay
NoAntzWk 10:03 it happens only with FireFox and it happens on MacOS and Windows.
Running FBTestPlugin and calling getURL and downloading a binary file (ie, 300Kb) the download stream works, but when calling js callback the js receives an empty string as received data.
taxilian 10:03 yes
SimpleStreamHelper doesnt' work for binary files
and you certainly can't return a binary file in a string
javascript only deals with string data
NoAntzWk 10:03 ok....
taxilian 10:03 so the first time it sees a "NULL" it'll read that as end of string
NoAntzWk 10:03 But the SimpleStreamHandler works, only the the final callback fails.
taxilian 10:03 well, that's true, I guess
SimpleStreamHandler doesn't hold a string
it just has a block of data
so that'll work I guess
you just can't make it a string
NoAntzWk 10:03 But.... with Chrome and Safari it works!
taxilian 10:03 that's weird
it shouldn't
that's a bug ;-)
no, they probably are just more permissive on what they allow in a string
but this isn't a bug; it's just a limitation of hte test case
NoAntzWk 10:03 Mmmh... I review this case to collect information.
taxilian 10:03 ok
NoAntzWk 10:03 For me, It's not important to send all downloaded data to callback (probably it has no sense).
But for test fb versions I do.
Although in my plugin I write downloaded data to a file.
taxilian 10:03 would be cool to see a method added to SimpleStreamsHelper for downloading data to a file instead of to a buffer
NoAntzWk 10:03 Yes. I have some pending commits to do (post downlaod streams and downloads to file) but I haven't time to read pro git book, yet.
taxilian 10:03 wait.. you have POST streams working?
NoAntzWk 10:03 Yes.
taxilian 10:03 if you have stuff to send to us I can help you with git =]
that would be very nice to have
would love to have that in 1.5
git really isn't that hard, just a slight adjustment in thinking
NoAntzWk 10:03 Download streams that performs POST instead GET.
taxilian 10:03 right; people keep asking for that
would really like to get it in
NoAntzWk 10:03 Yes... I come from SVN world and sometimes i'm confused.
taxilian 10:03 I can help you there; it isn't as bad as it seems at first
NoAntzWk 10:03 I think that it's cool, but it's a diferent point of view.
taxilian 10:03 it is
and now that I've learned it, I will never willingly go back to svn =]
NoAntzWk 10:03 I promise that I try to push a commit as soon as possible.
taxilian 10:03 cool
let me know if you need help
NoAntzWk 10:03 Ok, thanks.
taxilian 10:03 if it isn't too much more trouble it'd be good to have the patch be against the 1.5 branch
since that's where it will go
but that one is important enough I can modify it if you don't have time
NoAntzWk 10:03 perhaps a how-to in the wiki about providing code as colaboration will be appreciated.
taxilian 10:03 could you elaborate on what you'd like to see?
NoAntzWk 11:03 Basically the process for create a branch from github, develop a new feature or bugfix and how to make a request to include this patch to main firebreath repo.
taxilian 11:03 fair enough; I can do that
90% of what you need is in chapter 2 of that pro git book, though; it's really not very long
chapter 3 rounds off another 8% or so; the other 2% in the rest of the book is more on the "ooh, sparkly" type features that can be useful but aren't essential to know
NoAntzWk 11:03 But does the pull request will be done via or it will be done using my local clone?
taxilian 11:03 if you do an official pull request you need your change to be in your fork on
that's the easiest way for me to get changes
if you have a local clone and want to submit something you can use git format-patch
which creates patch files that are really easy to apply using git
and keeps your name and commit message with the patch
that's the second best way
and doesn't require your stuff to be on github
next best would just be a normal patch; that's often a pain, though
but better than not sending me the changes =]
NoAntzWk 11:03 Ok. So for first option, I should fork from fb project and clone this branch to my local. I will make changes and I will push them to my github branch. When I pushed the changes then I should make a pull request, isn't it?
For option 2, I should work directly on my local (cloned from official firebreath) and then I will should build a patch to send to you to introduce to master banch, isn't it?
taxilian 11:03 right
gotta change classes, brb
NoAntzWk 11:03 Ok. thanks.... I hope you send something soon.
taxilian 11:03 NoAntzWk: like I said, let me know if you need help figuring anything out
JohnD 13:03 So I've been looking a bit at fb_installer.js and with my limited, rusty JS I can't get anything to work beyond generating my own version of the template.
I just get errors in Chrome saying FB & FireBreath aren't defined
when doing like FB.isPluginInstalled("TestPlugin")
JohnD_ 14:03 darn why does IRC keep logging me out. And why do I have to enter a captcha every time. grr
taxilian 14:03 JohnD_ I'd have to look at ti, and I'm at school working on a project right now
I could probably look at it later this evening (MST)
neilg_ 14:03 JohnD, is there an object on your page with the name "FB" or "FireBreath"?
Because those errors suggest that's the problem
taxilian 14:03 neilg_: he's trying to use the fbinstaller.js file
which mostly (but not completely) works
he really needs to get a javascript developer to fix it for him
neilg_ 14:03 I haven't used that, I'm not sure when that's meant to be used :)
JohnD_ 14:03 I've done JS before, just not recently
taxilian 14:03 it's designed to be a detection script
I am using it at facebook with relatively few changes, and it works fine
JohnD_ 14:03 I include the JS file: <script type="text/javascript" src="fb_installer.js"></script>
<script type="text/javascript"> function testPluginInstalled() { alert(FB.isPluginInstalled("MyPlugin")); } </script>
what did I miss?
neilg_ 14:03 Where does the FB object come from?
Is the fbinstaller.js meant to put it into the DOM?
taxilian 14:03 neilg_: go look at fbinstaller.js
and you'll see where it comes from
stuartmorgan 14:03 JohnD_: have you checked that the template substitutions didn't corrupt the JS (e.g., by putting unescaped quotes in a string or something)
JohnD_ 14:03 Specifically in Chrome I get: "Uncaught ReferenceError: FB is not defined"
taxilian 14:03 could you pastebin the js file you're including?
JohnD_ 14:03 no, but tax told me it was tested :)
taxilian 14:03 no
it isn't
I've used most of it
so it fundamentally works
but I haven't used it as I originally intended it to be used =]
so there are probably problems
stuartmorgan 14:03 Actually, this looks really suspect:
if (!FireBreath.$)
FB.$ = function(el)
taxilian 14:03 just minor ones
stuartmorgan 14:03 Looks like you switched from FireBreath to FB half way through the file
neilg_ 14:03 Right
taxilian 14:03 huh. sure did =]
JohnD_ 14:03 That caught my eye, I figured I was just too dumb to understand
taxilian 14:03 change all references to FireBreath.* to FB.*
no, this has never been finished
trust your feelings, Luke =]
anyway, it should be pretty easy to fix
JohnD_ 14:03 damn OO-JS
taxilian 14:03 I just don't have time to do it myself
JohnD_ 14:03 OK, here is the JS: here is my test HTML:
I assume something simple
I'm actually not too bad on JS basics and a bit of DOM, not used JS "packages" before so it looks unfamiliar to my eyes
In the IE function it actually tries to create a plugin. There's no window so what would happen in FB terms... StaticInitialize() would be called and a plugin instance would be created, then immediately destroyed?]
taxilian 14:03 JohnD_: that's the detection script working
so this doesn't actually inject anything into the dom
you'll have to add that
but it shouldn't be hard
just copy the injectPlugin function from examples/FBTestPlugin/test.html
and then modify it as needed
also I hope you'll consider contributing your changes back when you're done to help the next poor soul so they don't have to go through this =]
so if you do FB.isPluginInstalled("HeartTest") what does it return?
JohnD_ 14:03 yes that's fine, I know it's for detection only, but the IE-specific version tries to instance the plugin?
FB.isPluginInstalled doesn't get called, I just get Chrome complaining FB is an unknown ReferenceError
taxilian 14:03 even with the updated file?
yes, IE has to create an instance to see if it is there
firefox does not
which is nice
it also expects a property called "version" on your plugin
though you can make that work correctly by changing line 93 to return version || true;
more correctly, anyway
watch the js console in chrome before you call anything
there hsould be some indication of a problme with the file
if it's saying that
JohnD_ 15:03 I just keep getting "Uncaught ReferenceError: FB is not defined"
I get this in the fb_install.js file too, line 16
e.g: if (!FB) {
that line is causing errors itself
stuartmorgan 15:03 JohnD_: It should probably be if (!window.FB)
saiaman_home 15:03 hello eveyone
JohnD_ 15:03 I was trying to Google what JS "fake packages" should look like but I just get other things
saiaman_home 15:03 taxilian can you explain what you mean by : Support for Security Zones ???
saiaman_home_ 15:03 oups sorry got disconnected :(
JohnD_ 15:03 I fI instead do this it works: if (FB==null) { var FB = { }; }
the only way I can contribute back to FB, is through Git?
other than the wiki, obviously
saiaman_home_ 15:03 anyone knows how to use security zones in order to register or not some methods regarding the browser location ?
JohnD_ 15:03 Hmm, the version check for npAPI DLLs doesn't look good to me. Why would the version be part of the file-name?
taxilian 15:03 JohnD_: the easiest way is with git, yes
I accept patches, etc, as well
it just takes me a lot longer to apply them
saiaman_home_ 15:03 hi taxilian, how are you ? fine i wish
taxilian 15:03 doing well, but very busy
there is a security option for jsapi objects
saiaman_home_ 15:03 yeah i understood
taxilian 15:03 you can register methods in different zones
you then set the zone based on the browser location
hang on, let me give you an example
saiaman_home_ 15:03 oh thanks so much taxilian
taxilian 15:03
If you wanted it to only be available to Protected or higher, you could do SecurityScope_Protected
those are just enums; you can define your own levels
but use scoped_zonelock to set the zone temporarily while you register methods, properties, and attributes
and those will only be available in that zone or higher
(local is higher than private is higher than protected is higher than public)
saiaman_home_ 15:03 ok
taxilian 15:03 feel free to document this on the wiki as you figure it out
saiaman_home_ 15:03 so to define my seciruty zone i only have to check browser location @ init right ?
taxilian 15:03 check location in onPluginReady, probably
might not be able to get it earlier
saiaman_home_ 15:03 hmm right
i'll try this ASAP
because i've done something like that but i unregister methods if location isn't good :s
taxilian 15:03 yeah, this is much cleaner
saiaman_home_ 15:03 yeah right
i'll try this, maybe tomorrow if i've time :)
taxilian 15:03 you can set the default zone to -1
and then use setDefaultZone to change it when you find out what it should be
that way you can't access anything (even public) until you know what you should have access to
or you could set it to public and then upgrade when you learn better
saiaman_home_ 15:03 nice
JohnD_ 15:03 damnit, so now in NP it works but there is no version, in IE8 it fails...
taxilian 15:03 whatever best matches your setup
JohnD_: the version must be in the filename for it to get the version
saiaman_home_ 15:03 but .... methods registered are ? public ? protected ? or can be defined while registrering ?
taxilian 15:03 on NPAPI
JohnD_ 15:03 plugin = new ActiveXControl(axname); ---- throws ------ "'ActiveXControl' is undefined"
taxilian 15:03 oh, yeah
should be ActiveXObject
sorry =]
saiaman_home_ 15:03 thanks for eveything taxilian, i'll try this solution better than mine
JohnD_ 15:03 ah, that works now.
So on my earlier question since the IE version does try to create _something_ does that mean my plugin code in FB will be used? Or does it not get that far
I don't have and never used Git... and frankly don't have time to learn just to let me submit changes to FB... but you're more than welcome to a fixed fb_install.js with these few changes if there is a way to give you such files
equally when/if I combine it with your existing tests
sorry, integrate not combine
saiaman_home_ 15:03 taxilian i know you're busy but just an information : if i want my plugin to decompress a .7z inside my plugin's dir, got to add 7z lib or is there allready something included ?
i'm tryin to search logs and git but nothing found :(
taxilian 15:03 JohnD_: yes, your plugin code will be used
but AttachWindow will never ben called
never be called
saiaman_home: no, nothing like that is included
you'd need to find a lib for that
JohnD_ 15:03 so StaticInitialize, and then a plugin would be created and immediately destroyed?
taxilian 15:03 JohnD_: for a single file I don't mind if you just email it to me
JohnD_: yes, pretty much
JohnD_ 15:03 OK so I make sure not to do heavy-lifting and init code until I get a window :)
taxilian 15:03 that's probably fair
I need to find a good way to notify the plugin that it's a scripting only instance :-/
stuartmorgan 15:03 taxilian: fyi, Gecko has a version property on plugin objects as of 1.9.2, so you could check for that before parsing the name
taxilian 15:03 stuartmorgan: yeah, but it doesn't work cross-platform
linux/mac it isn't there
stuartmorgan 15:03 It is on Mac
Camino's welcome page uses it to detect Flash versions; I guarantee it works on Mac ;)
taxilian 15:03 okay; well, I might change it to that eventually
but for now I don't have time to mess with it =]
I remember reading that somewhere it doesn't work
JohnD_ 15:03 Actually SWFObject does version-checking too. No idea how
taxilian 15:03 also if I use something that is only on 1.9.2 then it won't work on older browsers
stuartmorgan 15:03 taxilian: yes, you'd have to fall back for other browsers anyway
it's just a cleaner way to get the version when it's available
taxilian 15:03 agreed
JohnD_ 15:03
anyway sleep time here in the UK. Thanks for the help Richard. As and when I have something useful I'll throw it your way.