IRC Log Viewer » #firebreath » 2013-05-16

IRC Nick Time (GMT-7) Message
dougma 00:05 Ask away
gouri 00:05 I have to expose the C# classes from Javascript through Firebreath framework.Then How should I implement this? please provide the solution for the same and please let me know
taxilian 00:05 gouri I'm not sure why you think that asking the same question over and over in each medium is going to get a different answer
I've already answered that question 3 times in as many places
there is no pre-baked solution to do that
it's not trivial
it's not easy
gouri it's not that we don't want to help you, and I'm not trying to discourage you from looking for help, but you need to start solving the problem yourself
figure out one step at a time, then look for help on that particular step
rather than trying to find a solution that does the whole thing. that solution AFAIK doesn't exist
gouri 00:05 Ok. I have also created the wrapper for it . But each time when i call any method from C# in firebreath then it needs to be instantiated .then Is it Possible to create one centralized solution for wrapper instantiation in Fireabreath?
dougma 00:05 Its certainly outside the scope of firebreath
taxilian 00:05 I'm not sure I understand the question
you could instantiate your wrapper in staticinitialize and shut it down in staticdeinitialize
gouri 00:05 Suppose take an example like:
In C# in the class library,
public class DrawImage
another class
public class TestImage
public void ShowImage(DrawImage drawImage)
then I need to call this ShowImage(DrawImage drawImage) from Javascript through Firebreath. Then How should I implement this?
taxilian 00:05 I have no idea, because I don't have any idea how your bridge works
figure out how to call it from C++
when you know that, then calling that from javascript isn't hard
you arne't going to manage this without learning some c++
gouri 00:05 the Flow should be Javascript-->C++(Firebreath)-->C# and vice versa
taxilian 00:05 exactly
Javascript->C++ I can help you with
the C++ -> C# is your problem to solve
when you've solved that then we can help
gouri 00:05 ok.
taxilian 00:05 and now I am very very tired, so I'm headed to bed
good luck
gouri 00:05 ok thank you
gouri 01:05 I have done the changes for C#->C++CLI Wrapper but now I want to call that ShowImage(DrawImage drawImage) method form Javascript in Firebreath
then how should I implement method from Javascript in Firebreath?
dougma 01:05 gouri:
gouri 01:05 ok thank you
Not getting how to call that C# method from Javascript inFirebreath? please help me.
champikasam 01:05 Hi everyone
ran into a problem in my FireBreath plugin.
pratikp2891991 05:05 I'm getting an exception:::::
gouri 05:05 which exception
pratikp2891991 05:05 in building a simple addition of two integers application>>>newbie to firebreath
Unhandled exception at 0x75619617 (KernelBase.dll) in iexplore.exe
I got the browser handle from this link..!topic/firebreath-dev/4aMXWI94RzY and wrote it in the on WindowAttached event of the plugin.cpp file of the firebreath framework.then i got the plugin window handle by getHwnd()..
int DICOMAPI::PerformAddition(int a, int b) { IWrapIt *wrapIt=IWrapIt::CreateInstance(); HWND handler=getPlugin()->AttachedWindow;// wrapIt->SetHandle(handler); return wrapIt->PerformAddition(a,b); }
getting the exception at this line>>>wrapIt->SetHandle(handler); What seems to be the problem?
tonikitoo 08:05 guys, hi.
I am getting started with firebreath, and followed all steps explained in taxilian's dec/2012 video (for mac). At the last step, I can not seem to get my newly created plugin loaded by chrome or safari
any tip I could debug what might be causing it to fail to load?
reichi 08:05 taxillian: i'll keep the config.h in Mind!
taxilian 09:05 tonikitoo what platform?
diorcety 09:05 hi
taxilian: is it normal that at onPluginReady getDOMWindow is null?
taxilian 09:05 probably
though unfortunate
diorcety 09:05 :(
taxilian 09:05 it may vary depending on which browser you're on
diorcety 09:05 (on ie)
only with ActiceX
taxilian 09:05 ahh
not too surprising, but annoying
diorcety 10:05 maybe onPluginReady is called to early no? can we considerate that the plugin is ready if getDOMWindow return null ?
taxilian 10:05 that's worth considering; however, I dont' know how to fix the issue
I'll have to think on it a bit
diorcety 10:05 ok i understand
if you make
object.type ="application/stuff" and then appendChild(object) .. you haven't access to getDOMWindow
but if you make appendChild(object) and then object.type="application/stuff" it works
taxilian 10:05 yes
you should never ever ever set the type before putting it in the dom
honestly I recommend just using innerhtml
it seems to have fewer issues
diorcety 10:05 IE javascript engine is a crap
taxilian 10:05 yep
diorcety 10:05 lot lot memory leak
you remove the object
the object is retained somewhere
you don't know here ...
taxilian 10:05 there should be a way even in IE to prevent that
diorcety 10:05 i looked for ...
InPlaceDeactivate is called
taxilian 10:05 it'll be something in your javascript code
that is causing the memory leak
almost guaranteed
most likely related to a closure, possibly related to an event of some kind
diorcety 10:05
i talk about main plugin object
taxilian 10:05 yep, that would do it
add "var" before each variable the first time you use it in any given function
you're creating global variables left and right
and holding the reference
diorcety 10:05 ok let's see
taxilian 10:05 like
but note that this might not work; accessing the object in the same function with no wait after injecting into the DOM doesn't work on some browsers
that's why the onload event
diorcety 10:05 ok i add var
remove alert stuff
same thing :)
dcherman 10:05 any particular reason you're using an object tag instead of ActiveXObject?
could give that a shot and see if the getDOMWindow behavior differs.
taxilian 10:05 getDOMWindow doesn't work when you use ActiveXObject
I dont' think
dcherman 10:05 unless i'm remembering wrong, it worked when i used it to do FB::URI location( m_host->getDOMWindow()->getLocation() );
since i haven't gotten any bug reports from IE users that my plugin is horribly, horribly broken, im assuming it works =P