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

IRC Nick Time (GMT-7) Message
TomL_berlin 01:11 reading the logs is a nice sport and entertaining, too!
TomL_berlin 02:11 taxilian_away: timezones are nasty, i'd rather have your help now ;-)
so trackmouseevent needs to be called time and again to receive the leave event, however, with my current setup i get the wm_mouseleave event constantly on the plugin window.. gosh
TomL_berlin 06:11 I understand the GUID in the WiX file are valid GUIDs, generated by fbgen.py, are they?
the wix tutorial suggests using an asterix for product id, which will instruct wix to generate a unique id each time it runs, so maybe providing one from fbgen.py is not the best option (imagine someone releasing two packages from the same wix-xml.. you get the point)
oka801 07:11 Hello! Congratulations with 1.3.1 release!
I have a simple question, probably even not Firebreath related. I have a class to represent javascript object, I called it ItemAPI and it extends FB::JSAPIAuto. Then I have a typedef: ItemAPIPtr as boost::shared_ptr<ItemAPI>.
Then, I'm calling variant_list_of(itemAPIPtr) and get "undefined" object in the Javascript code. However, if I assing my itemAPIPtr to the variable of type FB::JSAPIPtr first and then pass jsAPIPtr, then it works fine (with all properties of ItemAPI accessible). I was surprised that cast to the superclass type (as I understand this assignment) makes difference.
Usually it is quite opposite - one may have problems when not keeping "real" object type and at some moment object is copied as an object of a more generic type...
oka801 08:11 Another question - there is no way to call NPN_PostURL[Notify] in 1.3.1, is that correct? Only NewStream is there. Does 1.4.x contain PostURL?
And one more - is there an easy way to make a javascript object with a map of properties (map of <string, string> pairs)?
Thank you! :)
neilg_ 08:11 I don't believe 1.4.x contains PostURL (yet)
That functionality can always be duplicated using libcurl
Just to offer you an option if that's something you need ASAP
TomL_berlin 08:11 btw, as i had to regsvr32 my dll, i don't see how that is done through the wix-script. maybe it just isn't.
i'll try to add this: http://blogs.microsoft.co.il/blogs/yanush/archive/2008/09/22/howto-use-regsvr32-exe-with-wix.aspx
kalev 08:11 TomL_berlin: WiX people suggest to avoid using regsvr32 for registering dlls and instead use heat.exe to generate proper wix setup authoring from the .dll file from that information.
It's actually very easy to get WiX to use regsvr32 but it's just frowned upon.
see official Microsoft statement against using self-registration (regsvr32): http://msdn.microsoft.com/en-us/library/bb204770#no_selfreg
TomL_berlin 09:11 well, i do get that, but i didn't see heat.exe generate anything for my dll
keep in mind that i'm just reading up on things
so how do i replicate what regsvr32 does for me with wix? (other than using regsvr)
kalev 09:11 not sure why heat wouldn't generate anything for you. Maybe your dll is missing some deps and heat fails to load it?
TomL_berlin 09:11 ah, wait, it's not the plugin dll, maybe it's different for that
kalev 09:11 tutorial for using heat.exe: http://www.tramontana.co.hu/wix/lesson6.php
TomL_berlin 09:11 it IS a lot different what heat generates for the plugin.dll
so, yeah, don't need regsvr32
kalev 09:11 great
TomL_berlin 09:11 btw, i did read the tutorial allready
but i had not grasped the the full concept with what regsvr32 does and so on, but i think i got the broad picture now
kalev 09:11 I need to go out now, good luck!
TomL_berlin 09:11 have a nice day
oka801 09:11 neilg_: Thank you! I think I'll try to add PostURL to NPAPI implementation myself, but do not know yet how to do that for ActiveX part.
neilg_ 09:11 oka801: I believe that's why PostURL doesn't exist yet (because of IE) - that's why I suggest using libcurl
That has its own challenges too though if you have to deal with proxies... :(
oka801 10:11 One more question: here (http://colonelpanic.net/2010/11/firebreath-tips-working-with-source-control/) one could read (on prep scripts): "...they should be run anytime you add new files to your project...". Does that mean that adding new source file requires recreating VS project files? It can't be true, probably, here are some other "new files" meant.
taxilian 10:11 TomL_berlin: when you go through the logs, you should know that FireBreath's WiX stuff does the heat stuff for you
you don't want to use regsvr32 for install
oka801: yes, that is exactly what it means. if you add source files, you should regenerate the vs project files
you don't need to restart visual studio to do this
the reason is that *you should never ever ever modify the .vsproj yourself*. this includes to add project files
oka801: You can assign any variable type to a variant, but only some types are recognized by the auto-conversion stuff. FB::JSAPIPtr is one of them; your subclass boost::shared_ptr is not. Thus, you need to stuff it in a FB::JSAPIPtr for it to work. I wish there were a way to make it detect "for anything that subclasses ...", but there is not
PostURL does not (yet) exist. Feel free to add it and submit a patch =]
oka801: to return a javascript object with a map of properties, return a FB::VariantMap: http://www.firebreath.org/display/documentation/classVariant http://www.firebreath.org/display/documentation/typedef+FB+VariantMap
oka801 10:11 taxilian: thank you very much, it is more clear now. I think for a while I'll try to work in Eclipse in the Ubuntu virtual box, I can't get used to Visual Studio so far. Otherwise Firebreath works well, thank you!
taxilian 10:11 lol. yeah, that's one of my problems too... except I know visual studio pretty well, but have a harder time when I'm using XCode and worse when I'm trying to debug stuff on linux
neilg_ 10:11 taxilian: In regards to the email about browserhwnd in IE... It definitely works. I use it! :)
taxilian 10:11 good to know
I've never needed it =]
although thinking about it... I'm not certain, but I might have been the one who wired it in on IE :-P
neilg_ 10:11 I definitely needed it, I'd have asked about this before if it didn't work ;)
taxilian 10:11 I guess it's time to finally write up a blog post on how to get drawing stuff in FireBreath :-P people have been asking about that an awful lot lately
taxilian 11:11 http://colonelpanic.net/2010/11/firebreath-tips-drawing-on-windows/
kalev 11:11 nice post!
neilg_ 12:11 Agreed, that's a great blog post
sabotaged|wk 12:11 how can i find out which boost version firebreath 1.3 is using?
kalev 13:11 sabotaged|wk: take a look at src/3rdParty/boost/boost/version.hpp
sabotaged|wk 13:11 oh ok thanks
so it seems 1.42? weird then that uuid is missing
kalev 13:11 um, I see 1.44 in that file
in any case, Firebreath doesn't bundle all of boost's libraries but only a subset
sabotaged|wk 13:11 oh
kalev 13:11 so what you can do is either build against external boost or bribe taxilian_away to include the libraries you need.
taxilian 13:11 I am totally bribable
But check to see if it is already in fb 1.4
taxilian 14:11 kalev, neilg_: if you have suggestions for other "FireBreath Tips" posts that I should do, feel free to make them; I'll add them to my list of "things to do when I get to it" =] (won't promise how soon I'll get there, but I'll try to eventually)
neilg_ 14:11 Sure, I'll have a think :)
It's hard because I'm now pretty familiar with it all!
taxilian 14:11 now you see why I end up writing so little documentation sometimes
to me, it's all very obvious :-P
I think we've done a pretty good job of doing things that make sense, though; it doesn't seem like the learning curve is too big
taxilian 16:11 sabotaged|wk: still having a problem with boost?
sabotaged|wk 16:11 nope i just copied the uuid library folder from the full boost distro into my working copy for now
but thanks
taxilian 16:11 ok; I have put it in the boost repo
sabotaged|wk 16:11 great
taxilian 16:11 but you'd need to do a hg pull http://boost.firebreath.googlecode.com/hg/ from src/3rdParty/boost to get it, since I haven't updated the link in 1.3.1
it's already in dev
sabotaged|wk 16:11 cool
taxilian 16:11 the boost archive is huge; I'm trying to keep the size of FireBreath down, so I only include libraries that people seem to use =] you're the first to mention uuid, though it definitely looks like a useful lib
if you find any others missing, let me know
sabotaged|wk 16:11 ok
taxilian 17:11 'morning
larrow 17:11 hi
I have see the " FireBreath Tips: Drawing on Windows "
taxilian 17:11 is it helpful?
larrow 17:11 yeah, but some questions
taxilian 17:11 fire away
larrow 17:11 i try to descript it
taxilian 17:11 what is your native language? (just curious)
larrow 17:11 chinese, english not good, sorry, haha
taxilian 17:11 no problem. your english is understandable. I was just wondering =] take your time
larrow 17:11 so I type slow, please use simple word, :D
I have look the code of the google's o3d plugin
taxilian 17:11 I speak Russian, so I know what it is to have a hard time with another language =]
larrow 17:11 haha
I found google's o3d use SetTimer to send a WM_TIMER message(in window, IE)
when o3d's windproc get WM_TIMER it call InvalidateWindow() to send a WM_PAINT
taxilian 17:11 that would be one way of doing it
larrow 17:11 and run d3d or opengl when get the WM_PAINT
yes, one way, maybe a simple way
and i see your article mentione to use thread
i try the o3d way use firebreath
ie8 got a problem, ie6, ie7 is ok
my problem is: (i think it is intreseting)
I make firebreath keep receiving WM_PAINT(and i make draw here)
while, in html, i put a <button onclick="test()">
test() { for(i=0;i<10000;i++) game.destroyObj(i); } // i think you can understand this case without explained
I see: my game object disappeared one by one(because I destroy it), may be not one by one, just step by step, can you understand?
taxilian 18:11 hmm. no, I don't understand. what does game.destroyObj(i) do? I assume game refers to the plugin object?
larrow 18:11 game.destroyObj(i) this delete an JSAPI object
taxilian 18:11 wait... it doesn't actually literally delete the JSAPI does it?
larrow 18:11 I really delete the gameobject(JSAPI) in cpp
taxilian 18:11 you should *never* delete a JSAPI object
you should never even access a JSAPI* directly
only with a JSAPIPtr object
that will probably cause a browser crash
larrow 18:11 no, sorry, I mislead you, try think about this:
taxilian 18:11 if you don't know the words, explain it in c++ =]
larrow 18:11 try think about this: test() { for(i=0;i<10000;i++) game.getObj(i).setPosition(0, 1, 0); }
firebreath keep receiving WM_PAINT, while I click button call test()
I see the result is my game object move to (0,1,0) one by one
but it is in a loop: for(i=0;i<10000;i++)
taxilian 18:11 ok
larrow 18:11 it should be all objects move to (0,1,0) together
taxilian 18:11 hmm; the OS may be restricting how often it can InvalidateWindow
larrow 18:11 Unfortunately, only ie8 is like these
taxilian 18:11 or the browser
what happens if you wait 'til all of the setPosition calls are done and invalidate after?
larrow 18:11 how to: wait the setPosition calls are done? i think timer is in same thread
I mean, only ie8, gameobject will move one by one
taxilian 18:11 hmm. have you attached a debugger to make sure all of the calls are getting made?
larrow 18:11 yes, I attach Ie8 use vs2010, I have 2 break points, one is in WM_PAINT, one is in GameObj::setPosition
I found....when just several(may 10, 20) GameObj::setPosition called, WM_PAINT will be called
do you understand my word, =]
I think if i use thread, may same problem(I not try)
taxilian 18:11 hmm. I don't know what would cause something like that. I don't know why WM_PAINT would ever get blocked
larrow 18:11 It look like: WM_TIMER will happend any time, even in a javascript loop, in IE8
WM_TIMER->InvalidateWindow->WM_PAINT
taxilian 18:11 well, remember that IE8 you have cross-process plugins going on
so that should happen even while you are running the loop
honestly, if I were you I'd look into the possibility of making one (or a few) calls that pass data structures for a batch of commands to the plugin rather than 10000 calls
that's a lot of calls to a plugin in one loop
larrow 18:11 1000 call is just a use case, I don't call like this, I just confirmation the problem
so you mean, "IE8 cross-process plugins", so, this appearance is normal?
taxilian 18:11 IE8 uses multiple processes; each plugin gets it's own process
so it is bound to work differently
larrow 18:11 each plugin gets it's own process?! oh....
taxilian 18:11 well
kinda
sometimes
not always exactly that, but it uses multiple processes
larrow 18:11 I try google's o3d plugin, Similar usecase
in IE8
taxilian 18:11 this shouldn't be anything FireBreath specific, since you're just doing windows-related stuff
larrow 19:11 yes, I kown, it not FB specific, but it is a basic sample to use opengl or d3d
I try google's o3d plugin, Similar usecase, o3d work fine
I just try find out what different between o3d and FB on this problem
taxilian 19:11 hmm. well, sounds like the problem is that the InvalidateWindow is not working reliably
or possibly isn't getting called correctly?
larrow 19:11 I don't kown, I doubt may be, the window handle(HWND, get from onWindowAttached)
SetTimer use the HWND(from onWindowAttached) may not right, I just guess
taxilian 19:11 that would still be a Windows bug, not a FireBreath bug :-/
larrow 19:11 btw, I have a very simple solution, do render code at javascript's setTimeout, not in cpp, no WM_TIMER and WM_PAINT
taxilian 19:11 I would strongly advise against that
if you put a render loop in a seperate thread you shouldn't have a problem
you just need a way to tell it to "draw now" from the main thread when WM_PAINT is fired
larrow 19:11 OK, I will try seperate thread to render
taxilian 19:11 you can use FB::SafeQueue to send it messages if you want; it's threadsafe
larrow 19:11 yes, thanks I will look at FB::SafeQueue
what is your native time now? morning? (just curious too :)
taxilian 19:11 19:20
taxilian 20:11 I just added a JSAPIProxy type that can hold a reference to another JSAPI object; it can be a shared_ptr or weak_ptr, which means you can change the type of API out from under the user even after giving it to Javascript
and you can have a JSAPI object that gets released when you want and leave the browser hanging with the (now) empty proxy object, which will simply throw an exception whenever you try to use it
larrow 21:11 coming version 1.4?
taxilian 21:11 yep
JSAPISecure and JSAPISecureProxy are pretty cool as well
allow you to have access control on what domains can access which properties and methods
larrow 21:11 cool, waiting version 1.4!
taxilian 21:11 you're welcome to start using it now, if you want; it's pretty stable. just let me know if you have problems and I'll fix them
that's how most testing gets done
someone has to use it =]
larrow 21:11 Yeah, I will try later, I must leave irc now, thanks and good luck
Unique 23:11 Hi, anybody know which package the file cygidn-11.dll is included?
cmake fails with cygidn-11.dll not found