[Mono-list] Gtk objects

Tomas Olofsson hobbe at acc.umu.se
Sat Apr 1 10:10:34 EST 2006

Thanks for the help, I tried to use

Gtk.Application.Invoke (delegate {
    statusbar.Push(1, "Done");

just to see if it worked in a method not called by the gui-thread, but I 
get an exception:
Unhandled Exception: System.NullReferenceException: Object reference not 
set to an instance of an object
in <0x00083> ClientGUI:ShowSearchResults ()
Is there something else I must do to make Invoke work more than the 2 
lines above?

On Fri, 31 Mar 2006, Mario Carrión wrote:

> On 3/31/06, Tomas Olofsson <hobbe at acc.umu.se> wrote:
> Hi

> I'm writing a client/server application and have divided the client in two
> classes. I have a gui-class and a functional-class.
> I have a big problem that I can't access and change the gtk object properties
> from the functional class, the program just "hangs" on the codeline and
> doesn't do anything. I can change "regular" variables
> like strings, int, double and so on but gtk objects don't respond.
> I have tried to set the gtk objects to public and also fetch them with
> set- and get-methods.
> Does anyone have an idea of what I have done wrong?
If you are changing from another Thread different than main see the
Responsive Applications article[1] for getting a solution.

[1] http://www.mono-project.com/Responsive_Applications

Mario Carrión <mario.carrion at gmail.com>

Thomas Olofsson
hobbe at acc.umu.se


More information about the Mono-list mailing list