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

IRC Nick Time (GMT-7) Message
someone-noone 04:03 hello, is down. wtf?
nitrogenycs 04:03 I get a 502 as well
someone-noone 05:03 hope it will be up soon
taxilian 08:03 grr. someone-noone: it'll be up again in a minute
that was my bad
someone-noone 08:03 <3 u
taxilian 08:03 I had to restart it to fix an email notification problem and I forgot to restart it in the background after getting it working, so when my ssh session timed out...
hmm… except it still isn't working… crap.
give me a few =]
taxilian 08:03 well, it's up for the moment
but I still have to figure out this stupid email problem
I hate java sometimes
neilg_ 08:03 Morning all!
taxilian 08:03 morning neil
did you see there is an update on BasicMediaPlayer to do some basic drawing on Mac using all drawing models?
neilg_ 08:03 Good news - finally got the OpenGL 3D plugin working on the mac last night. Very exciting!
taxilian 08:03 cool
neilg_ 08:03 No, I didn't see that - but that's cool that one exists!
I think I'll still put together a simple OpenGL example for all platforms using FB - it still sounds useful. But that's great that there's already a resource available!
taxilian 08:03 oh, absolutely
this one doesn't have any animation
it just draws
just thought it might be a useful resource to you
neilg_ 08:03 Absolutely, thank you for mentioning it!
So today... getting input working. :)
taxilian 08:03 =]
neilg_ 08:03 Need to pass it from the plugin into the game! Does it handle keyboard input? I guess my concern is that the space bar might scroll the browser window?
taxilian 08:03 I know there is code in there to handle keyboard input
I have no idea if it works
neilg_ 08:03 Well, I'll be the first one to find out then :)
taxilian 08:03 well, I didn't say nobody knows… just that I don't ;-)
neilg_ 08:03 Fine, I'll be the first one in this conversation to find out then. ;)
taxilian 09:03 hehe
fair enough
someone-noone: okay, should be back up to stay again. sorry about that.
and thanks for letting me know it was down
someone-noone 09:03 thank you
neilg_ 09:03 someone-noone: That's an awesome nick. =)
someone-noone 09:03 thank you)
taxilian 09:03 it seems to change slightly each time he's here… makes it a challenge to figure out who he is
someone-noone 09:03 :D
i have another nickname: sameshit. But it seems freenode doesn't allow such nicknames)
and someone-noone is my old nickname
taxilian 09:03 probably for the best :-P
someone-noone 09:03 also v0id - another my old nickname :D
and just_another_user was only my fantasy
taxilian 09:03 heh
someone-noone 09:03 i have a question not related to firebreath, but to c\c++. In my project i'm using "inline" keyword for small functions and synonym calls. Is it good practice to use "inline"? Because i've heard that it may cause some problems on some platforms (not sure)
taxilian 09:03 it depends on what you're doing
someone-noone 09:03 for example for such functions
taxilian 09:03 someone-noone: you know that inline functions have to go in the .h file, right?
someone-noone 09:03 i didn't know this. but i'm using own-written framework that manage only with *.h files
taxilian 09:03 then inline probably doesn't matter
putting the function definition inside the class definition automatically inlines it
of course, inline is just a hint to the compiler; it may or may not honor it
someone-noone 09:03 i'm not using classes. i'm using namespaces instead
taxilian 09:03 and everything is in a .h file?
do you only have one cpp file?
someone-noone 09:03 yes
yes, it is main.cpp
taxilian 09:03 hmm. okay. I guess inline makes sense, then
someone-noone 09:03 I'm using namespaces because in c++, unfortunately, there is a lot of problems when you are making a static class
taxilian 09:03 I would say rather that there are few good reasons that you should create a static class
singleton is a better pattern, usually
someone-noone 09:03 yes, i'm using singleton
like in Java or C#
but if you try to make singleton with class in C++ you will find a lot of problems
taxilian 09:03 lol. I've done it many times, so far haven't had any issues...
someone-noone 09:03 for example if you want to put a callback
class A{ static void func() };
void func2( void (*some_func)(void) )
taxilian 09:03 okay, there is your first problem
singleton in C++ isn't static
someone-noone 09:03 if you try to call func2(A::func1) you will get error
taxilian 09:03 sounds like your problem is more that you aren't familiar enough wtih C++ to know the "correct" way to do this in C++
as opposed to java or c#
someone-noone 09:03 okay, i probably know about what are you thinking
you think that i must to declare non-static methods and use some static global_ptr to make a singleton
am i right?
taxilian 09:03 if I understand what you're saying correctly, then yes;
something like this:
someone-noone 09:03 exactly
taxilian 09:03 (btw, be very, very careful using singletons in a plugin; I realize this one isn't a plugin, but just FYI)
someone-noone 09:03 if i understand right i will not be able to run more than one plugin at one page using singleton, am i right?
taxilian 09:03 rather, all plugins on all pages will get the same singleton instance
nitrogenycs 09:03 :)
someone-noone 09:03 hm
taxilian 09:03 but more specifically, if your singleton uses any threads you will probably deadlock on shutdown
someone-noone 09:03 and this is really a poblem
nitrogenycs 09:03 I had the same problem recently with a test app and statics
since the dll is only loaded once, they are shared between plugins
taxilian 09:03 because static scope shuts down during DllMain, during which time you can't start or stop any threads, so if you try to join() your thread it will just hang
so multiple problems =]
someone-noone 09:03 then i will need to switch my project to using *ctx structures
i'm not using threads. as i said before i'd prefer event loop instead
taxilian 09:03 I usually store anything that needs to be "global" to the plugin in the Plugin class itself
someone-noone: but again, your event loop will have to be on a thread
nitrogenycs 09:03 having some kind of context object is almost always better than using singletons. Singleton is just a nice name for "evil global" :)
jshanab_wcw 09:03 What? that is NOT the singleton pattern. missed the point dude
someone-noone 09:03 yeah. Singleton was best pattern for me at the start of the project. Because i didn't think that i will need to port my app to browsers
Anyway some of my namespaces are using context objects
Only main modules are "static". So i hope it will not be hard to switch for new paradigm
Another reason i've switched to namespaces is that i need more abstraction than classes can provide me
taxilian 09:03 someone-noone: TBG, it really sounds like you're trying to write C++ like you would java or c#; this can be a very dangerous thing and a bad idea. I might be wrong, since I haven't seen your code, just a caution
someone-noone 09:03 what does "TBG" mean?
taxilian 09:03 it means I tried to type TBH (To Be Honest) and missed
someone-noone 09:03 i understand you. I also thought it's dangerous way
but, i'm not using anything "bad"
my code is more C-style than C++
i'm not using try…catch , static_casts and etc
taxilian 09:03 that's okay, as long as you know what you're doing
someone-noone 09:03 the only thing i'm using from c++ is namespace keyworkd… and new and delete operators which i'm planning to change one day
neilg_ 09:03 I was looking into Mac installers last night since I've not done that before. It made me wonder... is it possible to install a browser plugin so that all users on the machine can use it? Or would it have to be per-user? Has anybody tried this?
taxilian 09:03 neilg_: yes, you can
you install it in /Library/Internet Plugins
someone-noone 09:03 ~/Library/Internet Plugins/
taxilian 09:03 soneone-noone: that's per-user
neilg_: however, you need admin access to do that
someone-noone 09:03 */Library/Internet Plugins/
neilg_ 09:03 Ah, that would make sense then. I was wondering whether it would go in /Library or in /Users/Shared/Library
Sounds good to me!
taxilian 09:03 if you look at /Library/Internet Plugins you'll find things like Flash and googletalkbrowserplugn, etc
neilg_ 09:03 Thanks!
Yep, I was just looking. I really should just look before asking. It was idle curiosity while waiting for a build to finish (which locked up my mac... Xcode uses all my cores!)
taxilian 09:03 =]
someone-noone 09:03 also about danger: i've quite large app, which is distributing "live" video via p2p-principle. I've own binary protocol, a lot of data which is exchanging, http parser, json parser , etc, etc… The only library i use (if forget about video rendering) is libevent. So what i want to say - i have no memory leaks, i have no CPU eats, i have no crashes at all. All it because i'm not using anything "dangerous". At least i think so :)
And i'm using namespaces because classes is not so flexible as namespaces
I need more fields than "private, public"
for example "Errors, EventCodes" etc
taxilian 09:03 someone-noone: well, if you're not using anything realy c++ then you have "danger" because there are places where you have to do a lot of handling to make sure you clean your memory up, etc; C++ gives you the ability to use things like autoptrs, std::string, etc
beyond that, it's just a difference in coding style and design philosophy
I'm a pretty strong subscriber to the object oriented philosophy, and I think it shows in FireBreath design
FireBreeath would be very difficult to do without OO and shared_ptrs, though
someone-noone 09:03 i can't disagree with you. It's difference in philsophy
taxilian 09:03 and you know? you have just as much right to disagree with my philosophy and be wrong as anyone! ;-) (joking, of course)
someone-noone 09:03 i'm working with low-level network data. I want to control each byte i'm allocating and freeing
taxilian 09:03 !findfile ComVariantUtil.h
FireBreathBot 09:03 Found 1 matching file(s) in the master branch. First 1 are:
taxilian 09:03 !find isWindowless
FireBreathBot 09:03 Found 1 possible matches. Displaying 1
/^bool PluginCore::isWindowless()$/ (f) found in src/PluginCore/PluginCore.cpp:
taxilian 10:03 bbl
Ed___ 10:03 Morning..
@taxilian: Where do I download an up to date snapshot to test your fix for FIREBREATH-14?
FireBreathBot 10:03 FIREBREATH-14: Summary: Embedding a variant_map_of(...) into a FB::VariantList requires a cast to FB::VariantMap to compile
FIREBREATH-14: Assigned To: richard
FIREBREATH-14: Priority: Minor, Status: Resolved,
taxilian 10:03 Github
Fb downloads page
!wiki downloads
FireBreathBot 10:03 8 results found. Note: Results limited to 8
"Handling downloads using FireBreath":
"Building with Visual Studio Express":
"FireBreath 1.3.0 Released!":
"Building on Windows":
"Building on Mac OS X":
"FireBreath 1.3.0 RC2 released!":
someone-noone 10:03 !wiki
firebreathbot are only listening you?
Ed___ 10:03 @taxilian: Ok. so the "latest" zip is up to date..
@taxilian: The zip is labelled:
taxilian 10:03 someone-noone FireBreathBot listens to everyone, but you need to give it a search string
someone-noone 10:03 !wiki hello
FireBreathBot 10:03 1 results found. Note: Results limited to 8
"Creating a New Plugin Project":
someone-noone 10:03 but why he doesn't read private chat?
sabotaged|wk 10:03 ughh this trick of drawing to a transparent HWND and then blitting to a windowless window doesn't work on XP (the transparent part)
guess thats what i get for trying to use a hack
taxilian 10:03 someone-noone: some things he does, some he doesn't
he listens to !wiki on private chat
sabotaged|wk: hmm. that's strange
someone-noone 10:03 he didn't respond on !wiki hello
taxilian 10:03 really? he does for me. maybe private chat he only listens to admins
sabotaged|wk 10:03 it sucks because i can still draw with that method, just cant hide the window
taxilian 10:03 hmm. weird
stuartmorgan 11:03 taxilian: I booted to 10.5; I can't repro the bug.
taxilian: on the test page only one of the two ICA instances draw, which I think is the bug I found yesterday
But once I only have one it works fine
tony_ 11:03 I am facing problem in loading image resource in my mac plugin, any clue..?
stuartmorgan 11:03 tony_: were you the one who asked about imageNamed: last week?
(if so, did you read my reply?)
tony_ 11:03 yes I was the one.. sorry I did not read the answer
taxilian 11:03 tony_: you can look at the logs:
stuartmorgan 11:03 tony_: search for imageNamed:
taxilian 11:03 lol
tony_ 11:03 ok thanks :)
taxilian 11:03 stuartmorgan: hmm. okay, I'll try to do some more digging, then; it may be that the test page had something else wrong with it that made it not work on our 10.5
stuartmorgan 11:03 taxilian: also, FYI, I had to rebuild the example plugin on 10.5 for some reason (maybe it doesn't have a deployment target setting?) and I installed cmake using the FB instructions that time
Same thread error
taxilian 11:03 how did you get around the thread error?
that doesn't make any sense at all, though…
you're definitely on 10.5, the latest? how could it be executing that branch?
tony_ 11:03 Thanks stuartmorgan .. I will try accordingly..thanks taxillian
taxilian 11:03 good luck
stuartmorgan 11:03 taxilian: I was definitely on 10.5.8
taxilian 11:03 sorry, I meant firebreath 1.5
brain not really functioning today
tony_ 11:03 I have not tested my my mac plugin in 10.5 .. is there any problem...for 10.5 ...
stuartmorgan 11:03 I pulled from head via git, installed the cmake app, and ran examples all exactly as the web page says
taxilian 11:03 yeah, you'd have to be, since otherwise you wouldn't have the example
that's really baffling
could you try something for me?
stuartmorgan 11:03 I'm not on 10.5 any more, but I can try on 10.6 with the macport cmake (since it doesn't seem to matter)
taxilian 11:03 yeah, if that had the same issue
try changing CMakeLists.txt (from the root) line 45 from if (UNIX AND NOT APPLE) to if (NOT APPLE AND UNIX)
see if it changes anything
stuartmorgan 11:03 tony_: that's a pretty vague question. It's certainly possible to make a plugin that won't work on 10.5, but only you know what your plugin does
taxilian 11:03 tony_: in general it seems to work okay, but you may need to build it on 10.5 to make it work on 10.5; I'm just looking into whether that just means you need to build with the 10.5 sdk or if you actually need to build on 10.5
stuartmorgan 11:03 The example plugin seemed to be that way; that seems like a FB bug though
(that way == have to build on 10.5)
tony_ 11:03 :) It works in 10.6 , I have used 10.5 sdk for it.. I thought you people are discussing about some known issues in 10.5..may be you were talking sothing else.. leave it
taxilian 11:03 there is a possible issue with ICA on 10.5, but we're not sure if it's a real issue or not
it may just be a problem with my code
tony_ 11:03 ok
taxilian 11:03 sorry for the confusion =]
tony_ 11:03 no prob..
stuartmorgan 11:03 taxilian: still gives the same error
Oh, maybe I'm an idiot
taxilian 11:03 ?
stuartmorgan 11:03 That may not be the error message
In the block at the end it says "-- Could NOT find Threads (missing: Threads_FOUND)"
Not long before "-- Configuring incomplete, errors occurred!
CMake failed. Please check error messages"
I just assumed from the scary bold and the proximity that it was the error
taxilian 11:03 … that's a weird message, though
no matter how you look at it
could you pastebin me the full output?
stuartmorgan 11:03 But now I see that at the beginning it says
CMake Error at cmake/common.cmake:170 (set):
set given invalid arguments for CACHE mode.
Which sounds more like an error ;)
taxilian 11:03 ahh, yes; that would be
hmm. I still don't get it on my machine, though
because I have boost already
stuartmorgan 11:03
FireBreathBot 11:03 Commit b0934ed on master by Richard Bateman: "Fixed cmake error when boost not found"
taxilian 11:03 could you try updating and see if that helps?
sorry about that!
tony_ 11:03 I have some basic doubts about mac plugin.. is there only 1 instance for the plugin, for the entire life time of a browser? so what happens when the broser window is closed and same page is taken again..? any doc or chat log..
clsoing the browser from min menu kills the plugin
stuartmorgan 11:03 tony_: there's one instance every time you instantiate a plugin
It's a fundamental behavior of NPAPI
tony_ 11:03 ok
stuartmorgan 11:03 Otherwise Flash wouldn't work
tony_ 11:03 so , if i use global variables then I am in trouble right...?
stuartmorgan 11:03 Yes. That's not specific to the Mac though
tony_ 11:03 if I have not manage them properly
yes thanks for the info
so in firebreath where I get a hint when new instance of plugin is creating ..
taxilian 11:03 an instance of your Plugin object will be created for each instance of the plugin
so the contructor is an excelent hint
and the loaded method is a good place to figure that it's ready to use
StaticInitialize and StaticDeinitialize can be used to have things run once before any instance is created and once after the last is destroyed
tony_ 11:03 may I know which is the best class contructor to start with..?
taxilian 12:03 though there is no guarantee that the module will be unloaded before StaticDeinitialize is called again
did you use fbgen to create a project?
tony_ 12:03 wow I like the StaticInitialize StaticDeinitialize pair
yes I use fbgen
taxilian 12:03 then one of the classes created (the one with the same name as your plugin) extends PluginCore
that is your plugin object
and its lifecycle is linked to a single <object> tag on a single page
tony_ 12:03 oh i see
what about this class class AppshareViewAPI : public FB::JSAPIAuto
taxilian 12:03 that's your JSAPI class
!wiki JSAPI
FireBreathBot 12:03 8 results found. Note: Results limited to 8
"JSAPI Properties":
"JSAPI Methods":
"class FB JSAPI ~JSAPI":
"JSAPI Attributes":
"file JSAPI_IDispatchEx.h":
"class FB JSAPI":
"Supported JSAPI types":
taxilian 12:03 !wiki Javascript
FireBreathBot 12:03 8 results found. Note: Results limited to 8
"Interacting with Javascript":
"file COMJavascriptObject.h":
"file NPJavascriptObject.h":
"file NPJavascriptObject.cpp":
"JSAPI Attributes":
"JSAPI Properties":
"JSAPI Methods":
taxilian 12:03 the interacting with javascript page is probably the best place to start to understand that class
tony_ 12:03 ok thanks bot!!!
PluginCore subclass, instance will be created and destroyed for one object tag right ?
so when I navigate to another page the PluginCore object will be destroyed I correct..?
taxilian 12:03 right
that doesn't mean it will neccesarily be destroyed before the next instance is created
and there could be multiple plugins on a page, or multiple pages open, resulting in multiple simultaneous instances of PluginCore
tony_ 12:03 ok thanks thats a lot of info, I would have known it before , I need some rework on my plugins today ..
PluginWindowMacCocoa is also per object tag ..?
taxilian 12:03 yes
tony_ 12:03 so I need to set timer for each instance ..
I mean schedule timer
taxilian 12:03 potentially
tony_ 12:03 I cant wait any more ..I want to re organize my code...firebreath rocks again !
taxilian 12:03 hehe
tony_ 12:03 thanks guys :)
taxilian 12:03 good luck
tony_ 12:03 one more question, If I close/navigate away , the page that contain the object tag, will my PluginCore destructor get called..?
taxilian 12:03 yes
stuartmorgan: well, we've got the example plugin wokring on 10.5 now as well; still can't get our plugin. I'll keep you posted
thanks for looking at it
Guest85562 12:03 Hello Everyone, I have a question I hope one of you might be able to answer: In my plugin, I'd like to make a synchronous call to a javascript function "foo" from a thread. Without FireBreath, I'd do something like: call NPN_PluginThreadAsyncCall(…bar…) and wait on a condition variable. Then bar would eventually run in the main thread, calling NPN_Invoke(…foo…) for the plugin instance, executing foo in javascript lan
Is there a better way of doing this in FireBreath? Thanks!
taxilian 12:03 yeah
instead of calling InvokeAsync, just call Invoke
Guest85562 12:03 Ah, interesting
taxilian 12:03 FireBreath will do the cross thread call and condition wait for you
see also ScheduleOnMainThread and CallOnMainThread
!wiki ScheduleOnMainThread
FireBreathBot 12:03 4 results found. Note: Results limited to 8
"class FB BrowserHost ScheduleOnMainThread":
"Frequently Asked Questions":
"Version History":
taxilian 12:03 !wiki CallOnMainThread
FireBreathBot 12:03 4 results found. Note: Results limited to 8
"class FB BrowserHost CallOnMainThread":
"Frequently Asked Questions":
"Version History":
Guest85562 12:03 Very cool, let me read through those links and see if it makes sense. Thanks!
taxilian 12:03 usually in FireBreath if it isn't easy you're doing it wrong =]
neilg_ 12:03 So, there is support for keyboard events on the mac
However... all events are FBKEY_UNKNOWN
(with the right code afterwards)
taxilian 13:03 lol
well, feel free to fill that out
Guest85562 13:03 So let's see, I can keep around a reference "obj" to my root JSAPI object after calling createJSAPI(), then from the thread, call obj->invoke(...)?
(sorry, i'm missing something here...)
taxilian 13:03 yeah, you are
you wanted to call a function back to javascript, right?
Guest85562 13:03 yep
taxilian 13:03 why would you call a function on your local JSAPI interface, then?
that's the interface javascript uses to call you
!wiki javascript
FireBreathBot 13:03 8 results found. Note: Results limited to 8
"Interacting with Javascript":
"file COMJavascriptObject.h":
"file NPJavascriptObject.h":
"file NPJavascriptObject.cpp":
"JSAPI Attributes":
"JSAPI Properties":
"JSAPI Methods":
taxilian 13:03 that first one would also probably be worth reading
so you understand how javascript calls us
Guest85562 13:03 ok, so JSAPI is for javascript --> plugin
taxilian 13:03 right
JSObject is something that came from javascript
it also extends JSAPI, so it's the same interface, but it's a special case
Guest85562 13:03 ok
so what i'm missing (i think) is how to go plugin --> javascript
these methods are called from your BrowserHost instance?
taxilian 13:03 JSObject
!wiki JSObject
FireBreathBot 13:03 8 results found. Note: Results limited to 8
"class FB JSObject ~JSObject":
"class FB JSObject JSObject":
"class FB JSObject":
"class FB JSObject getJSAPI":
"class FB JSObject SetPropertyAsync":
"class FB JSObject InvokeAsync":
"class FB JSObject GetArrayValues":
"class FB JSObject Members":
taxilian 13:03 if you had read what I told you to read, you would know how to use it by now as well
Guest85562 13:03 ok, i'll play around. Thanks very much for your time and help.
taxilian 13:03 don't get me wrong. I dont' mind answering questions… it's just I've answered that one already and you didn't look where I told you to find the answer =] when you have more specific questions or need clarification, please don't hesitate
Guest85562 13:03 will do, thanks again :)
taxilian 13:03 good luck
Guest85562 13:03 thanks!
neilg_ 13:03 Sorry, I got called into an interview in the middle of typing earlier :)
So yes, anyway, I'll look into the keyboard events on the mac because, well, they don't entirely work. :)
taxilian 13:03 sounds good =]
you're on 1.5, right?
neilg_ 13:03 But can you tell me which FBKeyCode I'm supposed to see for a key like 'a'?
I am
taxilian 13:03 neilg_: I didn't write any of that code
so I have no idea
dont' even know if anyone is using it
neilg_ 13:03 Well, it seems like the enums are wrong too - I don't see any possible valid value it could be for a regular key. :)
So maybe I'll be fixing it all ;)
taxilian 13:03 okay =
I'm actually perfectly okay with that
believe it or not
neilg_ 13:03 That's fine, it needs to be done in any case. Looking at the code I guess Dan Groom wrote it originally? Is he still around?
taxilian 13:03 not really sure; I still have his IM contact
he's online, but away
I think he has a different nick that I would know him by better
but I'm not certain
ti's hard to keep track of everyone in this project sometimes =]
neilg_ 13:03 Sure, I understand :)
Oh, I see. CocoaKeyCodeToFBKeyCode just does FBKeyCode retVal = FBKEY_UNKNOWN - and nothing else!
That would explain things
taxilian 14:03 lol
look at the windows code for comparison
that's the only one that might be somewhat done
Guest85562 14:03 hi taxilian: a quick clarification, how can i get a JSObject for an arbitrary javascript function in a page's global namespace?
the examples i've seen seem to suggest that the js methods you call from your plugin are those that have been registered on your class
neilg_ 14:03 Weird. Okay, so looks like on Windows keys such as 'a', 'b' and so on are all FBKEY_UNKNOWN
Anything else (such as shift, tab and so on) are given special codes
I guess that's not unreasonable
taxilian 14:03 Guest85562: use getDOMWindow from the BrowserHost
global JS namespace is the browser window
!wiki getDOMWindow
FireBreathBot 14:03 7 results found. Note: Results limited to 8
"class FB ActiveX ActiveXBrowserHost getDOMWindow":
"class FB Npapi NpapiBrowserHost getDOMWindow":
"class FB BrowserHost getDOMWindow":
"Tips and Tricks":
"Plugin Lifecycle":
"Version History":
Guest85562 14:03 perfect! thanks!
this is all starting to make sense now :) thanks for putting up with me
taxilian 14:03 hehe. we don't mind; just please contribute back as you are able; answer others' questions, update docs (particularly those that were unclear to you), make a donation, write a blog post, fix bugs, add features… there are lots of options, just please do what you are able
Guest85562 14:03 i will for sure. this is a great project. in 2006, i had to write a plugin from scratch, the only examples were meagerly sprinkled around the (then terrible) MDC docs.
taxilian 14:03 believe me, I know how that goes =]
that's what got me started
first I wrote some tutorials for NPAPI, and then later someone hired me to write them a plugin framework… I agreed on the condition that I could open source it
Guest85562 14:03 ya, back then it felt like you were reading docs that hadn't been changed since the 90s and netscape navigator days
great job with firebreath
taxilian 14:03 yeah
FireBreathBot 14:03 Commit 2360871 on master by Jarom Loveridge: "Moved test.html under test_pages. Added Mac drawing model te..."
taxilian 14:03 neilg_: did you have any questions for Dan Groom? he finally responded to my IM
someone-noone: you're up early
someone-noone 14:03 lol, i wasn't sleeping)
taxilian 14:03 isn't it, like the middle of the night there now?
neilg_ 14:03 Hmm... Nothing yet, I just didn't know if he was around anymore is all. I saw what the code was trying to do (but was relying on Carbon)
But I don't think it can work with modifier keys like it does on Windows
taxilian 14:03 neilg_: yeah, he's around still, it would seem
he says he's happy to answer questions, but isn't using FB anymore himself
someone-noone 15:03 it's 23:00 now
taxilian 15:03 ahh. you're not as far as I was thinking, then; I know the timezones in Russia much better than the Ukraine
someone-noone 15:03 we have +2 in ukraien
taxilian 15:03 ahh. and I'm only −6 here
someone-noone 15:03 one i will come in U.S.
one day*
and we will drink some beer together (or juice)
i have two brothers living in U.S.
are you from US, right?
taxilian 15:03 yeah; I live in Utah, US
someone-noone 15:03 what climate do you have there?
taxilian 15:03 hmm. how to explain; well, currently it's sunny and cool
probably 10 degrees or so
someone-noone 15:03 my brother lives in Geenville, South Carolina
taxilian 15:03 snow on the mountains, but not bad in the valley
someone-noone 15:03 so it is not warm in summer and not cold in winter?
taxilian 15:03 oh, it gets pretty warm and pretty cold
it's not quite as extreme as Siberia, but it has a pretty good range
it's not summer yet
someone-noone 15:03 so i think your climate is similar to ukrainian
taxilian 15:03 it gets up to 38 or so in the summer, down to −20 or so sometimes in the winter
someone-noone 15:03 but last years we got up to +35 C (
sounds like Ukraine)
taxilian 15:03 yeah, wouldn't surprise me
around here we say "Welcome to Utah… if you don't like the weather, wait for an hour or so.. it'll probably change"
I've seen rain, hail, snow, and sun all in the same day… in July
someone-noone 15:03 wow
taxilian 15:03 (rare, but it happens)
someone-noone 15:03 how much does fuel cost? i guess 1$ ?
you have barells not litres
taxilian 15:03 gallons, actually
someone-noone 15:03 i forgot that
even gallons)
taxilian 15:03 right now it's about $3.50 / gallon, and a gallon is 3.8 liters
someone-noone 15:03 cheap enough
taxilian 15:03 heh. it'll get worse before it gets better, I'm sure
jshanab_wcw 15:03 taxiliian, here they say 5 min
taxilian 15:03 jshanab_wcw: =]
someone-noone 15:03 we got ~1.3$ per liter. And price is growing every day
jshanab_wcw 15:03 and then they say wait 5 min... and it will change to something else you don't like
taxilian 15:03 I'm finally getting a little time to work in web-based fbgen again..
it's going to be very cool
of course, most won't use it more than once or twice
but it'll be alot nicer than the console-based version
particularly the donator's version of it
nitrogenycs 15:03 here's it's 2.20$ per litre
taxilian 15:03 ouch
someone-noone 15:03 wow
where do you live?
where are you from? *
nitrogenycs 15:03 germany
someone-noone 15:03 hm. I was in Germany - beautiful country with beautify people
nitrogenycs 15:03 :) I've never been to the ukraine
someone-noone 15:03 you may come here one day. We have the most beautiful girls in the world ;)
this is true, i'm not joking)
taxilian 15:03 that's not very helpful for those of us who are already married =]
someone-noone 15:03 cheating?
taxilian 15:03 not my style =]
someone-noone 15:03 me too
just joking)
taxilian 15:03 =] I know
nitrogenycs 15:03 lol
someone-noone 15:03 i lived in Leipzig and was in Nurnberg, Dresden and Berlin
Dresden's gallery is awesome
And your trams are also awesome)
neilg_ 15:03 It's even more in the UK per litre. And I'm sure it'll go up even more in Europe given most oil comes from Libya and surrounding areas!
someone-noone 15:03 This is true. Europe is fuel dependent region
neilg_ 15:03 Though in a global market it's going to go up everywhere given the demand is there but the supply could be disrupted. The key word there is "could"
taxilian 15:03 yeah. well, I gotta go run a quick errand; I'll be back later
neilg_ 15:03 Have fun!
someone-noone 15:03 But you may compare average salary in UK, Germany with Ukraine
and you will that fuel price in your country is not very expensive
nitrogenycs 15:03 :) I've never been in any of those cities, you came further than me
someone-noone 15:03 you will see *
nitrogenycs 15:03 damn people speculating on oil
true, fuel price is always relative
someone-noone 15:03 also in my county fuel has the lowest quality. They mix it with water! It's true. Even a lot of car producers do not supply diesel car in my country. Do you want to know why? Because engine is breaking often with our diesel
neilg_ 15:03 That's crazy
I've actually been to (and through!) the Ukraine. It's a beautiful area for sure
someone-noone 15:03 Do you understand the meaning of word "saw\adage\proverb"? I'm not sure you have that in english. Used google translate and not sure that is right
neilg_ 15:03 Adage or proverb sure
Saw... could have several meanings
someone-noone 15:03 So in my country we have nex "adage": Why are we stupid? Because we are poor. Why are we poor? Because we are stupid.
that "adage" explain all situation in my country)
so if you will be in Ukraine and do not understand why it's happening so, remember words that i said to you)
kylehuff 15:03 In American English, we would say "old adage" or "proverb" these are basically the same thing. If you called an adage a "saw" it would probably confuse most Americans.
someone-noone 15:03 but anyway i love my country and invite you all to visit me)
taxilian 16:03 someone-noone: what is the Russian word you're looking for for adage?
someone-noone 16:03 пословица
taxilian 16:03 "saying"
adage is probably also a reasonable translation, but less colloquial
we understood anyway, though =] just in the interest of expanding your vocabulary as I hope you would help me expand mine :-P
someone-noone 16:03 of course
i want to have more practice in englis
so all is not ok, it is even awesome
taxilian 16:03 hehe. fair enough
someone-noone 16:03 about fair. Samsung delegation visited my university. They are searching "young talants" and "good scientists" and they give money for researching. Sounds fair. But how do they work? They give "opened problems" in text format to all who are interested in it. After that they gather all in one place and anyone writes solution on paper and those papers are going to the Samsung's chief. He looks at that and choose the best one including next parameters:
And they say: we are developing your science. But instead they are just buying "brains".
Is it fair?
FireBreathBot 16:03 Commit ef932b3 on master by Jarom Loveridge: "Cleaned up the drawingModel examples slightly."
taxilian 16:03 heh. very few things in life are fair, I think
someone-noone 16:03 I think all life is fair
good actions have good returns and contrary
life is 0, i guess)
taxilian 16:03 lol
perhaps that is true… when taken as a whole, life is fair. when taken in a small piece, it is not =]
it all evens out eventually
someone-noone 16:03 you can't anything in this life. One thing you can is to choose
why not? do you think bad deeds are not punished?
even if you make a very small bad action all will recompensed
taxilian 16:03 I think that things are all evened out.. however, if you only look at "this week", then it may not seem so
the balance may not come for years
so ff4 ICA seems to have some interesting drawing issues
with transparency
but only in 32 bit mode
someone-noone 16:03 yes, but you should understand that "cost" of bad action after years may be very expensive
i'm not believer, but i know it )
taxilian 16:03 very true; I tend to think of things less in terms of punishment than in terms of consequences.
someone-noone 16:03 agree with you
FireBreathBot 16:03 Commit f75a1fd on master by Richard Bateman: "Merge branch 'master' of"
Commit c986784 on master by Richard Bateman: "Merge branch 'master' of"
Guest85562 17:03 hey again :) What's the best way of passing the plugin instance's BrowserHostPtr as a void* parameter of a function that executes as a separate thread? I'm using a third party library that has implemented the multi-threaded dispatch daemon
taxilian 17:03 *wince*
Guest85562 17:03 ya :(
taxilian 17:03 well, if you're careful, you can use .get() to get the BrowserHost*
just make sure it's shut down before the PluginCore object goes away
Guest85562 17:03 and in the thread, just cast the void* back to a FB::BrowserHost?
taxilian 17:03 FB::BrowserHost*, yes
if you're going to use it that way, that's probably the easiest
Guest85562 17:03 ok, cool
taxilian 17:03 you should set a real nick (that isn't taken) so we remember who you are =]
Guest85562 17:03 will do
taxilian 17:03 stuartmorgan: we're still not sure why ours isn't working on chrome on 10.5; we have the example animated now (for CA, anyway), and while Chrome doesn't perform nearly as well as FF4 and neither looks as good as Safari, it is drawing
so we're still digging
FireBreathBot 17:03 Commit ac92762 on master by Richard Bateman: "Minor wording correction"
nitrogenycs 19:03 taxilian: I am looking into adding support for RemoveProperty and Construct to JSAPI
taxilian: a few questions:
taxilian 19:03 cool
been meaning to get to that =]
nitrogenycs 19:03 taxilian: 1) How do I best setup my repo for committing later? clone it and then push directly into master? or you want it done differently?
taxilian 19:03 nitrogenycs: the "ideal" is if you fork the firebreath repo and keep things relatively current; rebasing your changes off of master periodically can be nice, though not required
then I can either pull or cherry-pick your changes
alternately you could just keep your own copy and use git format-patch
nitrogenycs 19:03 ok
2) Do you want to call it RemoveProperty or DeleteProperty? I suppose we need int/string versions (as we do for get/setproperty)
taxilian 19:03 hmm. probably RemoveProperty, just because it makes sense to stick somewhat to an existing naming convention instead of creating our own
nitrogenycs 19:03 Should SetProperty('abc', undefined) be treated the same as deleting it? -- I guess not, just let the JSAPI implementer deal with that
taxilian 19:03 that's really a hard one
because that's really what is returned if hte property is not set is undefined
but I guess there perhaps should be a difference
I dunno
nitrogenycs 19:03 ok
taxilian 19:03 open to suggestions
nitrogenycs 19:03 I have no strong feelings. My inclination is to keep it as close to the metal as possible
taxilian 19:03 mine too
if it aint broke, don't fix it =]
nitrogenycs 19:03 if the implementer wants to reroute RemoveProperty to SetProperty(..., undefined) he can do in his own implementation
taxilian 19:03 fair enough
taxilian 19:03 hmm. I wonder if e65490858c would help with FIREBREATH-11
FireBreathBot 19: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: Open,
e654908 by Jukka Ojanen: Several small fixes to IE9 crashing
nitrogenycs 19:03 taxilian: In the current RemoveProperty NPAPI code it always returns false after getAPI()->setDefaultEventMethod(sName, nullEvent)
is this intended?
taxilian 19:03 hmm. no, probably shouldn't do that
nitrogenycs 19:03 ok
taxilian 19:03 if there is an event and it clears it it should return true
not that it likely matters
nitrogenycs 19:03 good, I guessed so
taxilian 19:03 but still =]
nitrogenycs 19:03 :)
nitrogenycs 20:03 taxilian: what should happen if construct is called on a JSAPIAuto instance? My current inclination is to just throw an exception for now
taxilian 20:03 nitrogenycs: hmm. that's an interesting question
probably so
nitrogenycs 20:03 There could be some fancy registration stuff later, just like for methods and properties
taxilian 20:03 yeah
nitrogenycs 20:03 but I'm not into that now
I only need the pure JSAPI anyway
taxilian 20:03 yeah
baby steps; partial implementation is better than no implementation
so even if we don't decide what JSAPIAuto should eventually have, that's fine
nitrogenycs 20:03 when removing a property from jsapiauto I do it like this
if (memberAccessible(m_zoneMap.find(id)) && (m_allowDynamicAttributes || (m_attributes.find(id) != m_attributes.end() && !m_attributes[id].readonly))) {
do I also have to remove the name from m_attributes?
I decided not to do this, so you can re-add a new property of the same name later
taxilian 20:03 potentially, yes
m_attributes is not the same as properties
if there is no property, then the attribute should be removed if there is one
nitrogenycs 20:03 ahh, I confused m_attributes with the m_reservedMembers
taxilian 20:03 yeah, that's something else =]
attributes are actually pretty cool
nitrogenycs 20:03 question
in SetProperty you do a check for memberAccessible for the properties
but no such check is done for the attributes
taxilian 20:03 I don't remember, honestly
nitrogenycs 20:03 ok
taxilian 20:03 I think attributes should be checked somehow
and whatever zone they are set from they should be set in
nitrogenycs 20:03 hmm
another q
in JSAPIAuto
do you want the PropertyFunctors to have a remove() member?
probably does not make much sense
taxilian 20:03 yeah, I don't see how that would even work
nitrogenycs 20:03 it couldn't do much except vetoing or allowing the property to be removed
nitrogenycs 20:03 taxilian: the npapi and scriptingcore modules compile with my changes. right now working on the idispatch stuff. There's only DISPATCH_PROPERTYPUT it seems, nothing like DISPATCH_PROPERTYDELETE. So I assume I just call SetProperty with "undefined"?
taxilian 20:03 no, there is a delete
let me find it
nitrogenycs 20:03 I found one for the ex version
taxilian 20:03 yes
that's it
nitrogenycs 20:03 DeleteMemberByDispID
but there's code like
if (dispatchEx) {
hr = dispatchEx->DeleteMemberByDispID(dispId);
} else {
hr = m_obj->Invoke(dispId, IID_NULL, LOCALE_USER_DEFAULT,
DISPATCH_PROPERTYPUT, &params, &result, &exceptionInfo, NULL);
(partially copied from SetProperty)
so I wonder what I should do if there's no dispatchEx
taxilian 21:03 good question
nitrogenycs 21:03 it seems there's no support for this scenario
taxilian 21:03 that is true
nitrogenycs 21:03 just out of curiosity, when do you have an dispatchEx and when don't you?
older versions of IE don't have it?
taxilian 21:03 certain methods don't
nitrogenycs 21:03 ok
taxilian 21:03 objects pretty much always do, I think
nitrogenycs 21:03 ok
so as long as you don't try to remove properties from methods it's fine
I could still make it set it to undefined
it's better than leaving the old value around
or I just throw an exception
I've put an exception there for now
nitrogenycs 21:03 taxilian: are you aware of this page?
taxilian 21:03 I think so
I'm on a call right now; will look at it a bit later
nitrogenycs 21:03 ok
// TODO: Figure out why default function calls have an extra argument;
// My theory is that the argument is the object we're calling this on,
// since the first (last, since we reverse the order) argument passed
// is an IDispatch object
cause it might explain this comment in the source
(just ignore me for now, I just keep writing so I don't forget)
that microsoft page has // Invoke method with "this" pointer
putid = DISPID_THIS;
taxilian 21:03 yeah; jtojanen explained that to me once; I didn't understand all of it, but he explained it :-P
pretty sure that's what it is, though, yes
nitrogenycs 21:03 :) ok
taxilian 21:03 haven't found any reason that this helps us to know, though =]
nitrogenycs 22:03 taxilian: my code is basically ready, I'm currently doing runtime testing. I'll probably send in a patch tomorrow
taxilian 22:03 awesome
could you manage some unit tests on it?
I'm trying to at least keep scriptingcore unit tested =]
nitrogenycs 22:03 sure, I've setup unit tests for my own thing
where do I add them?
i'm off to bed now, javascript wants me to give out a "prototype" property, otherwise the Construct() won't be called. gonna decide tomorrow what to do about that.
good night guys