[Mono-list] Gecko.WebControl and the Public Events
gooogle at free.fr
Sat Feb 23 21:53:23 EST 2008
I'm currently using Gecko.WebControl class to do a little Brower.
I successfully did it and my application work. But only for a single
So i would like to do like firefox: have tab page when i click center on
link, but it's now i have 2 problems with events.
1 - DomMouseClick and all the Dom* Events : how to use it ? when i had
the handler, this works : it jump to my function on_webCtrl_DomMouseClick.
/this.webCtrl.DomMouseClick += new
but i have always this kind of errors when i click on the webcontrol :
Unhandled Exception: System.InvalidCastException: Cannot cast from
source type to destination type.
at Gecko.WebControl.DomMouseClickSignalCallback (IntPtr arg0, IntPtr
arg1, IntPtr gch) [0x00000]
at (wrapper native-to-managed)
at (wrapper managed-to-native) Gtk.Application:gtk_main ()
at Gtk.Application.Run () [0x00000]
at BrowserSharp.Driver..ctor (System.String args) [0x001b1] in
at BrowserSharp.Driver.Main (System.String args) [0x00000] in
In fact, i don't know at all how use the Dom* Events because i each time
have this error. What i have to do ? Is it the good way to get the click
event on the webcontrol ? because even if i had the GTK handler
ButtonPressEvent to my webcontrol, it's still don't work...
this.webCtrl.ButtonPressEvent += new
(i never go to my method on_webCtrl_ButtonPress)
So that why i supposed i have to get the dom event to able to get it.
2 - how does work the NewWindow Event for WebControl ?
when i had handler to it, it's works (i go to my method):
this.webCtrl.NewWindow += new NewWindowHandler(on_webCtrl_NewWindow);
But what can i do here ? What i'm suppose to do here ?
I saw it exist a NewEmbed field in the NewWindowArgs, but i can't get it
(on Mono Documentation, it's told : **
Documentation for this section has not yet been entered.
So how can i use it ? Do i have to create a new WebControl to put the
new Window ? how can i tell the first webcontrol to don't go to the new
link ? Do a WebControl manager many pages ?
To begin this work, i found on the mono site this link:
but it doesn't mention how to use DOM...
Thank to read me,
Jérôme Martin (GOoOGle)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-list