Howdy everyone,

While there are other ways I could go about this, I wanted to see if this
was possible:
* I have a custom class (MyClass), with a property defined as: ARectControl
as rectcontrol
* A module (Module1) with a global property array defined as:
MyClassArray(-1)

In a window there's a Listbox1, and a method (that's supposed to) make a new
instance of MyClass, and copy/append the listbox instance of the window into
the module's MyClassArray. (BTW: I have the ARectControl property defined as
a RectControl so I could pass it a listbox, canvas, or whatever). Here's the
basic part of the method to copy it that's called by a pushbutton in the
window:

Dim aNewMyClass as new MyClass
ANewMyClass.ARectControl = listbox1
Module1.MyClassArray.append aNewMyClass

--
This compiles, but doesn't work how I'm wanting it to. Mainly, when I change
the listbox1's contents, and try to have it copy it into a new index of the
module1.myclassarray; and then read it back from the array, it just seems to
have a blank copy of the listbox. If I were to append 5 copies to the array,
and then try to read some data from the listbox back from each index, they
would all be blank - except the last-added index (which comes back as
expected).

I'm guessing it has something to do with passing the listbox/rectcontrol to
the module.myclassarray.append incorrectly? Each time the button is pushed
to append a new listbox/rectcontrol it goes out of scope after the method
ends...but why is the last index of the array actually working? Not sure if
I got the idea down, but hopefully enough for someone to offer some
advice...thanks :)

Chad


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to