Re: ShowDialog and ArrayList?
From: Jonathan Allen (x_at_x.x)
Date: 09/26/04
- Next message: Jonathan Allen: "Re: .NET email"
- Previous message: Jonathan Allen: "Re: If not the registy, then what?"
- In reply to: Strahimir Antoljak: "ShowDialog and ArrayList?"
- Next in thread: Strahimir Antoljak: "Re: ShowDialog and ArrayList?"
- Reply: Strahimir Antoljak: "Re: ShowDialog and ArrayList?"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 26 Sep 2004 09:36:09 -0700
1. Add a watch for the array.
2. Step through the code until you find the moment that the array is
changed.
-- Jonathan Allen "Strahimir Antoljak" <strah@netzero.net> wrote in message news:eYJCGZXoEHA.3392@TK2MSFTNGP15.phx.gbl... > I keep an ArrayList in the external class. The external class is passed into > a form via New constructor (see below). I process some data with functions > within the form before showing the form. I populate the array contained in > the passed class, then I show the form modally (frm.ShowDialog) so the user > can interact, and when the user closes the form, the array is emtpy. > Why?????? > I check the Count property before, and after the showing the form and when I > close the form this empties array? Any idea? Help!! > > Debug.WriteLine(en.alAnM.Count) ---> gives e.g. 16 > Dim eResult As DialogResult = Me.ShowDialog > If eResult = DialogResult.Cancel Then > Exit Function > End If > Debug.WriteLine(en.alAnM.Count) ------> gives 0 !? > > > The array list alAnM is stored in the class within another project within > common solution (sln). Why the ShowDialog procedure empties array? > > > > > > Public Sub New(ByRef _en As MyClass) > MyBase.New() > 'This call is required by the Windows Form Designer. > InitializeComponent() > en = _en > End Sub > > Private en as MyClass > > > > > -- > Strah @ Langan > >
- Next message: Jonathan Allen: "Re: .NET email"
- Previous message: Jonathan Allen: "Re: If not the registy, then what?"
- In reply to: Strahimir Antoljak: "ShowDialog and ArrayList?"
- Next in thread: Strahimir Antoljak: "Re: ShowDialog and ArrayList?"
- Reply: Strahimir Antoljak: "Re: ShowDialog and ArrayList?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|