I need some direction on how to send a array to a container control. This is what I have now:
I have a window1 that has been passed an array in a class of arrays or: Arrays.VentilationPrefsArray(day,i)
Since this will be byRef it should point back to the original.
Next I clone that byRef array:
for day = 1 to 7 for i = 0 to 7 Rem 8 values to work with // clone array because it was a pointer, enter new values and clone back when saving ClonedVentArray(day,i)=Arrays.VentilationPrefsArray(day,i) next next
Now I create 7 containerConrtols, one for each day of the week to use in in window1:
var count as integer Rem create all container controls then hides them. They will be made visable when the associated day bottom is pressed for count = 0 to 6 inst_of_CCV(count) = new ContainerControlVentalation inst_of_CCV(count).EmbedWithin(Self, 0, 0) inst_of_CCV(count).WeekDayTag = count Rem assign day # to property "WeekDayTag" use to assign values to array elements ClonedVentArray(WeekDayTag,i) inst_of_CCV(count).hide Next
I would like to pass to each containerControl the byRef the cloned array. I will assume if I make a change to the cloned array in the containerControl it should be reflected in the cloned array held in a preference in window1.
Am I good so far?
I am not sure how to send the cloned array to the controlContainers and would like to try that since I have not been able to send values directly back to window1 cloned array from the containerControl without the containerControl in window1 going blank (Window1.ClonedVentArray(WeekDayTag,i) = me.value
). I'm not sure what causes that.