Re: Including Array of Objects Within an Object

2006-04-02 Thread JohnAvery
On Apr 1, 2006, at 8:10 PM, Kirt Cathey wrote: Also, why the -1 for count number declaration? To save on memory allocation? That is just a syntax that initializes an array to null. The first append will be element 0. The statements below are exactly equivalent in that regard: dim my

Re: Including Array of Objects Within an Object

2006-04-02 Thread Charles Yeomans
The first element of a REALbasic array has index 0. So to declare an empty array, you set its upper bound to -1. The UBound function returns the index of the last element of the array. Thus an array has 1 + Ubound(theArray) elements. Charles Yeomans On Apr 1, 2006, at 11:10 PM, Kirt Cath

Re: Including Array of Objects Within an Object

2006-04-02 Thread Charles Yeomans
Indeed it is. Whether or not you choose to expose the array itself is another question -- in the long run, I recommend not doing so -- but getting started is this simple. Charles Yeomans On Apr 1, 2006, at 11:09 PM, Kirt Cathey wrote: John, Thanks alot. Just to confirm: in RB (too) it is

Re: Including Array of Objects Within an Object

2006-04-02 Thread Russ Jones
On Apr 1, 2006, at 11:10 PM, Kirt Cathey wrote: Also, why the -1 for count number declaration? To save on memory allocation? RB arrays extend from element 0 to an upper bound, which can be found at run time by the UBound method. If you declare an array with (0) it isn't empty - it actual

Re: Including Array of Objects Within an Object

2006-04-01 Thread Kirt Cathey
Also, why the -1 for count number declaration? To save on memory allocation? Thanks, Kirt 2006/4/2, Kirt Cathey <[EMAIL PROTECTED]>: > John, > > Thanks alot. Just to confirm: in RB (too) it is as simple as declaring > an array of another object/class within a class? > > Thanks again. > > -Kirt >

Re: Including Array of Objects Within an Object

2006-04-01 Thread Kirt Cathey
John, Thanks alot. Just to confirm: in RB (too) it is as simple as declaring an array of another object/class within a class? Thanks again. -Kirt 2006/4/2, JohnAvery <[EMAIL PROTECTED]>: > > On Apr 1, 2006, at 5:02 PM, Kirt Cathey wrote: > > > Hi All. > > > > Have been using RB for about six mo

Re: Including Array of Objects Within an Object

2006-04-01 Thread JohnAvery
On Apr 1, 2006, at 5: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 stu

Re: Including Array of Objects Within an Object

2006-04-01 Thread Russ Jones
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 myE

Including Array of Objects Within an Object

2006-04-01 Thread Kirt Cathey
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 Entit