Hi Kirt.
You can easily include an array of objects within another object, to
as many levels as you like.
One way is to include a Property in your parent window that is
initially empty, then populate it with new objects as required.
So the property would look like
myEntityArray(-1) as myEntity
Adding new instances of your "entity" class could be done with
myEntityArray.append new myEntity
for each new object.
Note that, in this language, what gets put in the array is a pointer
to the new object, not the object itself.
This is just one of many possible solutions, and you may well want to
embellish it if business entities expire, or whatever.
Have fun. RB makes this stuff pretty easy.
Russ
On Apr 1, 2006, at 8:02 PM, Kirt Cathey wrote:
Hi All.
Have been using RB for about six months now on quick one-off projects
and have not focused too much on the OOP benefits of the language. I
now have a project where I can take (more) advantage of this and
wanted to give it a try, but am stuck on one issue.
Have created a class called Entity -- as in business entity -- and
within each Entity class I need to include an array, or multiple
instances, of a Process class; then within each Process class, need to
include multiple instances of a Risk class.... and on and on.
How do I declare the Process class within Entity and allow for
multiple instances to be stored within Entity?
Thanks in advance for the help. Explanations are a great help, but if
a simple web link is available, will be very grateful.
Thank you.
--
Kirt Cathey
_______________________________________________
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>