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

IRC Nick Time (GMT-7) Message
taxilian 00:03 'night all
Stan__ 03:03 Hi, does anyone have time to answer a quick question about FB?
I'm trying to build with MINGW, I've found out that it's impossible because of ActiveX. Can I somehow disable ActiveX? I don't really need it anyway.
someone-noone 03:03 why don't you build with Visual Studio?
Stan__ 03:03 Because I've already been using MINGW for the rest of my project
I suppose it's not impossible for me to use Visual Studio, but it just complicated my development environment a bit.
complicates*
_neilg_ 07:03 Morning all!
zmichl 07:03 Hi guys. I have a problem with FB and FF 4.0.
_neilg_ 07:03 What's the problem?
zmichl 07:03 On some Windows the plugin works in FF 3.6 without any problem. But in FF 4.0 doesn't. I can see the plugin in "about:plugins", however couln't get it with document.getElementById().
This problem occurs only in some combination of FF 4.0 and Windows and I don't know how to debug it :(
any suggestion? :)
_neilg_ 08:03 How are you putting it on the page?
zmichl 08:03 just opening the FBControl.htm
and clicnking on "alert plugin valid"
in FF 3.6 I get "true", in FF 4.0 "undefined"
gomoov 08:03 Hello
FireBreathBot 08:03 gomoov: 04:52Z <taxilian> tell gomoov the BrowserHostPtr object can be cast to a FB::Npapi::NpapiBrowserHostPtr object (using FB::ptr_cast<FB::Npapi::NpapiBrowserHost>(host)), but there are very, very few good reasons why you should do that as the BrowserHost object provides an abstraction for pretty much everything
_neilg_ 08:03 zmichl: Weird. I don't get that at all on my plugin in FF 4.0. I wonder what code is in FBControl.htm? Hmm...
gomoov 08:03 hello taxilian
taxilian 08:03 zmichl: I dont know how to debug it either... Youd have to find a machine where it doesnt work and try to catch the startup in a debugger, probably
Hello gomoov
gomoov 08:03 thank you for your reply
I just have one more question
taxilian 08:03 Ok
gomoov 08:03 I am now drawing on the browser, but the image gets away when the window is overlayed.
Would NpapiBrowserHost->InvalidateRect
make it stay there? (by just calling once)
taxilian 08:03 I dont understand what is happening
!find InvalidateWindow
FireBreathBot 08:03 Found 4 possible matches. Displaying 4
/^void PluginWindowWin::InvalidateWindow() const$/ (f) found in src/PluginAuto/Win/PluginWindowWin.cpp: http://goo.gl/NdqTe
zmichl 08:03 _neilg_: Do you have Windows binary of your plugin?
FireBreathBot 08:03 /^void FB::PluginWindowlessWin::InvalidateWindow() const$/ (f) found in src/PluginAuto/Win/PluginWindowlessWin.cpp: http://goo.gl/pMsj1
/^void PluginWindowX11::InvalidateWindow() const$/ (f) found in src/PluginAuto/X11/PluginWindowX11.cpp: http://goo.gl/dkUR9
/^ typedef boost::function<void (uint32_t, uint32_t, uint32_t, uint32_t)> InvalidateWindowFunc;$/ (t) found in src/PluginAuto/Win/PluginWindowlessWin.h: http://goo.gl/UqJZ9
taxilian 08:03 InvalidateWindow on PluginWindow will call InvalidateRect for you
gomoov 08:03 But calling InvalidateRect function will do the same thing right?
_neilg_ 08:03 zmichl: Yes, both Windows and Mac plugins now
taxilian 08:03 But most like you arent drawing in response to WM_PAINT
zmichl 08:03 _neilg_: Could you provide mi that library, please?
gomoov 08:03 I am not.
zmichl 08:03 me
taxilian 08:03 gomoov: In FB that is RefreshEvent
gomoov 08:03 taxilian, if you call InvalidateRect, you do not have to response to WM_PAINT. Am I right?
taxilian 08:03 No
gomoov 08:03 Oh...
I thought it changes the update region
taxilian 08:03 Invalidaterect causes a paint event
_neilg_ 08:03 zmichl: Unfortunately I can't, no - I can try and help you but I can't pass around the binaries right now. My own binaries could mess up our online service. :(
gomoov 08:03 okay, taxilian, so there is no function to tell browser to take care of drawing of a handle right?
taxilian 08:03 Right. Thats your job
gomoov 08:03 so, I need to manually take care of WM_PAINT
zmichl 08:03 _neilg_: ok
taxilian 08:03 Right
gomoov 08:03 But what is "update region" of InvalidateRect?
taxilian 08:03 It tells it to only invalidate part of the windoe
gomoov 08:03 okay I see
taxilian 08:03 The info is passed with the paint event, so you can choose to redraw only that
gomoov 08:03 How would a plug-in take care of WM_PAINT?
yup i got it
taxilian 08:03 Handle FB::RefreshEvent
gomoov 08:03 What is the function?
taxilian 08:03 Or WindowaEvent and watch for WM_PAINT
Go to colonelpanic.net and look for an article on drawing in windows
gomoov 08:03 I do not find FB::RefreshEvent
taxilian 08:03 !find RefreshEvent
FireBreathBot 08:03 Found 1 possible matches. Displaying 1
/^ class RefreshEvent : public PluginEvent$/ (c) found in src/PluginCore/PluginEvents/DrawingEvents.h: http://goo.gl/RItIL
gomoov 08:03 oh ! yes, I will look at this thank you!
taxilian 08:03 Yw
!wiki tricks
FireBreathBot 08:03 3 results found. Note: Results limited to 8
"Tips and Tricks": http://goo.gl/sOA8M
"Using FireBreath": http://goo.gl/IHwid
"FireBreath Home": http://goo.gl/zCdgZ
taxilian 08:03 Look at tips and tricks too
gomoov 08:03 taxilian, I just looked up DrawingEvents.h
but it is pretty much blank.
How would I use this class?
taxilian 08:03 Yeah. It is an event
Like AttachedEvent
In your plugin class
!findfile FBTestPlugin\.
FireBreathBot 08:03 Found 2 matching file(s) in the master branch. First 2 are:
examples/FBTestPlugin/FBTestPlugin.cpp http://goo.gl/tnIDd
examples/FBTestPlugin/FBTestPlugin.h http://goo.gl/D5vcV
taxilian 08:03 Look in .h to see how events are mapped to functions
Should be in your plugin class as well from fbgen
(I am on my ipad, so I dont have a real keyboard or web browser that is really convenient)
gomoov 09:03 Oh okay
So when ever the browser notifies the plug-in to redraw, the plug-in executes the function onDraw right?
taxilian 09:03 Refreshevent is empty because you really just need to know othstit happened
Draw is just the event handler
EVENTTYPE_CASE(FB::RefreshEvent, draw, FB::PluginWindow)
!wiki EVENTTYPE_CASE
FireBreathBot 09:03 3 results found. Note: Results limited to 8
"PluginCore base class": http://goo.gl/xF4Kc
"Handling downloads using FireBreath": http://goo.gl/QJyS7
"Version History": http://goo.gl/lgWpo
taxilian 09:03 Hmm. Those arent helpful
But you just need a new eventtype_case to tell it what function to call on your plugin
I just woke up and I need to go get ready for the day. Searching the logs may also helpe. Ill be back online in an hour or so
gomoov 09:03 Thank you!
taxilian 09:03 Good luck
gomoov 09:03 Again, thank you very much :) you are the light in a cave
zmichl 10:03 guys, VS 2008 Express is not supported anymore in the latest Git version?
zmichl 10:03 I get this error when opening the generated project: "Solution folders are not supported in this version of the application. Solution folder 'CMakePredefinedTargets' will be displayed as unavailable."
taxilian 10:03 zmichl: huh; does it not still work after the warning?
brb
zmichl 10:03 taxilian: The project cannot build after that warning
in the stable version 1.4.2 it is ok
taxilian 10:03 zmichl: well, crap
I can tell you how to fix it locally
we'll have to figure out how to detect whether it's 2008 or 2008 express, tehn
then
zmichl 11:03 taxilian: ok, what sould I change, please?
should
taxilian 11:03 !findfile CMakeLists.txt
FireBreathBot 11:03 Found 20 matching file(s) in the master branch. First 5 are:
CMakeLists.txt http://goo.gl/GbfDF
cmake/CMakeLists.txt http://goo.gl/qUH4h
examples/BasicMediaPlayer/CMakeLists.txt http://goo.gl/Chhdj
examples/FBTestPlugin/CMakeLists.txt http://goo.gl/DB5xj
fbgen/src/CMakeLists.txt http://goo.gl/JFU76
taxilian 11:03 zmichl: https://github.com/firebreath/FireBreath/blob/master/CMakeLists.txt#L18
comment out that line
it's the root CMakeLists.txt file in the firebreath repo
the USE_FOLDERS line
zmichl 11:03 great, thanks
taxilian 11:03 brb
zmichl 11:03 Hmm, so still get the same error:

Creating Type Library...
midl : command line warning MIDL1009 : unknown argument ignored ".\gen\FireBreathWin.idl"
Processing Debug\""
Debug""
c1 : fatal error C1083: Cannot open source file: 'Debug""': Invalid argument
midl : command line error MIDL1003 : error returned by the C preprocessor (2)
FireBreathBot 11:03 JIRA issue http://jira.firebreath.org/browse/FIREBREATH-3 issue commented by gmurphy "Sorry for the long delay, I've been swamped with work and gerbils, some kind of rodent anyway :-D..."
taxilian 11:03 zmichl: ... hmm. it should not be trying to do that
give me a few minutes
FireBreathBot 11:03 JIRA issue http://jira.firebreath.org/browse/FIREBREATH-3 issue commented by richard "Hmm. DoDeferredRelease *should* be already getting called when it's on the main thread; I'll look..."
JIRA issue http://jira.firebreath.org/browse/FIREBREATH-15 issue created by richard
Commit 86a8372 on master by Richard Bateman: "FIREBREATH-15 Fixed to support failed NPOjbect creation" http://goo.gl/MWQcl
zmichl 11:03 I need to go, have a nice weekend guys!
gomoov 11:03 Hello taxilian
just a quick question again,
taxilian 11:03 okay
gomoov 11:03 how do you get the file information ?
taxilian 11:03 what file information?
gomoov 11:03 that the browser downloaded
when the plug-in is invoked
taxilian 11:03 it gives you the data as it downloads it
gomoov 11:03 how does it give?
taxilian 11:03 go back and look at SimpleStreamHelper again; you don't get a filename, you get bytes
you get data
FireBreathBot 11:03 Commit 6bbb8e6 on master by Richard Bateman: "FIREBREATH-4 fixed bug caused by idl accidently being includ..." http://goo.gl/FB2xa
gomoov 11:03 okay, I will look at it!
taxilian 11:03 sorry, nobody has had time to write good docs for browserstreams yet
feel free to start them when you figure things out =]
gomoov 11:03 Yes sure :)
So, plug-in has to request it first, right?
taxilian 11:03 yes
gomoov 11:03 So, the browser doesn't automatically put in the data.
Which is weird :) i thought the browser would.
taxilian 12:03 which data?
the browser gives you what it downloads
you tell it what to download
it gives you everything it has
jshanab_wcw 12:03 Is there a way for me to cause in install of the .msi file? go directly to the run or not dialog instead of download,save and then run?
gomoov 12:03 taxilian, could you give me a brief example of SimpleStreamHelper?
NpapiBrowserHost class has _createStream function, is there any difference between using _creatStream function and SimpleStreamHelper class?
taxilian 12:03 gomoov: look in FBTestPluginAPI
there are examples there
look for SimpleStreamHelper
gomoov 12:03 okay thanks!
jshanab_wcw 12:03 Good afternoon taxillian
taxilian 12:03 hey jshanab
jshanab_wcw 12:03 I am getting ready to deploy our plugin. Trying to make the install process smooth. So I have this msi....(sounds like I am starting a joke)
taxilian 12:03 an msi walked into a bar?
jshanab_wcw 12:03 I ahve a div that is enabled on firefox, you click on the graphic that says you need the plugin and it downloads a file, which the user must then remember to double click on. Anyway is there a way to make this and the update by version process smother
a msi and cab file walk into an extension bar...
For firefox, do we need to wrapp the plugin in an extension to get all the versioning and auto install capability?
taxilian 12:03 if you want Firefox's, then yes
I personally wouldn't do that, I'd just use an MSI
but htat's up to you
yes, that does mean they have to double click on it
FIREBREATH-15
FireBreathBot 12:03 FIREBREATH-15: Summary: Crash when recreating plugin quickly
FIREBREATH-15: Assigned To: richard
FIREBREATH-15: Priority: Major, Status: Open, http://jira.firebreath.org/browse/FIREBREATH-15
taxilian 12:03 !find htmlLog
FireBreathBot 12:03 Found 1 possible matches. Displaying 1
/^void FB::BrowserHost::htmlLog(const std::string& str)$/ (f) found in src/ScriptingCore/BrowserHost.cpp: http://goo.gl/b94ag
Commit a733863 on master by Richard Bateman: "FIREBREATH-15 Fixed crash on IE, stupid reentrant callbacks" http://goo.gl/DW4j2
jshanab_wcw 12:03 am I missing a step? i have the msi but if I provide a link to it, it only downloads, Is there anyway to get it to run from the link to it? that would be enough
taxilian 12:03 no, there is not
not automatically, anyway
jshanab_wcw 12:03 Darn. I'd still like it to stop and ask, just stop and ask run/save instead of two completly seperate steps. I was pretty sure i had seen an msi that ran from a site before.
taxilian 13:03 Microsoft OneClick can do that, if it is installed
jshanab_wcw 13:03 So the versioning stuff in the Wix installer at least lets me update? I have not been able to get that working, I have to manually uninstall every time
taxilian 13:03 yes, it lets you update
jshanab_wcw 13:03 thanks
taxilian 13:03 grab the latest template from fbgen
it has some fixes that will hopefully take care of that for you
I had the same issue, but it should be fixed there
FireBreathBot 13:03 Commit 09dcb89 on firebreath-1.4 by Richard Bateman: "FIREBREATH-15 Fixed crash on IE, stupid reentrant callbacks" http://goo.gl/oe1uE
taxilian 13:03 be back later
gomoov 14:03 Hello, how do you get the URL that was requested in the original HTML? (where the plug-in is invoked) (e.g. <embed src="http://..."> -> this URL)
In the SimpleStreams example, it is just using hardcoded strings
taxilian 14:03 gomoov: first of all, don't use embed
secondly, it would be easiest to use a <param> tag
<object ...><param name="src" value="http://..." /></object>
but you could hypothetically get the DOM element and get the src attribute
which branch are you on? master or 1.4?
gomoov 14:03 1.4
why not use embed?
taxilian 14:03 it behaves differently on different browsers
particularly IE
if you use object, it always works the same
gomoov 14:03 oh okay
taxilian 14:03 in your plugincore class you can use m_params["paramName"] to get the value of a param
gomoov 14:03 oh I see thanks!
taxilian 14:03 to get it through the DOM element you would use host->getDOMElement()->getStringAttribute("src"), I think
!find getStringAttribute
FireBreathBot 14:03 Found 2 possible matches. Displaying 2
/^std::string FB::ActiveX::AXDOM::Element::getStringAttribute( const std::string& attr ) const$/ (f) found in src/ActiveXCore/AXDOM/Element.cpp: http://goo.gl/EvsxG
/^std::string FB::DOM::Element::getStringAttribute( const std::string& attr ) const$/ (f) found in src/ScriptingCore/DOM/Element.cpp: http://goo.gl/nqUff
taxilian 14:03 yeah, looks like it
gomoov 14:03 Taxilian,
I did host->getDOMElement()->getStringAttribute("src"), but it doesn't work on FireFox (but it works on IE)
taxilian 14:03 really? hmm. that's odd
particularly since on firefox m_params["src"] would work...
gomoov 14:03 FireFox complains "The plugin performed an illegal operation...etc"
taxilian 14:03 really? that's *really* strange
gomoov 14:03 maybe because it is using ActiveX?
I will be right back, talk to you soon!
dan21 14:03 taxilian: what's up
taxilian 14:03 hey
how're things?
sabotaged|wk 14:03 anyone have a feel for how much longer 32-bit plugins on mac will be around for?
is it a big mistake to go with a 32-bit only plugin?
taxilian 14:03 I think they'll probably be supported for awhile, at least
gomoov 15:03 Taxilian, am I doing something wrong? why the above is not working?
taxilian 15:03 different browsers behave differently; Firefox may not allow you to access the src attribute in that way
you could try getting the src attribute from the dom element, then fall back to m_params
m_params will have it if it's not on IE, and IE can get it from the DOM element
gomoov 15:03 Okay, so different approach among browsers eh?
taxilian 15:03 might have to for this one
gomoov 15:03 what would be the type of m_params["src"]?
taxilian 15:03 we try to avoid that wherever possible, but there are still a few things that we can't do much about
it's a FB::variant
you need to to .convert_cast<std::string>() to make it a string
gomoov 15:03 yup
it is working!
taxilian 15:03 huzzah!
=]
brb
jshanab_wcw 15:03 taxilian. All that discovery stuff, do you know what ended up working best for the plugin detection and install? Object fallback.
taxilian 15:03 lol
jshanab_wcw 15:03 ie runs it automatically by setting the mime type in my server, FF is a tad more manual
timw 18:03 hey everyone, are there examples for constructing a new JSObject that can then be passed via Invoke to javascript?
taxilian 18:03 timw: yes, there is an example in your fbgen-generated code
timw: you need to create a JSAPI object, not a JSObject
JSObjects come from javascript
see the Interacting with Javascript page on the wiki
!wiki Interacting
timw 18:03 ah, my projectAPI class is a JSAPI?
FireBreathBot 18:03 7 results found. Note: Results limited to 8
"Interacting with Javascript": http://goo.gl/kN03n
"Using FireBreath": http://goo.gl/IHwid
"Plugin Lifecycle": http://goo.gl/nVhKS
"FireBreath Users": http://goo.gl/erPde
"Mac Plugins": http://goo.gl/oDfo2
"Version History": http://goo.gl/lgWpo
"Web Browser Plugins in the Age of Web Applications.pdf": http://goo.gl/vS7zB
taxilian 18:03 yes
timw 18:03 got it
cool, thanks!
taxilian 18:03 yw
timw 18:03 cheers, and keep up the good work!
Mital 18:03 taxilian
taxilian 18:03 howdy
Mital 18:03 hey I am up for getting FB::timer in
Scriptingcore is the destination project right ?
taxilian 18:03 hmm… good question. probably PluginCore, actually
Mital 18:03 is there any similar utility class which i can refer to ?
taxilian 18:03 hmm.
!findfile WinPluginWindow
!findfile WinMessageWindow
FireBreathBot 18:03 Found 2 matching file(s) in the master branch. First 2 are:
src/PluginCore/Win/WinMessageWindow.cpp http://goo.gl/Y3fjn
src/PluginCore/Win/WinMessageWindow.h http://goo.gl/TFUPo
taxilian 18:03 that's the closest I can think of
it's not directly connected to anything else
Mital 18:03 hmm ok
taxilian 18:03 probably we'll want a FBTimer.h in PluginCore/ and a FBWinTimer.h in PluginCore/Win/
or perhaps an abstract base class FBTimer and a FBWinTimer specialization
somethign like that
this is kinda a new experiment
Mital 18:03 I think we can create: Timer.h/Timer.cpp and Win/TimerWin.h Win/TimerWin.cpp for specific implementation and provide FB::Timer::getTimer(); static method which instantiates platform specific object ... and return shared_ptr<FB::Timer>
taxilian 18:03 I can go with that
Mital 18:03 you were suggesting FB::Timer timer(boost::bind(&MyPluginClass::doSomethingOnTimer, this)); the other day... How do u handle platform specific implementation in this case ?
taxilian 18:03 you would probably have a implementation specific class that Timer would use
somewhere it'll have to do something like what you're talking about
Mital 18:03 ok
can you point to any function implementation where you have taken boost::bind as method argument..?
taxilian 18:03 hmm. let me look
there are several, but many use template arguments
!find invalidateWindow
FireBreathBot 18:03 Found 2 possible matches. Displaying 2
/^ void FB::ActiveX::CFBControl<pFbCLSID, pMT, ICurObjInterface, piid, plibid>::invalidateWindow( uint32_t left, uint32_t top, uint32_t right, uint32_t bottom )$/ (f) found in src/ActiveXCore/FBControl.h: http://goo.gl/VwuYw
/^void NpapiPluginWin::invalidateWindow( uint32_t left, uint32_t top, uint32_t right, uint32_t bottom )$/ (f) found in src/PluginAuto/Win/NpapiPluginWin.cpp: http://goo.gl/rqikb
taxilian 18:03 !find PluginWindowWin
FireBreathBot 18:03 Found 2 possible matches. Displaying 2
/^PluginWindowWin::PluginWindowWin(const WindowContextWin& ctx)$/ (f) found in src/PluginAuto/Win/PluginWindowWin.cpp: http://goo.gl/NdqTe
/^ class PluginWindowWin : public PluginWindow$/ (c) found in src/PluginAuto/Win/PluginWindowWin.h: http://goo.gl/7GfMo
taxilian 18:03 !find boost::function
FireBreathBot 18:03 Could not find any tags matching boost::function
taxilian 18:03 !find CallMethodFunctor
FireBreathBot 18:03 Found 1 possible matches. Displaying 1
/^ typedef boost::function<variant (const std::vector<variant>&)> CallMethodFunctor;$/ (t) found in src/ScriptingCore/APITypes.h: http://goo.gl/xJCGm
taxilian 18:03 there
boost::function<return_type (int param1, int param2)>
Mital 18:03 let me have a look
taxilian 18:03 another good example (maybe better):
!find: InvalidateWindowFunc
!find InvalidateWindowFunc
FireBreathBot 18:03 Found 1 possible matches. Displaying 1
/^ typedef boost::function<void (uint32_t, uint32_t, uint32_t, uint32_t)> InvalidateWindowFunc;$/ (t) found in src/PluginAuto/Win/PluginWindowlessWin.h: http://goo.gl/UqJZ9
ben__ 18:03 hi there
anyone around?
taxilian 18:03 nope
we all left
ben__ 18:03 right on
taxilian 18:03 but we'll pretend if you want
ben__ 18:03 so i see "Fix for IE9 issues is in the FireBreath-1.4 and master branches on github; soon, after some testing, we will release 1.4.3 to address these" on the homepage - i searched jira for ie9 but it came up empty
is there a list of ie9 issues? because i'm having some
taxilian 18:03 FIREBREATH-11
FireBreathBot 18:03 FIREBREATH-11: Summary: Using a DOCTYPE definition in the HTML page breaks IE 9
FIREBREATH-11: Assigned To: richard
FIREBREATH-11: Priority: Major, Status: Reopened, http://jira.firebreath.org/browse/FIREBREATH-11
ben__ 18:03 saw that one; are there any others?
taxilian 18:03 that's it
ben__ 18:03 hm
okay
that'll be a good fix too
taxilian 18:03 what are you seeing?
ben__ 18:03 total load failure at the moment
taxilian 18:03 check your security settings
ben__ 18:03 on a system that was working perfectly a few hours ago
taxilian 18:03 does it work on FF?
ben__ 18:03 ff, chrome .. and it was working on ie9 a few hours back
taxilian 18:03 what have you changed?
ben__ 18:03 then we had the doctype issue, fixed that, and now the plugin's (apparently) not loading at all
haven't tried a system restart yet, but i guess that's next
taxilian 18:03 worth a shot
ben__ 18:03 yeah
anyway, don't mean to come in here all negatively - this project has really, really saved me time
taxilian 18:03 no problem =]
glad it helps
please contribute back in whatever way you can
ben__ 18:03 very much so
when i have time, i will try
anyway, thanks for the confirmation - i'll keep at this and let you know if i find anything that might be useful to you
Mital 19:03 taxilian: the master is not building.. Error: midl : command line warning MIDL1009 : unknown argument ignored ".\gen\FireBreathWin.idl"
taxilian 19:03 update
to the latest
pretty sure I fixed that today
Mital 19:03 it says its already up to date
i just created a new branch out of firebreath/master. have u pushed it ?
taxilian 19:03 it should be in https://github.com/firebreath/FireBreath/commit/6bbb8e60b70a44c4a6b7c8a1fbe528b0178313f4
FireBreathBot 19:03 UnicodeEncodeError: 'ascii' codec can't encode character u'\xa0' in position 15: ordinal not in range(128) (file "/home/richard/phenny/bot.py", line 186, in call)
taxilian 19:03 wow, that was interesting
https://github.com/firebreath/FireBreath/commit/6bbb8e60b70a44c4a6b7c8a1fbe528b0178313f4
FireBreathBot 19:03 6bbb8e6 by Richard Bateman: FIREBREATH-4 fixed bug caused by idl accidently being includ http://goo.gl/FB2xa
taxilian 19:03 that was 7 hours ago
I'll try it on my windows box
it's a different one than I did the fix on
Mital 19:03 I am on latest master right now... and my other projects are building...
like PluginCore.. which I am changing right now is building fine
btw I am trying to use FB_FORWARD_PTR(Timer); it is saying Timer class undefined.. should I forward declare Timer class and then use it... its does not give compile errors for other classes used same way
taxilian 19:03 FB_FORWARD_PTR isn't giving you that error
something else must be
Mital 19:03 yeah.. got it ..
taxilian 19:03 you still getting the idl build error?
try deleting your build dir and running prep again if so
because I'm not seeing it
Mital 19:03 hmm ok let me check
btw I need to convert WinTimer * to Timer * ... should I use FB::ptr_cast() ??
taxilian 19:03 that cast will happen implicitly
you can always upcast implicitly
just can't downcast
Mital 19:03 I am giving it to a shared_ptr<T> and T=Timer so its giving error
compiled... i was using it wrong ;)
hmm I need to make constructor and destructor of Timer class public ? or atleast destructor
error C2243: 'type cast' : conversion from 'FB::WinTimer *' to 'FB::Timer *' exists, but is inaccessible
taxilian 19:03 Timer destructor must be both public and virtual
Mital 19:03 my bad...
i have not publically derived the class.. just did class WinTimer : Timer
it should be public mode of derivation
taxilian 19:03 that would do it too
Mital 19:03 rebuilding still gave the same problem.. now deleted the buildex folder and regenerated it ... building again
Mital 19:03 taxilian: its still giving the same error
taxilian 19:03 what version of visual studio are you using?
Mital 20:03 2005 Professional
taxilian 20:03 hmm. I haven't tried it on that recently; do you mind trying something for me?
Mital 20:03 yeah sure
tell me
taxilian 20:03 cmake/CommonPluginConfig.cmake, line 124
add before set_source_files_properties the line: message("IDL files found: ${IDL_FILES}")
then re-run prep and see if your message shows up, and what it found
Mital 20:03 IDL files found: C:/Users/mital/Documents/Projects/npapi/FireBreath/buildex/projects/BasicMediaPlayer/gen/FireBreathWin.idl
IDL files found: C:/Users/mital/Documents/Projects/npapi/FireBreath/buildex/projects/FBTestPlugin/gen/FireBreathWin.idl
taxilian 20:03 hmm. okay; add list(remove_item GENERATED ${IDL_FILES})
then print out the ${GENERATED} list and make sure the idl files are no longer in it
Mital 20:03 where ?
before set_source_files
taxilian 20:03 yeah
Mital 20:03 it says list does not recognize sub command remove_item
taxilian 20:03 what version of cmake are you using?
Mital 20:03 its 2.8.3
do i need to upgrade ?
taxilian 20:03 no
try making REMOVE_ITEM all caps
Mital 20:03 so it works.. but after executing I can still see FireBreathWin.idl
Mital 20:03 taxilian: my windows timer implementation is complete .. but I could not test it.. can u help me testing the same
I would push the same in my branch..
taxilian 20:03 hmm. we need to figure out why the .idl file is still there
it should not be
Mital 20:03 hmm
Mital 20:03 I have no context of that problem... what should i do
?
taxilian 20:03 hmm. in your projectDef.cmake file, just before add_windows_plugin, print out ${SOURCES}
Mital 20:03 what are u looking for inside the sources..?? should I paste all the lines ?
taxilian 20:03 is the .idl listed?
Mital 20:03 NO
taxilian 20:03 ...
then where is it coming from?
Mital 20:03 the file exist at gen/ folder.. and the REMOVE_ITEM code is still ther
taxilian 20:03 file should exist
but it shouldn't be trying to build it
pastebin me the full build log
Mital 20:03 yeah... so after the remove_item.. the project is building
taxilian 20:03 ahh
okay
leave it there, then
and I'll add something similar
don't know why setting it to header_file_only didn't work
Mital 20:03 hmm
my code is complete .. now i need to test the same with sample app.. btw removing idl should be ok right it should not affect my tests right >?
taxilian 21:03 right
the idl is used in a different way is all
so look at the ThreadRunner
Mital 21:03 hmm will look at that... let me complete the testing of Timer...
taxilian 21:03 what I meant is you could do something like ThreadRunner but using the timer
insetad of a thread
!findfile ThreadRunner
FireBreathBot 21:03 Found 2 matching file(s) in the master branch. First 2 are:
examples/FBTestPlugin/ThreadRunnerAPI.cpp http://goo.gl/j6d1W
examples/FBTestPlugin/ThreadRunnerAPI.h http://goo.gl/rbcy5
Mital 21:03 I was thinking of testing simply using a timer which should call my callback in javascript after say 10 seconds...
taxilian 21:03 that would work too
Mital 21:03 hmm interesting... so u just do thread.addMethod() right ? what is that supposed to do ?
taxilian 21:03 it just adds it to a queue
then calls it back later
Mital 21:03 yeah.. it pushes that to queue.. another thread tries to pop stuffs from queue and call the function ..
taxilian 21:03 right
Mital 21:03 so we can implement this using timer
I would not need to create a separate class for this functionality ...
taxilian 21:03 ideally FBTestPlugin should have a test for both types
Mital 21:03 you will have just plugin.setTimeout(function, timeout); and plugin.setInterval(function, timeout);
but why would anybody use our timer provided he has both setTimeout and setInterval in all the browsers ??
taxilian 21:03 hehe. because that requires going through the js bridge
Mital 21:03 do we have any other use case for Timer ??
taxilian 21:03 which is much slower
there are lots and lots and lots of use cases for it
this is just an easy way to test is all
Mital 21:03 hmm ok ... let me test the same
Mital 21:03 done :) the timer callback working fine :)
hey I am having a small query.. I now just need to delete the timer objects properly and add a proper test case insode test.html
I am storing timers in vector<shared_ptr<Timer> > ... when should I delete them... I am not passing Timer * anywhere in the callback..
Mital 22:03 taxilian: u ther?
taxilian: I have pushed the win32 timer functionality in a separate branch
named "timer"
taxilian 22:03 Mital: I am afk, but will be back soon
Sorry
Had to run an errand
taxilian 22:03 back
FireBreathBot 22:03 Commit c84d13b on master by Richard Bateman: "FIREBREATH-4 Removed idl entirely from inclusion list" http://goo.gl/pqSo6
taxilian 22:03 Mital: that should fix your idl issue
taxilian 23:03 be back in a bit
Mital 23:03 hey
no it didn't solved the problem
taxilian 23:03 Mital: say what? but I did exactly the same thing that you did that fixed it!
fixing something you can't reproduce is annoying =]
Mital 23:03 hmm I can understand.
setup VMs no... its better way to test stuffs.
taxilian 23:03 yeah; actually, I think I have a VM on this computer with 2005 on it
let me try it
can you see anything I did different from what you did that fixed it?
did I spell something wrong?
Mital 23:03 no I think you did exactly same thing.. but it didn't solved the problem
taxilian 23:03 did you say it built?
once the .idl wasn't there anymore?
Mital 23:03 btw I moved the function to WinTimer.cpp.. the header (and namespace) would still be Timer.h and Timer class..
taxilian 23:03 good
Mital 23:03 no it didn't built
taxilian 23:03 did my suggestion for supporting mac / linux make sense?
Mital 23:03 yeah it does...
taxilian 23:03 cool.
Mital 23:03 if time permits... I will try implementing Mac one .. with NSTimer..
what about linux one
taxilian 23:03 what I would do is start out with a "Generic" one
that will work on all three platforms, but is less precise and ideal
create the multithreaded timer which fires on seperate threads
and then use that to call the timer callback using ScheduleOnMainThread
which will cause it to happen on the main thread
Mital 23:03 do we really need to create separate thread ??
taxilian 23:03 having a timer that runs on a seperate thread is at least as important as one that runs on the main thread
and once we have that, we can make one that fires on the main thread that will be adequate on linux (or even Mac) until we can write a better one
but if you do 3-d drawing you have to do it on a secondary thread
you can't do it on the main thread
Mital 23:03 I think we can wait till we encounter any problem with running timer on the same thread... the only problem would be user's callback function which may take more time ... and its gonna be blocking the main thread for the same amount of time coz we are always running callbacks on main thread
taxilian 23:03 it's up to you; I don't know of another way to do it on linux
we need a timer that runs on a seperate thread, though; it's just a question of whether or not you have time / want to / are willing to write it
it is not a hypothetical need; people are doing their own right now to do it
Mital 23:03 hmm
taxilian 23:03 if you have another idea for the timer on linux I'm open to suggestions
Mital 23:03 so it depends on what you would be running as callback of Timer right... in our case it would always be related to javascript and browser rendering ?? am I correct ?
taxilian 23:03 not neccesarily; it could be used for any number of things
polling a serial port, for example
or performing periodic maintenance, scans, socket activity, etc
there are lots of things you can use a timer for
many of them you may not want to be running on the main thread
the most common is probably a directx or ogl render loop
if you try to run those on the main thread it does really strange things
Mital 23:03 hmm thats true...
we can create a new thread when we try to add first timer and try binding all the timers in that thread
taxilian 23:03 it really doesn't have to be part of the same "subproject", though; I'm find with putting in a main-thread only timer and doing the other later, I just don't know how to do it on linux
right; some sort of timer queue, perhaps
Mital 23:03 hmm
taxilian 23:03 the trickiest part is the logic for "what do I run next, wait for that, dispatch"
would be better if we could find something already written
Mital 23:03 in this case it may be possible that our timer callback on a separate thread may block on a very long time and it may block all other timers ... how can we make sure each timer gets fired properly
one thread per timer
taxilian 23:03 that would certainly be the easiest way; I'm not sure I like the idea of creating a lot of threads. of course, you don't have to create many timers usually
so that might be fine
anyone else have any thoughts? anyone else even around? =]
Mital 23:03 on linux we can use signals .
http://www.unix.com/aix/14165-how-implement-timer.html
taxilian 23:03 hmm. looks promising; I only worry that it might not work in the browser process
still, worth a shot
Mital 23:03 http://linux.die.net/man/2/setitimer
does plugin processes run with less previlages ??
taxilian 23:03 not usually; however, what happens if the browser is already using SIGVTALRM?
if we give it our own handler it could either a. stop working right or b. take it away from us unexpectedly
Mital 23:03 hmm we have to investigate... lets go to unix related channels and find out
taxilian 23:03 I am falling asleep in my chair; I better go to bed
I have a ton of homework to do tomorrow
Mital 23:03 ok
taxilian 23:03 I appreciate your work on this, though; it's good to see progress finally being made!
Mital 23:03 I will push the change up... I have some other work right now .. will try finding stuff related to this.
thanks for your help writing the Timer :)
taxilian 23:03 cool. I'll poke around and see if I can find anything that would help with the threaded version
heh. So far you've done all the work
thank you
I still can't reproduce your error
building
vs2005 pro works fine for me
Mital 23:03 2005 ?
:S
taxilian 23:03 could you pastebin me your full build log?
Mital 23:03 ok I need to rebuild as I have removed idls
gimme few mins
taxilian 23:03 thanks.
Mital 23:03 btw why don't we move the BasicMediaPlayer plugin as an optional test... ? it unnecessary adds dependency ..
taxilian 23:03 yeah; I'm considering it. on vs2008 the dependency is there, so it's only 2005 users who have the build error
so we havne't worried about it much
but I am considering it
Mital 23:03 http://pastebin.com/LC9WCVAM
my BasicMediaPlayer does not build .. ignore that