Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
Wendy10 #1
how CFML handles object which contains another object?
How does ColdFusion take care of "has a" type of problems? I know "is a" is
taken care of by using "extends" key word in cfc. But now I have a cfc which
contains properties and functions for wheel, and I also have a cfc for truck,
and truck has 4 wheels. I would like to know if I can resue the wheel cfc in
truck cfc. Is it possible to have an array of wheel objects in truck object?
If so, how?
Thanks for any help.
Ping
Wendy10 Guest
-
Dynamically loading user control into Placeholder gives Object reference not set to an instance of an object
I've created user controls that contain listboxes that are dynamically populated from the database. In the html view of the user control... -
webservice.htc and custom object array. only first object is deserialized in the result.value
Hello I've been using webservice.htc for 6 months or so with great results. recently i came into the following problem that I am not sure how to... -
Strange error from: Dim myState As Object() = CType(savedState, Object())
Every book and every website I've seen that talks about how to save state for child controls in a composite webcontrol says to do something like... -
[WebMethod] System.NullReferenceException: Object reference not set to an instance of an object.
Um, this isn't going to work, generally. Web services, as any web app (especially on Windows server 2003) are heavily sandboxed. The method you... -
Cannot serialize object of type System.Object[,]. Multidimensional arrays are not supported
Hi, I get this on server when trying to retun a 2 dim array. I apprecaite that they are not supported as per... -
Rambo #2
Re: how CFML handles object which contains another object?
>>Is it possible to have an array of wheel objects in truck object?
Sure it is -just give Truck a property that is an array.> If so, how?
<cfset truckArr = ArrayNew() >
Then in the initialaztion (code not contined in a function is ran upon
instantation) just do somethinmg like this.
<cfset truckArr[1]= createObject( ..your wheel here..) >
Its just a normal property of the CFC, just happens to be an object
reference(or array of). You may want to add a pair of get/set methods for
interactingwith your Wheel object, depends hp complex the relationship is I
suppose.
"Wendy10" <webforumsuser@macromedia.com> wrote in message
news:d40gcl$kl$1@forums.macromedia.com...is> How does ColdFusion take care of "has a" type of problems? I know "is a"which> taken care of by using "extends" key word in cfc. But now I have a cfctruck,> contains properties and functions for wheel, and I also have a cfc forin> and truck has 4 wheels. I would like to know if I can resue the wheel cfcobject?> truck cfc. Is it possible to have an array of wheel objects in truck> If so, how?
> Thanks for any help.
>
> Ping
>
Rambo Guest



Reply With Quote

