Subject: [Gtk-sharp-list] Gtk.Combo Entry.Activated pb

th3 m0nq th3m0nq at gmail.com
Sun Jul 17 13:33:35 EDT 2005


<snip>
> I try to use a combox, and i a System.NullReferenceException when try to set a event on the Combo.Entry.Activated.
> 
> Does anyone got an idea?
> 
> ConnectionCombo = new Combo ();
> 
> string[] pop = {"Foo", "Bar"};
> ConnectionCombo.PopdownStrings = pop;
> 
>  //  ConnectionCombo.DisableActivate ();
>  //  This Crash
> ConnectionCombo.Entry.Activated += new EventHandler (OnConnectionComboActivated);
> 
> hbox.PackStart (XboxsConnectionCombo, false, false, 10);
</snip>

I would assume you didn't properly initialize your ConnectionCombo.
Null references occur when you forget to initialize a reference, then
try to access it as though you were referencing an actual object.
Hope that helps.  Sorry I didn't reply properly the first time.


Adrian V.


More information about the Gtk-sharp-list mailing list