Lost Changes

  • Thread starter Thread starter Ken Kast
  • Start date Start date
K

Ken Kast

I have a Form f with a TextBox tbx. An event handler invokes
MyClass.Method1 (form, tbx). Method stores form in a ListArray A1, and
{tbx, tbx.Text} (as a structure) in another ListArray A2, both private
attributes of MyClass. Later on f invokes MyClass.Method2. Method2
retrieves f from A1and tbx from A2, finds tbx in f.Controls and sets Text in
that instantiation to Text in the stored version. In MyClass.Method2 this
all seems to be working fine. But after Method2 returns to f, tbx.Text
hasn't been changed.

Can someone tell me where or how the change gets lost?

Thanks.
 
Ken Kast said:
I have a Form f with a TextBox tbx. An event handler invokes
MyClass.Method1 (form, tbx). Method stores form in a ListArray A1, and
{tbx, tbx.Text} (as a structure) in another ListArray A2, both private
attributes of MyClass. Later on f invokes MyClass.Method2. Method2
retrieves f from A1and tbx from A2, finds tbx in f.Controls and sets Text
in that instantiation to Text in the stored version. In MyClass.Method2
this all seems to be working fine. But after Method2 returns to f,
tbx.Text hasn't been changed.

Can someone tell me where or how the change gets lost?

No. It'd be better if you provided a short but complete program[1] to show
your problem

1. http://www.yoda.arachsys.com/csharp/complete.html
 
Back
Top