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

IRC Nick Time (GMT-7) Message
taxilian 00:03 tony_: still here?
eomer212: you still here?
well, if you guys come back in the next 30 minutes I'll probably still be here; otherwise try back tomorrow (my time, I'm GMT-0700)
taxilian 00:03 FireBreath 1.4.0 is officially released now.
good night everyone; I'll be back online in about 10 hours
kalev_ 01:03 taxilian_away: nice work
taxilian_away: for what it's worth, I actually tried it on Linux over the weekend but didn't do very extensive testing; after some minor changes our plugin built fine and seemed to work too.
eomer212 02:03 well, comming back. are their anyone here.?
sasom 03:03 hi!
anybody there? :)
nitrogenycs 06:03 where do you guys buy your code signing certificates? So far the cheapest I found was 99$ a year
saiaman 06:03 Verisign for us
yeah it's expensive
i think you'll won't find cheaper
nitrogenycs 06:03 yeah
verisign is like 500$ i think
If I was in a company with money I'd also spend it :)
saiaman 06:03 yeah i understand :(
so bad that there aren't prices for lonely developpers
nitrogenycs 06:03 :)
It's the first time I really need one
tony_ 06:03 hi..
nitrogenycs 06:03 hello
tony_ 06:03 My mac plugin copied to internet plugins folder does not embed in already open browsers..even if I refresh
but if I close the browser and open again it works fine
nitrogenycs 06:03 do you use something like navigator.plugins.refresh ?
tony_ 07:03 hi nitrogenycs.. I dont use..that.and I dont know what it is..?is it some js code..?
Hi nitro.. I will try with the navigator.plugins.refresh.. and let you knwo
nitrogenycs 07:03 tony_ yes it is
tony_ 07:03 thanks for the help
nitrogenycs 07:03 tony_: I use code similar to this
the code is started when the user clicks the download link
tony_ 07:03 oh thanks alot..
thats cool anyway..:)
nitrogenycs 07:03 so you make the user click the link, then start that code in the background. The user will install the plugin and the code will notice it and can display a new page
but I haven't tried anything of this on a Mac, windows only
tony_ 07:03 ok nitro...I hope the same will work in mac also .. :)
sasom 07:03 hi
taxilian 08:03 g'morning all
sasom: welcome
saiaman 08:03 good mornin
does anyone got issues while checking if plugin is installed on IE9 ?
nitrogenycs 09:03 no, I'm waiting for the final release before testing it
I hope I can keep my ie8 installed in parallel
saiaman 09:03 yep ok
taxilian 09:03 saiaman: yeah, I haven't tested 9 yet either
I would guess that if you use the ActiveXObject method that the sample jsinstaller.js file does it should work the same, though
how are you detecting it?
sasom 09:03 taxilian: hi! :) I'm waiting for someone for hours :)
I wasn't aware that you're on the other continent...
taxilian 09:03 I'm not… you are ;-)
sasom 09:03 hehe :)
taxilian 09:03 I did put a link to the channel information page in the topic where it clearly states the hours I'm most often here =]
sasom 09:03 anyway, I wanted to say thanks for this great tool first. I'm not using it for a long time, but my project progressed really fast thanks to firebreath.
But I somehow stuck at the last 5%...
taxilian 09:03 what are you trying to do?
saiaman 09:03 yeah we are testing it but i can't build an activex object
we are detecting it with the jsinstaller.js
taxilian 09:03 saiaman: you know that FireBreath produces an activex object automatically? if it even works on IE it's an activex object
I'd have to play with it, then
they may changed some of the rules
saiaman 09:03 ok but the activex object name is ?
but here it does'nt work event in IE8
taxilian 09:03 saiaman: it's the progid in your PluginConfig.cmake
sasom 09:03 I have some problems returning strings back into javascript... They are quite large, but I guess not too large - somewhere from 1-5 kb...
taxilian 09:03 if you copy jsinstaller into a "templates" directory under your project it will configure it for you with all those values
sasom 09:03 JS string is always empty, although debugger shows valid variant string in GetProperty method (last one, before it goes down to firefox)...
taxilian 09:03 sasom: there might be size limits on some browsers for javascript strings; I've never really tried it
you could step through and see if it gets copied into the NPVariant properly
are they really strings, or are you trying to send binary data?
sasom 09:03 huh... but 5kb? It's binary data encoded in base64
it's in npvariant. looks good
taxilian 09:03 sasom:is the size set correctly? UTF8Length or whatever?
stoiczek: welcome
saiaman 09:03 Taxilian: the progid was good, but we got an error while creating the activexobject
sasom 09:03 I tried to shorten string - it came into the browser... but the limit seems to be very low - around 200 characters... UTF8Length? not sure about it. Will check when I get home (I don't have the code here, right now)
saiaman 09:03 strange ....
taxilian 09:03 saiaman: what was the error?
sasom: it's part of the NPString struct
saiaman 09:03 (in french ) Un composant ActiveX ne peut pas créer un objet.
(translation?) An activex component cannot create an object
taxilian 09:03 saiaman: interesting. what version of FireBreath are you suing?
that's fairly close, yes
saiaman 09:03 RC2 , not the last one
sasom 09:03 thanks. I will check that.
taxilian 09:03 saiaman: that should be new enough
though I'd update
saiaman 09:03 Taxilian: while checking under IE8 the complementary modules, i don't see my plugin after install
taxilian 09:03 sasom: I
bleh. I'm pretty sure I've used strings longer than 200 characters before
saiaman: I'm not sure :-/ it works for me
saiaman 09:03 the 1.4 is finally released ?
taxilian 09:03 does it work if you put the object tag into the dom?
sasom 09:03 yeah, that seems weird for me to... I don't believe that it has such low limit...
saiaman 09:03 ok i'll try this one .... wish it'll rule
taxilian 09:03 sasom: you're sure it's an actual string?
no NULL characters or anything?
valid UTF8?
sasom 09:03 no. I use std::string to return data... It shows a looong sequence of characters and numbers (base64) in debuger... Size seems fine to...
utf8 should be fine I guess... But I will double check that
taxilian 09:03 if it's all base64 it should be valid UTF8
sasom 09:03 that's what I thought too
taxilian 09:03 I don't know :-/ I'm pretty positive that I've used strings larger than that
sasom 09:03 ok, I'll try to find the problem... Just wanted to make sure that there are no limits (or functions for setting up the limit)
taxilian 09:03 not that I'm aware of
sasom 09:03 one thing I do in my plugin is that I call some .NET functionality through c++ interop. It's ugly I know, but I have no other way. I had some problems transfering strings over to firebreath at the beginning, but no i just pass a pre-allocated char* buffer which I fill in my .net. Mixed-heaps didn't work together well. I suspect that it could be problem there as well. although debuger doesn't complain.
taxilian 09:03 one thing to consider is that .NET uses wchar_t by default instead of char*; you may have already accounted for that, but it's worth thinking about
if you do have wide chars, you can put them in a std::wstring and then use FB::wstring_to_utf8 to convert them
sasom 09:03 yes I know, I convert everything before passing it to my buffer... I will try wstring approach to see if it helps... Thanks for utf8 conversion hint ;)
nitrogenycs 09:03 you could also try to create a test string like 'aaaaaaaaaaaaa' manually and see if you can pass this through the browser
if it works, you know it's not a browser problem
sasom 09:03 well, I tried that and it worked. But the most interesting part here is that when I manually changed size of std::string (in debugger - for example I changed 0x00001234 to 0x00000034) - that first part of the string showed well.
taxilian 09:03 FireBreath expects to be given valid strings
which means null terminated
if you try to pass back things that aren't it may behave unexpectedly
sasom 09:03 Well... Maybe that COULD be the problem. :))) I might forget to terminate it. I'll check that when I get back home. I'm ashamed if that's the problem :|
taxilian 09:03 let us know what you find out
sasom 09:03 sure
thanks for now, I'll get back later (or tomorrow). bye!
saiaman 09:03 taxilian : last 1.4 does'nt build for me
NpapiCore doesn't build
result of build
taxilian 09:03 saiaman: what platform?
saiaman 09:03 Windows XP , Visual C++ 2010 Express
taxilian 09:03 hmm. let me make sure it still builds for me
I'm pretty sure I tested it on windows, though
saiaman 09:03 ok thanks
in MinSizeRel
trying in debug
same problem
can't initiate pluginNae because of case
nitrogenycs 09:03 pluginName is a string and you try to initialise it in a switch/case/defualt statement?
saiaman 09:03 that's the bug
in NpapiCore
patched :
without any string instanciation
it builds
taxilian 09:03 not unless you want it to crash, that's not the patch
saiaman 09:03 sure it's only a way to build
taxilian 09:03 not sure why it would matter to initialize it inside a case statement
I guess maybe it wants a block inside the case in order to do that
saiaman 09:03 don't really know why
nitrogenycs 09:03 I've been bitten by this a lot, too
you can do two things
either put it in {} which creates new local block as you say
so you can init new vars there
or you move it out of the case statement
i.e. put static std::string pluginName; at the top
taxilian 09:03 and of course it builds fine in GCC
saiaman 09:03 yeah could be a way
nitrogenycs 09:03 and inside the case do only pluginName ="abc";
taxilian 09:03 no, it needs to be initialized to the correct value
but it doesn't matter where
nitrogenycs 09:03 I am not sure if GCC is right there
taxilian 09:03 blast. This is weird; it built on the build server as well
nitrogenycs 10:03
saiaman 10:03 Info : 1.4 Final Msi register's well the IE ActiveX plugin
now ie finds it
taxilian 10:03 why is there always something like this that nobody finds until right after the release?
nitrogenycs 10:03 Murphy's Law
saiaman 10:03 true
... Sorry Taxilian :(
nitrogenycs 10:03 I am curious why it built on the build server though
taxilian 10:03 me too
nitrogenycs 10:03 maybe it didn't :)
taxilian 10:03 maybe there is a configuration problem and it just looked like it built
hmm. yep, sure enough
it didin't build, and I missed it because there was another minor issue that I blamed it on and thought I'd fixed
nitrogenycs 10:03 why does GCC build it? It should fail imo
taxilian 10:03 I don't know
it definitely builds on linux, though
nitrogenycs 10:03 there seems to be the -Wjump-misses-init and -Wc++-compat options in gcc which emit warnings when you jump over initializations
taxilian 10:03 huh
saiaman 10:03 any ideas ? :(
FB_GitHubBot 10:03 FireBreath: firebreath-1.4 Richard Bateman * 5864bf2 (1 files in 1 dirs): Fixed build error due to variable initialization inside a case statement -
taxilian 10:03 well, it's fixed now
but I'll have to release 1.4.1 already :-/
saiaman 10:03 :(
tony___ 10:03 to use core graphics in the mac plugin..? can i get the pointer to NSView,..?
taxilian 10:03 tony__: make sure you enable coregraphics in PluginConfig.cmake
probably want to disable everything else
and then you can get the info you need from the PluginWindowMacCG object — I recommend you use the 1.5 branch, incidently, which is in "master"
tony___ 10:03 ok..
taxilian 10:03 the mac PluginWindow classes have been refactored in 1.5
on 1.4 you'll need to use either PluginWindowMacCocoaCG or *CarbonCG
(I may have the names slightly wrong)
the classes can be found in src/PluginAuto/Mac
tony___ 10:03 ok
how can I access PluginWindowMacCocoaCG from my API class?
taxilian 10:03 you should read this:
tony___ 10:03 thanks'
taxilian 10:03 the same principles apply on mac
tony___ 10:03 ok fine I will read that..
One more Q..
How can I add a png image to the project..?I have added one through cmake file, but my plugin could not load that image for displaying..
taxilian 10:03 not a clue
stuartmorgan 10:03 tony___: the answer to the second half of your original question, by the way, is: no, you can't get a pointer to an NSView
taxilian 10:03 you'll have to do some digging
neilg_ 11:03 Heehee, I have several FB plugins all working on the mac that load our games! Unfortunately they create their own window rather than using the CALayer - but that's a bug on my side. :)
Seeing things come together after several months of hard work is very gratifying!
JohnD_ 11:03 Does FB provide a onload event built-in? I am not getting it to work
taxilian 11:03 yes
you have to specify the name of a global javascript function in the onload param
look at examples/FBTestPlugin/test.html for an example
JohnD_ 11:03 I'm building my object using the DOM, not sure if the param-value should be a string or the function itself:
var param = document.createElement("param"); = "onload"; param.value = callback;
in test.html you put two onloads on the object as well
taxilian 11:03 did I? ignore that
it was something I was playing with
but decided it was a security concern
JohnD_ 11:03 you have onload property on <object>, and an onload param
taxilian 11:03 JohnD_: don't build the object using the DOM
only use the param
JohnD_ 11:03 why?
SWFObject do it using DOM, as far as I can tell
taxilian 11:03 because it will instantiate the object as soon as you set the mimetype and it will function differently on different platforms
it's much safer to use a string
I mean, it's up to you, but you're likely to have issues
JohnD_ 11:03 so I should pass the _name_ of the callback functiom
taxilian 11:03 yes
in the new fbinstaller.js I added a function for injecting the plugin into the dom
I would recommend you use that
JohnD_ 11:03 I doubt it is flexible enough unless you support alternative content... I based mine on SWFObject which is neat in this way
maybe you do
taxilian 11:03 not so far
but you could easily add it
your call; use what you want. I'm just telling you that if you configure your object tag too early it'll cause problems
for example, if you set the mimetype before injecting it into the DOM the plugin won't function on IE
JohnD_ 11:03 I'm not sure the innerHTML version will let me do what I need on second thought. That requires having a parent div for example. The Flash approach is to have a <div> with alternative content which gets replaced by the object dynamically.
And I do set the mimetype before DOM insertion, it works on IE8 at least, I didn't try 7 or 6
taxilian 11:03 suit yourself
I'm just telling you it will not always work
I have had the best luck wtih putting it inside a div and sizing the div instead of the plugin
you should also know that some (most) browsers specifically treat flash a little differently than other plugins; I don't know the specifics, though
JohnD_ 11:03 I hope to still port SWFObject for generic plugins, their mailinglist reckoned it wasn't too hard but I didn't find time yet. They support all kinds of per-browser special cases which I don't want to re-write
taxilian 11:03 would be cool
JohnD_ 11:03 messing with outerHTML, nested <objects>, all kinds of weird things
taxilian 11:03 most of that isn't needed with FireBreath
the nested objects in particular
but I'm sure there are tricks we could learn from
JohnD_ 11:03 they also support non-JS embedding although personally that's of no use
but I digress, I just need to get my onload working. When exactly is this fired?
Hrishikesh 11:03
taxilian 11:03 Hrishikesh: ??
Hrishikesh 11:03 sorry wrong command
taxilian 11:03 JohnD_: Right before the onPluginLoad method in your plugin is called
Hrishikesh 11:03 i was trying to find out support for npapi plugins on chrome os
and shockingly chrome os doesnt support plugins
taxilian 11:03 true
I think they make a few exceptions, such as Flash
but you'd need special permission from Google
JohnD_ 11:03 Hrishikesh: it's no shock, this is Google all over... no apps so everything is on the web
taxilian 11:03 you might be able to use native client (NaCl) but I'm not sure
sasom 11:03 hey, I'm back :)
taxilian: you know what? You were RIGHT! I forgot to null-terminate the string. Thanks you million times for that hint! :)
taxilian 11:03 sasom: lol. you're welcome
sasom 11:03 it works like charm now
taxilian 11:03 hehe
good to know
I occasionally have a few good ideas
sasom 11:03 yeah... while I was leaving before I noticed that you've talked about some compile problems... is it safe to upgrade?
taxilian 11:03 yes
upgrade to 1.4.1
we're shortening our release cycles
sasom 11:03 well in such cases - I have such experience - when I stuck somewhere, just call somebody which is not too deep in the problem. Usually notices what you can't :)
haha. ok, cool. I'll upgrade
FB_GitHubBot 12:03 FireBreath: master Richard Bateman * 28c1c18 (1 files in 1 dirs): Fixed CALayer to resize with plugin ...
FireBreath: master Richard Bateman * 1547e3c (11 files in 1 dirs): Removed printfs. Tied the PluginWindowMac to the PluginEventMac. ...
FireBreath: master commits d8ac980...1547e3c -
taxilian 12:03 neilg_: There were a couple minor breaking changes in the fix I just pushed
but it may help your CALayer problem
neilg_ 12:03 Oh! Well that's cool. My problem was definitely in my own code - but it's good to know that an issue that I might have hit has been fixed. Thanks! :)
taxilian 12:03 there was a resize issue is all
you shouldn't need to create a new CALayer unless you want to; FireBreath makes its own inside the browser's CALayer that it gives us
JohnD_ 12:03 Well onload still isn't doing anything even using your innerHTML method - I checked and the DOM looks as I expect (in both techniques), the plugin loads but the event doesn't seem to fire
<OBJECT id="heartTest" width="800" height="600" type="application/x-hearttest"><PARAM name="onload" value="alert(123)" /></OBJECT>
taxilian 12:03 that won't work
onload is not evaluated
it has to be a function
to evaluate it would be a security risk
JohnD_ 12:03 ah
1 moment then :)
taxilian 12:03 and when it calls the function the first parameter will be the interface for the plugin (not the DOM object, but just the interface itself)
JohnD_ 12:03 I didn't know that part, so <PARAM name="onload" value="pluginLoaded" /> would call pluginLoaded(api)?
where api has all the properties I define on JSAPI in C++?
taxilian 12:03 yes
JohnD_ 12:03 that's pretty neat
taxilian 12:03 I thought so
JohnD_ 12:03 ok thanks, my test is running now so I'll get back to work
side-question... how can I reclaim my JohnD nick, it tells me it's in use
taxilian 12:03 you can't unless you registered it
JohnD_ 12:03 how do I register?
taxilian 12:03 do a search for "nickserv register nick irc" or something like that
JohnD_ 12:03 ok
taxilian 12:03 you should be able to find some info on it
dan2 15:03 hey guys anyone in here work on xul?
I need some help resizing a window?
resizeTo doesn't work, neither does sizeTo, resizeBy, width,height ...
FB_GitHubBot 19:03 FireBreath: master Eric Herrmann * cd56fc9 (1 files in 1 dirs): moved mutext to protect DataList and not the call() -
FB_GitHubBot 20:03 FireBreath: firebreath-1.4 Eric Herrmann * 16dd0ac (1 files in 1 dirs): moved mutext to protect DataList and not the call() -
mital 21:03 taxilian: hey
taxilian 21:03 mital: hey
mital 21:03 hey wassup with the patch ?? r u planning to look into that
taxilian 21:03 I was looking and noticed that you've fixed the thing I ask for
but I haven't had time to pull it in
tell you what, let me do that now
mital 21:03 yeah
taxilian 21:03 sorry, I'm just 3 weeks behind in a school class :-/
mital 21:03 btw the other issue i commented on .. i can help with windows native timers ...
taxilian 21:03 we may as well start the abstraction, even if only on windows for now
mital 21:03 hmm
lets merge this change first
and close the issue
taxilian 21:03 ahh, you rebased it into one commit
very nice
mital 21:03 yeah
also switched to master branch
taxilian 21:03 I saw that; that made it very easy to rebase it to the most current
I'm just cleaning up a few things
taxilian 21:03 sorry, having trouble making it load from the config file properly
mital 21:03 hmm i didn't got the problem ? whats not working
taxilian 21:03 when you run fbgen again it should have all the options you specified last time
disable_gui is always false
I can fix it, though, it's no big deal
just need to figure out what I'm missing
mital 21:03 ok let me check
hmm the problem may be that i have provided default argument as 'false' in the option parser
taxilian 21:03 no
it isn't loading it from the cfg file properly
it is saving it properly
ahh, nevermind
that could be it
mital 21:03 hm
taxilian 21:03 yeah, I got it I think
mital 21:03 kewl
so if I don't assign it to false.. then it does not show anything as default ... so user will not have any idea what to enter for disable-gui (true/false or yes/no)
taxilian 22:03 no, it still gets a default value
just elsewhere
mital 22:03 this is the case whre there is no .cfg file
taxilian 22:03 I fixed that too
no worries
mital 22:03 oh kewl
taxilian 22:03 gimme just another minute
FB_GitHubBot 22:03 FireBreath: master Mital Vora * a486d8e (3 files in 3 dirs): Adding --disable-gui option
FireBreath: master Richard Bateman * 5344f8e (2 files in 2 dirs): Minor tweaks to the fbgen disable_gui patch
FireBreath: master commits cd56fc9...5344f8e -
mital 22:03 awesome :)
taxilian 22:03 I promise that patches don't usually take that long to put in =]
it always requires a context switch for me to work on fbgen
because I didn't write much of it
so I needed to check wtih the people who did
it's a pretty crucial piece =]
mital 22:03 yeah... i can understand... btw we also need to change documentation related to that
taxilian 22:03 we also discussed if we wanted to take the time to make a more powerful templating engine to use, but decided that your fixes were clean enough to use for now
hmm. if you update anything make sure you mention that the disable gui is only in 1.5
mital 22:03 how do u maintain api references for different versions ?? or is it always latest ?
here this change is minor chage... though its better to copy the api reference searchable for different versions... we may have major changes in docs as well
FB_GitHubBot 22:03 FireBreath: master Richard Bateman * d17cc43 (1 files in 1 dirs): Minor wording change -
taxilian 22:03 yeah, it's always the latest
probably should find a better way
but for now it works
we don't often remove or majorly change old APIs, so it's not usually a problem
and when we create a new API we're careful to flag it as "since version 1.x"
mital 22:03 okei
taxilian 22:03 so if you want to do the timer abstraction, there is a class that will help you
it's src/PluginCore/Win/WinMessageWindow
it creates a "message" HWND that has no UI and is just used for passing messages and timers
so you could put the timer on that and not have to worry about how the plugin is drawing
not sure how we'll do it on linux; on mac I have an idea that should work
FB_GitHubBot 22:03 FireBreath: master Richard Bateman * 1e5ba46 (1 files in 1 dirs): Fixed problem potentially preventing creation of message window -