Hello all,
just making the vb--> c# switch so forgive me if I speak VB on some terms.
I have a tcp client/server app set up with remoting.
I have an arrayList of Officers as a singleton on the server with a method that returns the Officers:
I have an event handler that calls a refresh function:
I have a button click that calls the same function
here is the refresh function
ok. so there is the set up, sounds pretty straight forward.
on the button click:
refresh function is called and returns the ArrayList
then adds the text to the ListBox
on the messagerecieved event:
1. the refresh function is called
2. the ArrayList is filled (apparently the same as always)
3. the datagrid empties and acts like it is a null set
4. the debugger seems to never return to the MessageRecieved event.
5. the call to the listbox is never performed.
so, what am i missing?
any help would be appreciated
Bassguy
just making the vb--> c# switch so forgive me if I speak VB on some terms.
I have a tcp client/server app set up with remoting.
I have an arrayList of Officers as a singleton on the server with a method that returns the Officers:
Code:
public ArrayList GetOfficers()
{
return myofficers;
}
I have an event handler that calls a refresh function:
Code:
myClient.MessageReceived += new Client.MessageReceivedEventHandler( Client_MessageReceived );
private void Client_MessageReceived( object sender, EventArgs e )
{
RefreshIt();
this.listBox1.Items.Add("messaged");
}
I have a button click that calls the same function
Code:
private void button2_Click(object sender, System.EventArgs e)
{
RefreshIt();
this.listBox1.Items.Add("Clicked");
}
here is the refresh function
Code:
private void RefreshIt()
{
list=myServer.GetOfficers();
this.dataGrid1.DataSource=list;
}
ok. so there is the set up, sounds pretty straight forward.
on the button click:
refresh function is called and returns the ArrayList
then adds the text to the ListBox
on the messagerecieved event:
1. the refresh function is called
2. the ArrayList is filled (apparently the same as always)
3. the datagrid empties and acts like it is a null set
4. the debugger seems to never return to the MessageRecieved event.
5. the call to the listbox is never performed.
so, what am i missing?
any help would be appreciated
Bassguy