Hi Brian,
On Thu, May 1, 2008 at 12:27 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:
>
> I need to know if I can access the methods in a child object from its
> parent class and if so, how I might do that.
>
No you cannot do that.
Forunately, from the looks of this:
> I have a contentService object that is getting fairly full of
> functions, many having to do with images so I was thinking of creating
> a sub-class of content and call it imageService. What I have is a
> getImageGallerys() function and a getImageByGallery function(), among
> others. I plan to create a function that gets a single gallery from
> getImageGallerys(), then uses the gallery's id to retrieve its images
> from getImageByGallery() returning that query to the view.
>
> I guess I was thinking this function would be in the contentService
> object, but I suppose it should be in the imageService sub-class I
> will create. What are your guys thoughts on this, and can I access
> methods in a sub-class from a class?
>
It sounds like what you want to use is called composition (or aggregation),
not inheritance.
So, just create your new image processing cfc, and when you need to use it,
imageProcessorObject = createobject("component", "path.to.imageprocessor").
Then you can call the methods you need to use like so:
imageProcessorObject.callMethod(send_arguments)
Hope that helps.
Regards,
Sam
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CFCDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cfcdev?hl=en
-~----------~----~----~----~------~----~------~--~---