I've made a type, like this:
Which contains patient data, and a bunch of exams for that patient - there could be any number of exams.
When I try populate the instance, I get a exception when I try initialise the first ULexam() - ArrayIndexOutOfBounds.
I understand the error occurs as PatAndExams.ULexam(0) does not exist yet. How can I create ULexam(0) and subsequent exams in that array in order that they can be initialised?
Thanks
B4X:
Type ThisPatExamsForUpload (ULpat As PatientStruct, ULexam() As Exam)
Which contains patient data, and a bunch of exams for that patient - there could be any number of exams.
When I try populate the instance, I get a exception when I try initialise the first ULexam() - ArrayIndexOutOfBounds.
B4X:
PatAndExams.ULexam(j).Initialize
PatAndExams.ULexam(j) = exm
I understand the error occurs as PatAndExams.ULexam(0) does not exist yet. How can I create ULexam(0) and subsequent exams in that array in order that they can be initialised?
Thanks