IRC Log Viewer » #firebreath » 2011-11-17

IRC Nick Time (GMT-7) Message
DFUN 01:11 Good morning everyone
Does anyone know about a difference in Firefox and Safari/Chrome that causes a different exception handling of my plugin? When I try to access a USB card reader that has no card inserted, Firefox silently allows the "Open" method to return the error while on Chrome and Safari a Windows error message "No volume - Exception processing..." pops up
I don't know if that's really a FireBreath issue, but I searched the whole web yesterday and can't find any answer. Since the mentioned browsers behave differently, there might be a way to adapt the Firefox handling to Chrome?
when I open the filestream there is no exception being thrown in the code. It always returns an invalid handle - but Chrome additionally shows the message window.
DFUN_ 01:11 I finally got it; to whoever is intereted:
calling "SetErrorMode(SEM_FAILCRITICALERRORS);" and resetting "SetErrorMode(0);" did the trick to suppress the error message window and let the code handle the error processing
abachm 06:11 Sorry for asking a IE question, but we are still stuck with our old model and cannot switch to FB until after next release. So, in IE how to I accept an array of strings as argument to a plugin function?
linearray 06:11 have a seat, your answer will take about two hours
abachm 06:11 uh... that does not sound good :-/
linearray 06:11 that's when I predict the only person, who knows the answer, to show up here :)
abachm 07:11 ah taxilian :) ... i found this article
it looks kind of what I had to implement in NPAPI to get the same thing working
linearray 08:11 boost 1.48 released
linearray 08:11 taxilian: trying to make safari reload the plugin does not work at all most of the time
taxilian 08:11 on Mac? Windows?
abachm: sounds like you figured it out =]
linearray 08:11 mac
taxilian 08:11 linearray: did you remove the old plugin and put the new one in with a different filename?
linearray 08:11 no wait... what I mean is removing it from the DOM and adding it again
taxilian 08:11 linearray: did you remove the old plugin and put the new one in with a different filename?
linearray 08:11 no
taxilian 08:11 and did you call navigator.plugins.refresh(false)?
then it's not going to detect the new one
Safari on Mac (and probably some others) only detect a new plugin if it's a file they haven't seen before
so you need to name each version differently
linearray 08:11 ok
taxilian 08:11 you can even just alternate filenames if you want, but I usually use the version in the filename
linearray 08:11 Then I'll add that as a caveat to the DOM reload trick
taxilian 09:11 also in NPAPI browsers there is absolutely no reason to use the DOM reload trick until after you've detected the new version
the only place that trick makes sense is on IE
linearray 09:11 interesting
it does work in chrome most of the time
without navigator.plugins.refresh(false)
taxilian 09:11 kinda surprising, to be honest, but why do it that way when the other way is less performance intensive?
linearray 09:11 because I didn't know? :)
taxilian 09:11 heh
easily solved =]
now you do
linearray 09:11 but now I'm confused, because you also said that navigator.plugins.refresh(false); will not reload existing plugins
so I actually need to do both
taxilian 09:11 you use navigator.plugins.refresh(false) and detect that the new plugin is there, and *then* you remove it from the dom and add the new one
linearray 09:11 alright
linearray 09:11 is there a way to rss subscribe to all stackoverflow posts around a tag instead of merely questions?
taxilian 09:11 not that I know of
linearray 10:11 that's a bummer
taxilian 10:11 linearray: that naming thing only applies to mac
could you update tips and tricks again to clarify that?
Safari on windows uses the same registry install as everything else
linearray 10:11 will do. in 20
does anybody use safari on windows? :)
taxilian 10:11 some people do, yes =]
Sudi 10:11 good morning guys!!
jshanab_wcw 12:11 Last night I tried to get my plugin built on a new machine. During the prep stage I had a lot of CMAKE errors. Did something change on the newest version of cmake (2.8.6) it complains about something like using build directory for source...
taxilian 12:11 not as far as I know; that sounds like you have something off in your directory structure
you didn't try to copy the build dir across machines or anything crazy like that, did you?
jshanab_wcw 12:11 no. but i will check tonight if maybe the build directory got checked in and I need to delete before prep. thanks
taxilian 12:11 other than that I'd need to see specifics
jshanab_wcw 12:11 ok, well that machine is at home, I'll have to play with it then. unfortunantly that may be a while, i seem to have messed up my build environment here at work :-( ever see this error from visual studio ? LINK : fatal error LNK1104: cannot open file 'Files.obj'
linearray 12:11 spaces in path?
jshanab_wcw 12:11 That is what every search turns up. Some say must add quotes others say must remove quotes. I was trying to do a command line build and so I did mess it up. I just can't figure out where I shot myself in the foot!
linearray 12:11 you did try to delete build dir and prep again, right?
taxilian 12:11 jshanab_wcw: after a lot of research and experimentation on the spaces in paths issue, I have finally found the conclusive reliable solution: don't use spaces in your development paths
literally the same script I do it one way and it works on one win7 box, another way it works on the toher… but each breaks the alternate
jshanab_wcw 12:11 OMG, I just fixed it! This is actually on a differnt build than the plugin. no quotes around BOOST_HOME environment variable
I had a better solution. don't use windows, but this job requires it
taxilian 12:11 heh
jshanab_wcw 12:11 Funny windows defaults to Program Files (x86) , 2 spaces in there when it has so much fun with them
taxilian 12:11 tpaul: AddEventListener does *not* work on IE9
I have corrected the page to explain
tpaul 13:11 interesting, so addEventListener works for normal DOM elements but NOT for the plugin events, My appologies
taxilian 13:11 right
it's really Microsoft that should apologize to all of us
I have some theories on how we might be able to change that, but so far I haven't had time to work on it
and, let's face it… it isn't a huge issue, since as long as you know about it you can write your code to work anyway with no loss of functionality
anyway, I'm going to go get lunch. bbl
TR_ 13:11 hi guys
anyone active?
linearray 13:11 .ask
FireBreathBot 13:11 If you need help, just ask your question and wait for people to come back.
TR_ 13:11 I have a horribly nooby question that you probable get a lot: I need to develop a plugin in a language other than C++. Javascript, C# or Python are the best options. The plugin needs to: handle events from the DOM, display dialogs and have write access to the user's file system. Is this at all possible or will I have to rely on C++? The project will be inherited by a team of web developers with absolutely no C++ experience.
linearray 13:11 you can of course use javascript on the webpage you embed the plugin in
but firebreath is C++ and using something else will end up being painful
TR_ 13:11 i see. thanks for the info!
I'm on the project for a limited time only. I was hoping that i wouldn't have to hand over any unmanaged code. IE seems to be the only browser where this is a serious issue, seeing as the rest have pretty decent JS bindings as far as I can tell.
anyways, thanks for letting me know.
linearray 13:11 somebody suggested using a while ago, but AFAIK it hasn't been tried yet
use Boost, it will ease the pain ;)
jana_beat 14:11 ¿has someone tried to write a plugIn with objective-c ++ including a framework of an external provider i mean a thrid party framework? My problem arise when I build the plugIn using xcode 3.2.6 and after a long long time of processing, an error about Link appears..something like not symbols found un _obj_classname etc etc ....
taxilian 14:11 I really don't understand your question
jana_beat 14:11 Hi, I got an error trying to generate the PlugIn with xcode. I bought a Framework so I've installed it in /library/frameworks then I created a firebreath plugIn and I modified all necessary files in order to add this new library in the project. Specifically I alterated all .cmake files in the project. but it seems that the plugin can't link with the added framework ...
I did the #includes too and I ran the too
the error message is something like: Symbols not found ... referenced in the class
taxilian 14:11 when you say "altered all .cmake files" what do you mean? which files?
you should only need to change one cmake file to add your framework
jana_beat 14:11 ok, the first file is CmakeLists.cmake, here I added the line *.mm to file, the second file is: projectDef.cmake, here I added the Mac/[^.]*.mm line in file section and the line:${ZionProtection.framework} inside the "target_link_libraries" section. ZionProtection is the library I want to work with.
linearray 15:11 ok, browser support for File API is a joke
taxilian 15:11 lol
linearray 16:11 !wiki PluginWindow