[Gtk-sharp-list] How do i access my window object in a event?
mike.rhodes at gmail.com
Mon Oct 10 10:54:00 EDT 2005
You need to use (obj as Window).some_method or
((Window)obj).some_method. Otherwise I think it will try to cast
obj.some_method to type Window rather than just obj, which I guess is
why you are getting the exception.
Hope that helps,
On 10/10/05, Joeri Belis <joeri.belis at nollekens.be> wrote:
> I have the following event
> I know that object obj will be a window. How do i access the window
> properties and methods through this obj object?
> static void test1 (object obj, EventArgs args)
> // i tried
> // but got error about cast
> Gtk-sharp-list maillist - Gtk-sharp-list at lists.ximian.com
"Some cause happiness wherever they go;
others whenever they go" -- Oscar Wilde
More information about the Gtk-sharp-list