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

IRC Nick Time (GMT-7) Message
taxilian 00:01 http://www.firebreath.org/display/documentation/Interacting+with+Javascript
new docs
enjoy
taxilian 09:01 g'morning all
jshanab_wcw2 09:01 Can I call back to javascript with more than one argument
taxilian 09:01 absolutely
send as many as you like
if you're using FB::variant_list_of you just need to add more "function calls"… e.g. FB::variant_list_of("something")("else")("like")("this")(3)(4)(6)
jshanab_wcw2 09:01 oh, the parenthises are important, not arg1,arg2 but (arg1)(arg2)
duh, list
taxilian 09:01 right
it's a little weird, to be honest, but that's so that it will work to build a FB::VariantList
jshanab_wcw2 09:01 For some reason it no longer calls back when i added an argument :-( a typo someplace
taxilian 09:01 huh; that's weird
but no error?
jshanab_wcw2 09:01 actually, i just thought of something...
I was following this example http://colonelpanic.net/2010/12/firebreath-tips-asynchronous-javascript-calls/
fixed!, typo LOL
taxilian 09:01 hehe
is there a typo in my post that I should fix?
jshanab_wcw2 09:01 no,no. My bad. an error in a javascript function means the function doesn't run. but the page still mostly works.
taxilian 09:01 ahh
taxilian 09:01 amackera: hey, long time no see =]
are you hiding from me because you haven't gotten the IE windowless stuff working or something? ;-)
amackera 09:01 hahahah
i was just about to say that
we are in like perpetual crunch time at work :(
taxilian 09:01 hehe. I understand; get to it when you can. it's not like I'm going to fire you from the team… ;-)
amackera 09:01 Hehe, thanks
I'm going to hang out here and help with support, though
taxilian 09:01 I appreciate that
there have been some major improvements to JSAPI lately
amackera 09:01 yeah?
taxilian 09:01 security features, for one
you can support multiple security zones (Public, protected, private, local, or define your own)
and register methods and properties in those zones
you can also define attributes, which are like easy properties - just stored in a map on the class
amackera 09:01 ooo
that will be useful
taxilian 09:01 so if you just need a const value, registerAttribute("CONST_VAL", 23, true) (true means const)
you can also return a boost::shared_ptr<AnyObjectAPI> from a JSAPIAuto function instead of needing to always use FB::JSAPIPtr
and accept a JSAPIPtr or derived type as a parameter; it'll try to pull it out of a FB::JSObjectPtr automatically
also support for boost::optional to use optional arguments to a function (rather than having to use FB::CatchAll if you want optional arguments)
amackera 10:01 whoa sweet, boost::optional is badass
I saw the new JS documentation
taxilian 10:01 also for the really adventurous you can use boost::variant as a parameter type
the neat thing about that is you could do boost::variant<std::string,std::list<std::string> > and it will accept either a string or a list of strings, etc
howdy, Tim__
Tim__ 10:01 Hi
taxilian 10:01 how's it going?
Tim__ 10:01 good thanks
taxilian 10:01 excelent
Tim__ 10:01 Does FireBreath support using an object element as part of a form and submitting its value?
taxilian 10:01 hmm. probably not directly; I don't actually know how to do that. You could use a linked hidden field, though
or if you know how to do it with both NPAPI and ActiveX we could probably add support for it
Tim__ 10:01 As far as I'm aware NPAPI and ActiveX plugins do support it. Using a hidden field seems to be the standard workaround though.
taxilian 10:01 yeah, seems like they probably do support it… I just don't know how =]
never needed to
hidden field seems easier
pass the id to the hidden field into the plugin with a param tag or something
Tim__ 10:01 NPAPI has NPPVformValue and I think ActiveX plugins support a default property that is then used.
taxilian 10:01 hmm. NPPVformValue would be easy enough to add; if you can figure out what the default property is, that would also be pretty easy
Tim__ 10:01 Yeah, I'll do that for now. Thanks
taxilian 10:01 no problem
taxilian 10:01 NoAntzWk: you here? I'm not sure I understood your last email
fireplug 11:01 I have a question on plugin code writing to local file system (for logging purposes). I have built the windows plugin but I am unable to open/read/write to a file. Am i missing anything
any specific permissions issues in doing this
taxilian 11:01 what browser?
fireplug 11:01 firefox
taxilian 11:01 hmm. where are you trying to write the file?
fireplug 11:01 some text, just for logging/debugging purposes
taxilian 11:01 *where* are you trying to write the file?
fireplug 11:01 when i try to open the file, i get null file pointer
i tried couple of directories
taxilian 11:01 let me try this again; what is the path and filename of the file you are trying to open? what directories have you tried?
fireplug 11:01 in C and also in where the plugin code resides
taxilian 11:01 what OS? Windows, obviously, but which?
fireplug 11:01 windows vista
taxilian 11:01 good chance that you have permissions issues, then; try opening a file in C:\Users\<username>\AppData\LocalLow\
fireplug 11:01 i'll try that and see. Are you aware of any other logging mechanisms
taxilian 11:01 well, there is log4cplus that FireBreath bundles with
it still needs some tweaking, but you could help us with that =] it doesn't need a ton, just a bit
fireplug 11:01 I see a lot of printfs in the plugin code and not sure where they will be printed
taxilian 11:01 those really need to be removed; they print to the console, which only helps you on mac, linux, and with debug builds of firefox on windows
I suppose we could allocate a console
but that's a pain
fireplug 11:01 yes. let me look into log4cplus to see if i can leverage on this (by making some changes)
do you have any pointers in this regards
to start with.
taxilian 11:01 first thing is to put add_firebreath_library(log4cplus) in your PluginConfig.cmake and re-run the prep script
that'll give you log4cplus in your project
are you using the latest from github?
fireplug 11:01 yes
taxilian 11:01 excelent; I may have to fix some things for you, that way it'll be easy for you to get the changes
I've needed to do this for awhile; it's one of the things holding up the beta
fireplug 11:01 ok
taxilian 11:01 the first problem is that there isn't currently a way to specify the file to use
I can fix that pretty easily, I think
fireplug 11:01 ok.
jlaire 11:01 if you're new to log4x type of logging, a good introduction is at http://logging.apache.org/log4j/1.2/manual.html
fireplug 11:01 the goal of log4cplus is to log messages to any given file?
taxilian 11:01 yep
fireplug 11:01 oh ok, let me read it. yes i'm new to this.
taxilian 11:01 jlaire: are you pretty familiar with log4cplus, then? Perhaps you can save me some time and help me figure a few things out?
jlaire 11:01 taxilian: sorry, not at all familiar with it
you're probably better off without my trying to help :)
taxilian 11:01 *sigh*. =] thanks anyway
fireplug 11:01 taxilian: does this logger can write to file anywhare. how it deals with the permission issues?
taxilian 11:01 it can only write to a file that you have permission to write to
that's why I need to make it so you can specify the filename =] currently it just writes to the debug console on windows
fireplug 11:01 oh ok, got you.
i'll figure out my permission issues and try to write to browser temp folder. much appreciate your help.
i'll also tweak log4cplus.
taxilian 11:01 I can get you a fix to get you a bit closer in a few minutes
fireplug 11:01 hmm. I cant get to work on this until i go home later.
taxilian 11:01 ok
hopefully by then I'll have added something to specify the filename =]
need to add something to set the loglevel as well...
fireplug 11:01 that would be awesome
taxilian 11:01 btw, has anyone had a chance to look at the new JavaScript Interaction doc pages yet? Any feedback, suggestions? Does this fill the need that we've had for better JSAPI docs? http://www.firebreath.org/display/documentation/Interacting+with+Javascript
wolfmanfx 12:01 hi
amackera 12:01 hello
wolfmanfx 12:01 is there a reason why getElementsByTagName not working in safari/chrome but in ff/ie it works
taxilian 12:01 hmm. I really don't know
amackera 12:01 does the function exist?
typeof document.getElementsByTagName
taxilian: we should have some explaination of how to register properties and attributes with JSAPI
the methods page is great
and the landing page of interacting with JS is quality too
taxilian 12:01 amackera: glad you like it. Yeah, I haven't had time to do pages for properties, attributes, and events
I think properties can copy most of the methods page and then just tweak
and attributes shouldn't be hard
but yeah, definitely needs to be added
amackera 12:01 yeah, the only thing with attributes that needs a bit of explaination is making them const in the plugin, i think
taxilian 12:01 right
amackera 12:01 there's a sentence that mentions it, but maybe an example would help
and definitely an example of registering a property
taxilian 12:01 yeah
that's what I'll put on the attributes page
amackera 12:01 I'm glad this wiki page exists now though, it's an excellent summary of what we can do with JSAPI
taxilian 12:01 yeah; I've been meaning to write it for a long time
I still need to finish this and write a cmake page
taxilian 12:01 what do you guys think? Should logging be turned on by default in debug mode?
rather, should the fbgen template create a plugin in which logging is on by default
wolfmanfx 12:01 ok i am using getInnerHTML and do the parsing myself only issue were that ie had all tags uppercase
taxilian 12:01 hmm. I would really like to know why that doesn't work, though
does document.getElementsByTagName work from JS in those other browsers?
wolfmanfx 12:01 in FF correctly
in ie it gives you all tags
in FF only child tags
so its not that useable at all
maybe we should mention that in the docs
the difference between ff and ie
taxilian 12:01 wait; what do you mean by "all tags" vs "child tags"? isn't that a method on document?
wolfmanfx 12:01 ff return only nested tags when you the getElementsByTagName
taxilian 12:01 nested tags; nested in what?
FB_GitHubBot 12:01 FireBreath: firebreath-1.4 Richard Bateman * 433afc7 (4 files in 3 dirs): Added factory methods for configuring logger - http://bit.ly/fA5ikV
wolfmanfx 12:01 ie returns all elements with that tag name
<object id="plugin0" type="application/x-agepwebplugin" width="800" height="250">
<param name="vfs" value="C:\\Users\\wolfmanfx\\Desktop\\mahjong.vfs" />
</object>
<br />
<object id="plugin1" type="application/x-agepwebplugin" width="640" height="480">
<param name="vfs" value="C:\\Users\\wolfmanfx\\Desktop\\Test.vfs" />
here is the html code
taxilian 12:01 okay, stop for a second; two thigns
wolfmanfx 12:01 param is the child of the object tag
taxilian 12:01 first, returns all tags vs returns nested tags… are you calling getElementsByTagName on document or on an element?
wolfmanfx 12:01 i called it on the getDOMElement
taxilian 12:01 ahh; I forgot I moved it there. okay; maybe in the other browsers it's not supported on a DOMElement
okay, second thing
you don't want to use that to get the param tag values
just use m_params["vfs"] in your plugin object
it's already there
wolfmanfx 12:01 nooooo
thx
taxilian 12:01 hmm. in chrome it looks like it should work
wolfmanfx 12:01 how to get the string value from the variant
taxilian 12:01 .convert_cast<std::string>()
FB_GitHubBot 13:01 FireBreath: firebreath-1.4 Richard Bateman * 4519c91 (2 files in 1 dirs): Added specialization to try to fix getElementsByTagName problem on IE
FireBreath: firebreath-1.4 Richard Bateman * 9a19719 (1 files in 1 dirs): Added missing change from recent log fix
FireBreath: firebreath-1.4 Richard Bateman * 89e3ff9 (17 files in 8 dirs): Browser no longer holds strong ptrs to JSAPI objects; added support for weak_ptrs sent to the browser ...
FireBreath: firebreath-1.4 commits 433afc7...89e3ff9 - http://bit.ly/icoBJE
taxilian 13:01 grr. one of those commits I just pushed I thought I'd already pushed
more grr.. I thought I was on the master branch. not doing well this week
FB_GitHubBot 13:01 FireBreath: master Richard Bateman * 433afc7 (4 files in 3 dirs): Added factory methods for configuring logger
FireBreath: master Richard Bateman * 4519c91 (2 files in 1 dirs): Added specialization to try to fix getElementsByTagName problem on IE
FireBreath: master Richard Bateman * 9a19719 (1 files in 1 dirs): Added missing change from recent log fix
FireBreath: master Richard Bateman * 89e3ff9 (17 files in 8 dirs): Browser no longer holds strong ptrs to JSAPI objects; added support for weak_ptrs sent to the browser ...
FireBreath: master Richard Bateman * c2dd4b9 (10 files in 5 dirs): Merge branch 'master' of github.com:firebreath/FireBreath
FireBreath: master commits 1b655f5...c2dd4b9 - http://bit.ly/eTmayw
FireBreath: firebreath-1.4 Richard Bateman * c2dd4b9 (10 files in 5 dirs): Merge branch 'master' of github.com:firebreath/FireBreath - http://bit.ly/hLYAeG
FireBreath: master Jukka Ojanen * ee2319b (1 files in 1 dirs): Preapprove ActiveX and allow plugin on all domains - http://bit.ly/gVVfiC
taxilian 13:01 that's a great change
FB_GitHubBot 13:01 FireBreath: firebreath-1.4 Jukka Ojanen * ee2319b (1 files in 1 dirs): Preapprove ActiveX and allow plugin on all domains - http://bit.ly/gVVfiC
FireBreath: cmake_patch Richard Bateman * 1491f7d (2 files in 2 dirs): Made changes to work with patched cmake. Hopefully this patch will be in cmake 2.8.4 - http://bit.ly/hmsuKH
taxilian 13:01 _neilg_: you ever going to start using the multiple mimetype support?
taxilian 13:01 fireplug: there are two methods you'll want to override for logging in your Factory class
wolfmanfx 16:01 i am trying to use boost thread like its done in firebreath in my own project but BOOST_ALL_NO_LIB is not not working it tries to auto_link
anyone know something i am getting crayz with that
:)
wait its too late he asking date_time lib
how fb avoid date:time lib?
taxilian 16:01 wolfmanfx: we build boost::thread ourselves
wolfmanfx 16:01 yep doing the same
trying to repo the way you did
taxilian 16:01 then just copy FireBreath's boost repo
wolfmanfx 16:01 but how do avoid the date_time lib
taxilian 16:01 auto_link is disabled
wolfmanfx 16:01 already did
taxilian 16:01 I've never needed date_time when using the firebreath stuff; not certain why
wolfmanfx 16:01 but he asks libboost_date_time-vc100-mt-gd-1_45.lib
taxilian 16:01 that's because auto_link isn't disabled
if you were using FireBreath's firebreath-boost repository it would be
unless you haven't updated
and grabbed it at just the wrong time
wolfmanfx 16:01 ah i used the zip file
from confluence
is this outdated
taxilian 16:01 when did you grab it?
wolfmanfx 16:01 dont know 3 days before
taxilian 16:01 I don't know; yesterday I updated it all to boost 1.45
if you grabbed it in the middle of that it would make sense
wolfmanfx 16:01 mm
o redownload
taxilian 16:01 but I have no idea why you'd be getting auto_link problems if you didn't, because it's disabled
the easiest would be to just tie it all into the cmake project
unless it's not related to your plugin
wolfmanfx 16:01 i want to use boost threads outside fb and liked the way you did it (before i used bjam to compile it)
taxilian 16:01 well, the way we do it is to use litlte mini cmake projects
so if you want it to work the same way, you'll want to use cmake
you can do it otherwise as well, but it's harder
wolfmanfx 16:01 need to learn cmake
i like it but
do not know where to start
taxilian 16:01 http://eris.liralab.it/yarp/specs/dox/dev/html/using_cmake.html looks decent
wolfmanfx 16:01 is there any book (the page is a good starting point but i want a more in depth stuff)
taxilian 16:01 there is one book
written by the cmake guys
it's pretty good
unfortunately no electronic format (that I've found)
http://www.amazon.com/Mastering-CMake-Ken-Martin/dp/193093422X/ref=sr_1_1?ie=UTF8&qid=1294875367&sr=8-1
wolfmanfx 16:01 so redownloaded boost
now it works
taxilian 16:01 actually, if you are thinking of buying that let me know; I'm thinking of setting up an affiliate account
so that I can put links to plugin-related books on firebreath.org and colonelpanic.net and have it generate a small amount of revenue to support FireBreath
wolfmanfx 16:01 yeah np
the price is decent
so yes
taxilian 16:01 hang on, let me see if I can figure out how to send you a link that will support FireBreath =]
wolfmanfx 16:01 send it per mail
taxilian 16:01 ahh; looks like they have to approve it. Dont' worry about it; maybe the next book. it'll be a few days before I get it up
wolfmanfx 16:01 wolfmanfx(at)gmail.com
taxilian 16:01 if you want to wait, I
I'll send it when I get it up
but you don't have to wait
it's not a huge deal
I just thought it'd be faster to set up
wolfmanfx 16:01 no rush on my side :)
taxilian 16:01 =] okay
taxilian 17:01 amackera: properties page is up: http://www.firebreath.org/display/documentation/JSAPI+Properties
I decided the event firing page was already okay, so I just linked it in
got working on attributes, realized I'm missing some functionality
will add it, then finish the page :-P
amackera 18:01 taxilian: nicely done my good man!
taxilian 18:01 thanks
taxilian 19:01 jshanab: I've never actually needed to deal with the activex signing issues myself; if you'd like to contribute some info / instructions, I could probably find some good ways to integrate them
jshanab_ 19:01 We are still having issues with ours, but are on our way to fix, it, this channel will be the second to know when we do sort it out :-)
Can you believe I have come up with an idea for the ideal companion project for FB? There are lots of javascript libraries out there, but they all try to provide a shit load of functionality. what is needed is a javascript minimal framework that just takes care of the browser specific(and by that I mean all the IE workarounds) that exist. :-)
Reading the survey results I saw "Platform agnostic drawing abstraction" I was trying SDL, now trying SFML. I like it, if it adds DirectX later, it could be even more impressive. Not that I am a diretX fan, just windows can run faster DireectX than OpenGL
taxilian 20:01 that was the last survey, not this survey, btw. (maybe you knew that, but in case you didn't). Interestingly, nobody has brought it up so far
on this survey
still, if you can find one that works nicely, that'd be great
on the js lib, that might be nice… I'd really rather find one that someone else maintains, though =] trying not to create work for myself… =]
FB_GitHubBot 21:01 FireBreath: master Richard Bateman * 855a916 (2 files in 1 dirs): Replaced for loop with more efficient lambda - http://bit.ly/dQ1TR7
FB_GitHubBot 21:01 FireBreath: master Richard Bateman * 7a9a96d (9 files in 3 dirs): Documentation improvements and fixes
FireBreath: master Richard Bateman * ee90d48 (1 files in 1 dirs): Documented scoped_zonelock
FireBreath: master commits 855a916...ee90d48 - http://bit.ly/hBsi30
FB_GitHubBot 22:01 FireBreath: master Richard Bateman * 6ce473c (25 files in 10 dirs): Fixed tabs -> spaces issues to fix documentation issues
FireBreath: master Richard Bateman * 1069fdc (9 files in 3 dirs): Updated more class docs, fixed problems, etc
FireBreath: master commits ee90d48...1069fdc - http://bit.ly/hYJD9B
FireBreath: master Richard Bateman * ecf2022 (2 files in 1 dirs): Updated more class docs, fixed problems, etc - http://bit.ly/hmdYKp
FB_GitHubBot 22:01 FireBreath: master Richard Bateman * 3c72b22 (9 files in 4 dirs): Updated more class docs, fixed problems, etc - http://bit.ly/gPc6QQ