IRC Log Viewer » #firebreath » 2012-11-21

IRC Nick Time (GMT-7) Message
avcat2002 04:11 anyone here
Bam4d 08:11 hello firebreath people... im having an issue with constantly putting "build" in the directory below /firebreath 1.6 instead of where i specify it to go... anyone know why?
jshanab 08:11 What is your prep line? I have learned to specify the build directory and not let it default
For example i have a plugins directory with each plugin in a dirctory under that. At a peer level i have the FB code in my common. So I type 1) CD {my plugins top level dir} 2) ..\common\Firebreath\prep2010 {myPlugin} build\{MyPlugin}
Jamil 08:11 Hi all, is there a way to call from the FB plugin a Javascript function?
jshanab 08:11 i think so
let me search
we register a callback and then call it periodically
So i have this in my pluginAPI bool MVSArchivePlayerAPI::startProgressBar(FB::JSObjectPtr &callback )
Then internally a thread fires on a timer and calls the passed in javascript function.
Jamil 08:11 can I see what inside this startProgressBar? the call to the passed js
jshanab 08:11 Here is the doc page look at the links on the bottom
Jamil 08:11 ok
jshanab 08:11 Our call is buried inside our jquery wrapper, i am looking at the other side
in javascript we just call the plugin passing a standard javascript function : plugin().StartProgressBar(callback_progressBar);
that javascript funct is just :
function callback_progressBar(plugin, position, loaded)
And... calling the JS from the plugin
void MVSArchivePlayerAPI::Signal_Progress(int position, const MVS_Player::BufferStats* result)
if(result && callback_)
callback_->InvokeAsync("", FB::variant_list_of(shared_from_this())(position)(result->begin)(result->end));
Jamil 08:11 and if my JS is not a jquery but an ExtJS (Sencha) call, it will work?
jshanab 08:11 I would think so. Not familiar with EXTjs (sencha) The plugin/js interface does not change
Jamil 08:11 yes, I will give it a try
Jamil 09:11 sorry jshannab
taxilian 09:11 good morning
Jamil 09:11 how you call Signal_Progress from your plugin and where is the callback_ parametter
taxilian 09:11 Jamil: you can call javascript functions from your plugin
Jamil 09:11 good morning taxilian
taxilian 09:11 if it's a global function, for example, you can use m_host->getDOMWindow()->getProperty<FB::JSObjectPtr>("jsfuncname")->invoke("", FB::variant_list_of(1)("other"));
or something very similar to that
Jamil 09:11 ah ok
what is FB::variant_list_of(1)
taxilian 09:11 FB::variant_list_of is a helper that creates a FB::VariantList
FB::variant_list_of(1)("something else")(false) will create a variantlist with [1, "something else", false]
Jamil 09:11 taxilian: I have access to m_host only in API class. Can I access it from other classes?
taxilian 09:11 it's in your plugin class as well
Jamil 09:11 ah ok, great...I will try it...need to go...thanks
taxilian 09:11 so it's a distinct possibility that I'm just a bit too used to javascript
I just wrote a Deferred object class for objective c
AndrewMac 09:11 hey guys
so ive just got the basics of firebreath down, wrote a simple plugin that when a page loads tries to extract peoples names
I was wondering if there were any examples for GUIs within the apps
taxilian 09:11 the most common method is just to create an HTML gui
and use the plugin hidden
AndrewMac 09:11 or if there is anyone who can point me in the right direction to do something like the skype plugins
yeah thats what im doing now
but i love that the plugin can do a lot of processing without locking the browser
where as if i do a lot of processing in the javascript the browser locks
taxilian 09:11 skype plugins?
I'm not sure what you're talking about
AndrewMac 09:11 the skype phone highlighter plugin
taxilian 09:11 that isn't a plugin
that's an extension
read up:
AndrewMac 09:11 sorry, im using them interchangably, i mean extension
taxilian 09:11 firebreath doesn't do extensions
AndrewMac 09:11 s/plugin/extension/99999999
taxilian 09:11 if that's really the case, you are in the wrong place =]
AndrewMac 09:11 hmm, maybe i will read that page
my firebreath project is under extensions in chrome :P
jshanab 09:11 Extensions can have plugins in them. I have tried this and it is nice except each browse has it's own way to do the extensions :-(
taxilian 09:11 you can use a firebreath plugin as part of an extension certainly
but it's important to understand the difference
AndrewMac 09:11 hmm
well what im looking to build is something to help people extract information from pages while they browse
and then communicate it to another application
I previously built something similar in javascript, but it was painfully slow and made the whole experience terribad
taxilian 09:11 I'd definitely do the page processing in javascript, use the plugin for details, processing that needs to be faster, etc
accessing page stuff from firebreath will likely not be faster than javascript
AndrewMac 10:11 so atm i get the dom in jscript, send it to my firebreath dll with a regular expression and then get a variantlist back of all the terms it matched
taxilian 10:11 seems reasonable
danzik17 10:11 AndrewMac: just curious, what browsers do you need to support?
AndrewMac 10:11 danzik17: really only 1, its just a PoC
danzik17 10:11 just chrome?
AndrewMac 10:11 atm i wrote it for chrome, just cause it was easier
but the XPI shouldnt be too difficult to port too
danzik17 10:11 was gonna suggest trying webworkers rather than using an NPAPI plugin
AndrewMac 10:11 i couldnt get DOM with webworkers though
taxilian 10:11 you can get the DOM from the main js and pass it to the webworker
or at least get the pieces you need
AndrewMac 10:11 at the moment the firebreath plugin works like a treat
star_ 10:11 hello
AndrewMac 10:11 its really just the highlighting thats an issue
star_ 10:11 could somebody help with issue when creating wix installer: Component installs to user profile. It must use a registry key under HKCU as its KeyPath, not a file
AndrewMac 10:11 addtionally at some other stage i need to communicate with another app via a socket, so the dll is probably gonna be easier
taxilian 10:11 star_ which component?
star_ 10:11 full error string: Error 1 error LGHT0204: ICE38: Component cmp59E9FF8A5A533CF0F9B838CA000C85EA installs to user profile. It must use a registry key under HKCU as its KeyPath, not a file. D:\SVN\plugins\hjoystick\branches\build\projects\vnPTZ\npvnPTZ_auto.wxs 8 1 vnPTZ_WiXInstall
its the plugin
taxilian 10:11 star_: most likely you are missing a depedent DLL
jshanab 10:11 star_ dejavue That was my error yesturday. taxillian can explain it best but the top part of your wix does not setup an all user plugin so it resorts to a completly differnt user based install and your added componet needs a key entry
taxilian 10:11 try running regsvr32 on it
star_ 10:11 i put it on dir with plugin
taxilian 10:11 you need to have it there when the build occurs
you can't copy it there later
the best way to do it is to have a post-build step that copies the file
star_ 10:11 in buld dir?
AndrewMac 10:11 danzik17 / taxilian : my biggest gripe at this stage is highlighting in the page as it locks the browser till its finished doing all the regular expressions and adding <spans> or whatever around it, so if you guys have any tips for how i could make that quicker/non locking id love to know
taxilian 10:11 star_ in the same dir that the plugin binary ends up
star_ 10:11 thanks, i try
danzik17 10:11 AndrewMac: what part of it is locking the browser right now? the regex or the highlighting?
AndrewMac 10:11 the javascript side to highlight the pages
taxilian 10:11 use a setTimeout(func, 0) to break it up
AndrewMac 10:11 so say i wanna highlight email addys in the page
danzik17 10:11 so DOM modification then?
AndrewMac 10:11 yeah
taxilian 10:11 if you have something long running you basically need to yield to let the browser keep working
AndrewMac 10:11 the regex search with the dll is super quick
taxilian 10:11 you can do that using a setTimeout
AndrewMac 10:11 any better way to highlight stuff than using a regex?
its quicker if i let the dll give me back the dom, but messy
danzik17 10:11 taxilian suggested exactly what i was gonna say actually
alternatively, see if requestAnimationFrame can help you at all
taxilian 10:11 ha! the faster typist wins! ;-)
that's an interesting thought; if it works, it would probably perform better
danzik17 10:11 i'm not positive if it works like this, but if it allows you to coalesce a bunch of DOM modification into one repaint, it may work better
AndrewMac 10:11 thanks, ill try
danzik17 10:11 since i'm betting its the repaints killing you, not the processing
AndrewMac 10:11 yeah most likely
since i have to do it for every response (so all telephone numbers say)
rather than a single update
JuanDaugherty 12:11 did you consider somekina ATL server setup so the AX leg could be customized?
taxilian 12:11 I'm really not much of an expert on ATL; I considered making something work
JuanDaugherty 12:11 that way it could have had binary modularity instead of the thing with pluginauto
just asking
taxilian 12:11 I'm afraid that's far beyond my experience with ATL
and AX
JuanDaugherty 12:11 a principle which probably generalizes to both legs, xplatform at the c++ design level
i.e. binary modularity
taxilian 12:11 I'm open to suggestions for improving binary modularity; so far I haven't seen any solutions that would completely solve the problem, and a halfway solution doesn't buy much
ax server isn't a viable solution for anything outside of the ax leg, of course
JuanDaugherty 12:11 well it's a conceptual matter
you have to conceive in terms of your design of a c++ binary modularity which doesn't as such exist xplaform but which your project practically implements
binary modularity doesn't imply any xplatform binary compatibility
it's just a principle
taxilian 12:11 right
I haven't seen a way of doing that in such a way that pluginauto wouldn't be required
JuanDaugherty 12:11 which is probably better support on Windows than anywhere else
the idea of binary separation of specific plugins from the generic fb shared object is straightforward
taxilian 12:11 this is a very, very old argument
JuanDaugherty 12:11 which I missed, but no matter.
taxilian 12:11 but suffice it to say right now (since I don't have time to point out all the reasons that it *isn't* actually straightforward) that it's more complicated than it seems from an outside glance and that I would love to do it if someone can come up with a full solution that will solve all of the challenges
so if you want to write up a proposal I'd love to see it =]
JuanDaugherty 12:11 well I'm taking a little longer to do something like that for the job I have in process as mentioned, but I'm only focused on that Windows-centric thing.
taxilian 12:11 the fundamental problems stem from the configuration done by cmake that is needed; resource files, rgs files, other resources needed on other platforms, etc
you could seperate out a lot, but at the end of the day you'd still have to build something with PluginAuto in it
JuanDaugherty 12:11 I can't share the sources without the clients approval but you have access to the binary page and of course I'll answer any questions.
well for that matter on Windows, right now, you could just make PluginAuto dynamic/shared instead of static
i mean if a body wanted to do that
is it "body" or "bonny"?
break off core from the project(s)
taxilian 12:11 hmm. that is an interesting possibility I don't think it solves the issue still, though, because the loader is where all the string resources have to be
the actual plugin DLL
all of the core projects could be dynamic libs, but there are a lot of weird challenges with using DLLs so I have avoided it thus far
JuanDaugherty 12:11 yeah, remember I'm ancient, I say all that stuff (the first IBM/MS dlls) from it's inception
so have a little diff perspective
*I saw
(when I worked at IBM Boca as a contractor in late 80s)
taxilian 12:11 as I said, though, it still doesn't solve the issue that on some platforms you have to have the string resources (.rc file) linked on the core plugin DLL
so dynamically linking in the PluginAuto stuff wouldn't help
JuanDaugherty 12:11 did you every operate my plugin?
taxilian 12:11 I haven't, no
I've been crazy swamped lately
and it doesn't seem to be letting up
JuanDaugherty 12:11 tell me about it!
taxilian 12:11 also I normally work on Mac, so I'd have to pull up a VM or another computer to install your plugin
JuanDaugherty 12:11 anyway, recall it has a lot of custom resources
taxilian 12:11 I do remember that
JuanDaugherty 12:11 it's GUI intensive
our minds work somewhat oppositely. You're big on limits, don't do this, don't do that. Each person can have their own mind style, and what matters is that useful work is produced and base FB is useful, adds value to what I'm selling this client.
I'm comfortable with its quality level for that.
taxilian 12:11 it's more that I'm looking from a framework perspective
I won't recommend doing something that either a) I have had a poor experience in the past or b) I don't consider to be maintainable long-term from a framework perspective
it's the difference between approaching it from an individual developer perspective or the project manager of the framework