GeckoFX

Skybound

Skybound Software is looking to hire experienced C# developers to work on Stylizer and other forthcoming Skybound products. Click here for details.

GeckoFX is an open-source component which makes it easy to embed Mozilla Gecko (Firefox) into any .NET Windows Forms application. Written in clean, fully commented C#, GeckoFX is the perfect replacement for the default Internet Explorer-based WebBrowser control. Download GeckoFX @ Google Code >

GeckoFX is made by Skybound Software, authors of Stylizer—the professional CSS editor with a strong focus on visual control, error-free workflow, and productivity. Learn About Stylizer >

GeckoFX Forum

Discuss GeckoFX, the Open-Source Gecko Control for .NET

You are not logged in.

How to init an DomEvent using c#?

#1 January 23, 2010 8:52 AM

Peter
Member
Registered: January 19, 2010
Posts: 3

How to init an DomEvent using c#?

Hi Community,

i want to dispatch an Event from c#.


        public void fireEvent()
        {
            nsAString sEv = new nsAString("StreamEvent");
            nsAString name = new nsAString("PeterTest");
            nsAString data = new nsAString("VieleDaten");
            nsAString text = new nsAString("GuterText");

          nsIDOMStreamEvent streamEvent = Xpcom.QueryInterface<nsIDOMStreamEvent>(WebBrowser);
          streamEvent.initStreamEvent(sEv, true, false, name, data, text);
         
        }


Compiling works without error. But when i fireEvent()  the debugger tells me that my four nsAStrings are null objects and that i should use the new Operator, what i have actually done.

My Problem is that i dont know what i have to use for the queryinterface argument.

Xpcom.QueryInterface<nsIDOMStreamEvent>(WebBrowser);   ---> the WebBrowser is maybe not the correct argument.

Any ideas?

Thank you very much !

Offline

 

#2 February 25, 2010 12:41 PM

ukwebdev
Member
Registered: February 07, 2010
Posts: 4

Re: How to init an DomEvent using c#?

Peter, just found your post after I'd posted this: http://geckofx.org/viewtopic.php?id=784 I'm still looking into it now, but if you find a solution to your problem first please post it as I might be able to piggy back off it to figure out what I need to do.

Cheers,

JD.

Offline

 

Board footer