tekito Level: Trainee
 Registered: 25-06-2008 Posts: 2
|
Class Modules and Arrays
I am new to class modules and am having some difficulty. Here is a description of the problem.
First off, I created a simple class, which was basically an array with some typical properties (like Sum, Max). So, if I am using an instance A of the class and changing an element of the array, with my conventions it would look like A.Elt(i) = 6.
Next off, I want to create another class, which has these arrays as properties. As expected, I can do this by declaring the first class as public variables in the class module. (So now, for an instance B of this class, editing the elements would look like B.A.Elt(i) = 6). However, this class is going use A LOT of these arrays, and in fact they need to be in an array, for indexing purposes and simplicity of programming. However, VB6 will not let you declare public arrays in a class module. I am aware that I could declare an array as a private variable, but then I see no way to reference or directly edit the first class and its elements from "the outside". In other words I cannot think of a way for B.A.Elt(i) = 6 to work if class A is not declared as a public variable in class B.
Very confused, any help would be appreciated. Let me know if clarification is needed.
|