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

IRC Nick Time (GMT-7) Message
emicastro 05:11 good morning...
FireBreathBot 05:11 emicastro: 21 Nov 21:48Z <taxilian> tell emicastro when you change any of your cmake files you need to rerun the prep script
emicastro 05:11 How I uninstall an plugin from my browser?
on windows
emicastro 07:11 How I uninstall an plugin from my IE?
I run regsvr32 /u and still having the plugin
emicastro 07:11 is someone here?
I have a problem
:s
linearray 07:11 what's up
emicastro 07:11 I can't delete a plugin from IE 8
I did a plugin that it registered to a content-type
linearray 07:11 don't know anything about it, sorry
emicastro 07:11 and... I can't unregister the dll... the plugin still wake up when an content-type is recognize :S
I hate IE :S
emicastro 08:11 problem resolved
taxilian 09:11 good morning all
linearray 09:11 hi
taxilian 09:11 btw, I'll be out and away from internet Wed-Fri
ssdc 10:11 hello - couldn't find much information around this - but let's say I have a JsObjectPtr as a callback - it looks like I execute said callback by calling callback->InvokeAsync("", some_object);
how do I pass back a JSON structure?
taxilian 10:11 replace some_object with a FB::VariantArray
VariantList, that is
ssdc 10:11 I have a VariantMap ...
taxilian 10:11 the VariantList can contain a VariantMap or whatever else
do you actually want to return JSON, or do you want to return a data structure?
ssdc 10:11 well - json
can I wrap said VariantMap using FB::variant_list_of?
taxilian 10:11 so you want to actually return a string?
because json is a string
ssdc 10:11 sorry ... json - not as a string
taxilian 10:11 okay, let's clear up a quick misconception
ssdc 10:11 but the data structure
taxilian 10:11 there is no such thing as json not as a string
json *is* a string
JavaScript Object Notation — json
ssdc 10:11 yes
taxilian 10:11 meaning a string that can be interpreted as a javascript object
so you want a data structure
not json at all
ssdc 10:11 thanks for the educational tip - yes, data structure then
taxilian 10:11 so if you want an array, use a VariantList, if you want an object (key/value) use a VariantMap
ssdc 10:11 right - which is where I'm at now - I have the VariantMap
taxilian 10:11 and yes you can return any of those (or any other type that javascript understands) using FB::variant_list_of
leaving me to ask: if you already thought you knew, why didn't you just try it?
ssdc 10:11 umm ... because I get compilation errors when doing it
so - I call the FB::jsonToVariantValue(std::string)
which returns a variant value BUT looking at the source is actually the VariantMap based on the string passed in
I pass that along to the variant_list_of<>
get this error: "Cannot resolve overloaded function 'variant_list_of' from context"
taxilian 10:11 what is the code line that is on?
ssdc 10:11 not sure what you mean ... here's the code though:
m_updateCallback->InvokeAsync("", FB::variant_list_of<FB::jsonToVariantValue(json)>);
json is of type std::string
taxilian 10:11 that should be:
m_updateCallback->InvokeAsync("", FB::variant_list_of(FB::jsonToVariantValue(json)));
though if you have it in actual json format you may want to consider sending it to the page as a string because it will be more efficient
ssdc 10:11 ahh ... ok
thanks - compiles
taxilian 10:11 you can't ever pass parameters using < >
also there are examples of all of this in FBTestPlugin
ssdc 10:11 yup - I was using that example - typo on my part
taxilian 10:11 happens =]
now you know
ssdc 10:11 thanks
taxilian 10:11 and to have multiple arguments you'd do FB::variant_list_of(json)(5)(true);
etc
ssdc 10:11 thanks for the tip
taxilian 10:11 please feel free to update the website to clarify things that weren't immediately clear to you
linearray 10:11 when there are multiple instances of my plugin, is the browserhost the same?
taxilian 10:11 no
one host per plugin instance
linearray 10:11 k
is there any common object between multiple instances?
taxilian 10:11 there is no reason you can't create one
that's why you have StaticInitialize and StaticDeinitialize
I do it all the time
huh. we're over 10K hits in the last month on the website
wow… and the weekly average is pushing up over 400 / day
for weekdays
linearray 10:11 is there anyone who does not create new projects with fbgen?
taxilian 10:11 I doubt it
linearray 10:11 except maybe someone who may have started before it was available
taxilian 10:11 it seems foolish
lol. that would be… well, me. and maybe Georg, if he had time. we would both use fbgen...
fbgen has been around far longer than this chat room
linearray 10:11 and you both wouldn't need to read the wiki page I'm currently editing ;)
taxilian 10:11 I threw that together to appease the people who complained about needing python
some day I'll finish the web version
it will be way cooler
linearray 11:11 you appeased the python haters by writing a python script?
taxilian 11:11 no, I didn't write fbgen actually
I wrote the wiki page on creating a project without fbgen for those people
linearray 11:11 ahh ok
taxilian 11:11 the ironic thing is that the two who wrote fbgen don't actually use firebreath themselves
though they both work for the same company, which does… but it didn't then
they did it mostly as a favor for me
and I think it's probably the biggest help for picking up FireBreath
linearray 11:11 I'm also thinking about renaming classes in BasicMediaPlayer... it confuses the hell out of me that the API has the same name as the plugin
taxilian 11:11 feel free =]
BasicMediaPlayer really should be refactored into two different examples
because it is currently two completely unrelated examples
linearray 11:11 one more thing: what is it about having multiple JSAPIs. how and why would I do that?
taxilian 11:11 how? simply by creating a new JSAPI object instance and returning it as a result
and why? because you want multiple objects
lots of reasons
perhaps you are creating a database abstraction? you return an instance from .createDatabase("some param")
or you just want to organize things heirerchally
plugin().math.add(1,4)
linearray 11:11 where is that returned? Forgive my ignorance, I use JS very lightly yet.
taxilian 11:11 from a method or property
just return a JSAPIPtr
linearray 11:11 i see
Root JSAPI Object - This is the particular JSAPI object that provides the fundamental JavaScript interface for your plugin. Whenever JavaScript calls methods or properties on your plugin object, it will go through this class.
even when I returned a different JSAPI in a previous method call?
taxilian 11:11 document.getElementById("plugin") will always use the root JSAPI object
if you call a method and it returns a different object then you can call methods / properties on that object
linearray 11:11 ah cool
taxilian 11:11 but that doesn't replace the value of the main plugin element
so plugin().math may return a JSAPIPtr and then you can use var a = plugin().math; a.doSomething()
and a is the other object
but plugin() will not change
linearray 11:11 jira editor just freezed on me
had to emergency save hehe
taxilian 11:11 :-/
linearray 11:11 so if I get this correctly global and static variables are not reset when the last instance is shut down, they get reset when the plugin process is destroyed and recreated and that is completely up to the browser
taxilian 11:11 yep
and that has changed since this document was originally written; it used to be that deinitialize was reference counted
may want to add that the plugin's shutdown() method will be called before the destructor is called
linearray 12:11 Process state variables like the "Current Working Directory" and such could change without any notice!
why would that be?
emicastro 12:11 Is possible emit a signal like (CONTROL + W) -> to close a tab in firefox for example... from my plugin to windows?
linearray 12:11 IIRC you can only do what javascript can do, and that would be window.close()
taxilian 12:11 emicastro: you can possibly do it using windows APIs
system APIs, anyway
linearray: the reason that process state variables such as cwd may change without notice is that we don't own the process
it isn't ours
so something else in the process could change it
linearray 12:11 hm ok
taxilian 12:11 this is far less likely when using IPC plugins, but still better to assume that may be the case
I appreciate you touching up that page, though; I think you've clarified some things
linearray 12:11 good to hear
emicastro 13:11 taxilian: you're right... I did it with WinAPI
now... there is a method in firebreath to redirect to some page?
taxilian 13:11 whether or not that's 100% effective is another question; there may be cases where you don't have the focus correct or something
but you can try it
hmm. actually, there kinda is
!find navigate
FireBreathBot 13:11 Could not find any tags matching navigate
taxilian 13:11 !find Navigate
FireBreathBot 13:11 Found 3 possible matches. Displaying 3
/^void FB::ActiveX::ActiveXBrowserHost::Navigate( const std::string& url, const std::string& target )$/ (f) found in src/ActiveXCore/ActiveXBrowserHost.cpp: http://goo.gl/fiNiP
/^void FB::Npapi::NpapiBrowserHost::Navigate( const std::string& url, const std::string& target )$/ (f) found in src/NpapiCore/NpapiBrowserHost.cpp: http://goo.gl/AMLjZ
/^ virtual void Navigate(const std::string& url, const std::string& target) {};$/ (f) found in src/ScriptingCore/BrowserHost.h: http://goo.gl/fnTn2
taxilian 13:11 you can probably use Navigate with _self as the target
maoDominica 13:11 hello, it is possible create a Login window inside a PlugIN to be rendered in the HTML page?
taxilian 13:11 I'm not sure I understand your question
why don't you explain what you're trying to accomplish
maoDominica 13:11 The idea is to create a window and hook it up into the page so we can manage the authentication process inside the plugIn logic.
taxilian 13:11 hmm. Well, you can draw into a web page
in a plugin
in the object tag
but if you want to use HTML, you either have to embed a web browser or do the html in the page and call APIs from the plugin
so according to the server logs, firebreath.org has had 2200 unique visitors in the last week
not including crawlers
linearray 13:11 does that include visitors that hit cloudfare?
taxilian 13:11 those stats are from cloudflare
their stats will now be more reliable than anything I have on my server or with google analytics
maoDominica 13:11 Ok, but it could be feasible to draw it from the plugIN? in order to avoid javascript injection and to handle some other logic behind this authentication?
taxilian 13:11 maoDominica: you can certainly draw in the plugin; flash is itself a plugin, and it draws
it may be a pain in the neck, and you may have to do it differently on each platform
but you can certainly do it
linearray 13:11 isn't that a case for WebView?
taxilian 13:11 potentially, yes. maoDominica: there is a library called WebView which is completely undocumented but seems to be working that you can use to embed a web browser in your plugin
however, on Mac you wont' currently get the text cursor in your text fields
and I don't know how to fix it
maoDominica 13:11 thaks for the answer.
linearray 16:11 do you think it would make sense to auto-generate JS stubs for API functions?
taxilian 16:11 not sure I follow
linearray 16:11 I wonder if it's possible to automatically generate a FBControl.html for a project
just a development aid
taxilian 16:11 I think we could definitely improve it
the one that is there is pathetic
it even still says "ATL" in the title
linearray 16:11 There already is such a thing? I think I copied my test html page over from FBTestPlugin
taxilian 16:11 look at FBControl.htm
in gen_templates/
linearray 16:11 I see, that's generated at cmake time, right?
taxilian 16:11 yes
heh. I just ordered a movie, then went to a torrent site and am downloading a high quality rip because I want it tomorrow for a car trip with my kids… am I a bad person? :-P
'cause I bet the RIAA would think I am
linearray 16:11 MPAA that is
now go and delete those log files
:)
taxilian 16:11 yeah, whichever that is
you know, I would buy a lot more movies if I could buy it DRM-free and then burn a DVD copy to use with my dvd player
and I buy a whole lot more books than I would if I didn't know how to remove the DRM from them
it really annoys me how hard these companies work to keep me from being able to conveniently use things that I'm willing to pay for
linearray 16:11 yeah, it's a mess
I just stopped consuming entertainment, because I don't really have time anyway
taxilian 16:11 hehe. well, when you have a 2-year old and you're planning an 8 hour car trip....
linearray 16:11 sure
where you going?
taxilian 16:11 just to my wife's mother's parents' house
thanksgiving family get-together
linearray 16:11 ah right, thanksgiving
taxilian 16:11 we haven't actually done thanksgiving with this group yet since we got married
and since they live so far away, they've never met my children
I have only met them at our wedding
so this year we decided we should go
linearray 16:11 have fun then
taxilian 16:11 they live in Idaho… on a farm… far enough away from anything that I don't know if I'll even get internet on my cell phone, though close enough that I *think* I should have cell service
linearray 16:11 hehe time to get an old analog modem from the basement
taxilian 16:11 you think you're joking… that's what they use for email is an old free dialup email service called Juno
linearray 16:11 do you have 3g network coverage maps?
http://www.wireless.att.com/coverageviewer/ idaho looks a bit deserted
taxilian 16:11 yes it does, doesn't it
there is coverage in the area I'll be in, except I won't actually be in the city
I'll be a ways outside
and I don't know exactly where
so I may have 3g and 3g data, but I may not
linearray 17:11 hiberlite looks interesting
JusticeDefender 22:11 Hello, anybody at home ?