On Sat, May 5, 2012 at 9:12 AM, Travis <[email protected]> wrote:
> Ah, sorry for not being more understandable... hopefully this example
> I made in Java will help out. I want to this in CFML via assigning a
> super-component to child-components inside of an array.
>
The big difference between Java and CFML in this case is there is no sense
of a typed array. So you'd just do:
getSpeeds = [];
getSpeeds[1] = new m5();
getSpeeds[2] = new ferrari();
Then at that point my question is what do you want to output when you loop
over and call the speed() method on each object? The example you provided
in Java would call the method in the child object, just as it would in CFML
if you did this:
for (car in getSpeeds) {
car.speed();
}
Is that what you're after? I think you're losing me when you start talking
about arrays of the parent object. At that point I'm unclear as to what end
result you're trying to accomplish.
--
Matthew Woodward
[email protected]
http://blog.mattwoodward.com
identi.ca / Twitter: @mpwoodward
Please do not send me proprietary file formats such as Word, PowerPoint,
etc. as attachments.
http://www.gnu.org/philosophy/no-word-attachments.html
--
online documentation: http://openbd.org/manual/
google+ hints/tips: https://plus.google.com/115990347459711259462
http://groups.google.com/group/openbd?hl=en