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

IRC Nick Time (GMT-7) Message
FireBreathBot 09:06 Commit 45dfb5b on master by dougma: "try to avert issues like FB-182
Commit 71935a6 on master by Richard Bateman: "Merge pull request #69 from dougma/FB-182
FireBreathBot 10:06 Commit 1e0e681 on master by dougma: "fix for FIREBREATH-177
Commit 96d23bf on master by Richard Bateman: "Merge pull request #70 from dougma/FB-177
PauloMarcio 12:06 taxilian: I'm curious, why is JSAPIAuto::setReserved necessary? If I call registerMethod or registerProperty to register what I want, why do I have to exclude what I do not want?
taxilian 12:06 because FireBreath tries to make JSAPI objects behave as much like real javascript objects as possible
which means that if you assign plugin().someVariable = "Foo"; that should work
the problem with that is that to do that FireBreath has to basically tell the browser that all arbitrary properties are supported
that's a good thing with a raw JSAPI object, but it gets a little bit trickier when it's wrapped in an object tag which is also an HTML element and some things are handled by the plugin and others are handled by the browser
PauloMarcio 12:06 hum
taxilian 12:06 the proposed fix is to enumerate all properties on the html element just before activating the JSAPI object and thus automatically detect anything that should be reserved
PauloMarcio 12:06 yeah I see
taxilian 12:06 but I haven't had time (or a good enough reason) to do that
you're welcome to if you'd like =]
PauloMarcio 12:06 hum... nice to know
do you have any idea how to do that?
taxilian 12:06 I have a rough idea
but I'd have to really look at it
the main trick is that you'd have to do it before the JSAPI object started responding "true" to arbitrary property requests
PauloMarcio 12:06 so it's not 100%, setReserved would still be necessary
?
taxilian 12:06 setReserved would be neccesary, but it would be called automatically on startup for anything that it needed to be called for
PauloMarcio 12:06 well, I try something and if I succeed I'll let u know... tnx for this awesome framework
taxilian 12:06 good luck
PauloMarcio 12:06 ;)
Oxy 16:06 Anyone here?
Guest10488 16:06 Anyone here?
Hello?
Thought this was the place where people could get help with Firebreath
chris7777 16:06 Taxi you on?
taxilian 16:06 I'm here
chris7777 16:06 Do you have a minute to lend me some help?
taxilian 16:06 though in case you're not familiar with irc, typing thef ull nick is more useful; it would actually show me a visible message if the window weren't visible
possible
whats up?
chris7777 16:06 Oh ok, I'm very new to coding browser plugins, and I'm having a little trouble understanding exactly how to draw on windows
taxilian 16:06 do you know how to draw on windows? like, in a normal windows app?
with an HWND?
chris7777 16:06 I'm specifically stuck at getHWND
Not at all, lol
Sorry I'm really a beginner, last time I coded was a few years ago and that was XML/HTML (and also some Visual Basic)
http://colonelpanic.net/2010/11/firebreath-tips-drawing-on-windows/
I'm following that
thef ull nick
Hmm, are you busy at the moment?
I could also hire you if you're interested
taxilian 16:06 sorry, my internet connection is really in and out right now
chris7777 17:06 Ah, it's ok
taxilian 17:06 I'm so busy I've stopped even offering ridiculous rates for my services and just stopped accepting contracts, I'm afraid
what exactly are you trying to draw?
chris7777 17:06 Oh ok, I'm trying to (not sure if I'm phrasing this correctly) draw a picture/image into the browser/plugin
taxilian 17:06 just a bitmap, basically?
there is a gist linked to from the tips and tricks page for doing that
chris7777 17:06 Yeah but it's not really step by step, it's written as if the person who wrote it assumed everyone who would be reading it already have a good amount of experience in coding
taxilian 17:06 well, it was actually written to be used
and then provided by me as an example (we use it here)
look at FBTestPlugin as well for examples
bascially you get an AttachedEvent when the window is created; you set up a handler for that in your .h file (set up by default in the fbgen template)
DetachedEvent is when you lose the window
you can only use the window between those two points
chris7777 17:06 Ok
Where can I find the FBTestPlugin?
taxilian 17:06 in the firebreath source tree
under examples
chris7777 17:06 Found it, thanks
Ok so
What exactly is HWND? Do I have to write code for it to actually get the HWND?
That's the main thing I'm confused about
taxilian 17:06 the HWND is given to you, but I don't have time at the moment to teach you how windows software development works
I recommend doing some google searches on the subject
chris7777 17:06 "Once you have your PluginWindowWin object, you can get the information you need to do the actual drawing with a few functions:"
taxilian 17:06 HWND is the handle for a window
chris7777 17:06 And then it says
taxilian 17:06 that expects that you know how to draw on windows to start with
chris7777 17:06 "getHWND() – returns the HWND assigned to the browser plugin"
Yeah that's exactly what I was saying earlier lol
That it was written as if I was expected to already know how to do most of this stuff
taxilian 17:06 bascially if you don't understand what that means then you need to do some research and learn how drawing on windows works in a basic way; FireBreath tries to demystify the browser interface, but there is really only so much we can do
you'll have to learn, I guess =] I wish I had more time that I could help you, but I need to leave now. google is your friend
chris7777 17:06 I understand
Ok thanks for your time
taxilian 17:06 good luck
chris7777 17:06 Ttyl, cya
Thanks
Guest13737 17:06 hello, i have a very simple question.
how do I return a string value back to javascript through a variable passed into FB as a parameter
Guest13737 17:06 int ReconAPI::readData(const FB::variant& msg ) for example
is that the correct type for returning a value back to JS through variable msg
Guest13737 17:06 just found this thread -> https://groups.google.com/forum/?fromgroups#!msg/firebreath-dev/HLdy8_PoK1w/lSV6Zh40O2MJ
johannes 17:06 why do you want to return it by reference, not as return value? std::string ReconAPI::readData() { return "foobar"; } ?
Guest13737 17:06 it doesnt look like you can pass a string by reference
i wanted to return an error code in the return value
johannes 17:06 in case of errorß
Guest13737 17:06 i think I would have to set a property in an obj i pass to the plugin
johannes 17:06 ?
Guest13737 17:06 yes in case of error
johannes 18:06 you could return an FB::variant and then in case of success a string and in case of error an object describing the error
Guest13737 18:06 right, and just check the type coming back.
thats not too bad
thanks
what C++ type would I return to result in an object in JS?
I mean what type do I pass to veriant
variant
johannes 18:06 I'd use a FB::VariantList or FB::VariantMap
http://www.firebreath.org/display/documentation/classVariantList