After many requests for this feature, I have decided to implement it.
You can now create arrays of objects and access the object's properties and methods very easily.
Here is a little I used for testing, I have also included a example showing the differences between array of objects and array of structures, they are accessed a little differently.
I hope you guys like it.
You can now create arrays of objects and access the object's properties and methods very easily.
Here is a little I used for testing, I have also included a example showing the differences between array of objects and array of structures, they are accessed a little differently.
- Code:
#class TObj
Public(a$, b$);
public proc test(z$);
ShowMessage(a$+","+z$);
end;
#endclass
proc main
// Array of Objects
dim(o$, 3);
for (i$, 0, 2);
#object TObj n$;
o$[i$] = &n;$;
end;
for (i$, 0, 2);
o$[i$].a$ = i$+1;
o$[i$].test(i$);
end;
// Array of structures
struct(s$, "a", "b");
tdim(s$, 3);
for (i$, 0, 2);
s.a$[i$] = i$;
end;
for (i$, 0, 2);
ShowMessage(s.a$[i$]);
end;
end;
I hope you guys like it.