Hey - I am on the right track then; this is what I went with ( had a
bit of a brain wave! )

All the objects have 3 common fields, so esentually I have made a
super class. This object will be called with the search params, and it
will then call all of it's children - passing on the params.


Happy new year every one!


On Fri, 31 Dec 2004 17:24:42 +1100, Tim Lucas <[EMAIL PROTECTED]> wrote:
> On 23/12/2004, at 1:40 PM, Andrew Mercer wrote:
> > Does anyone know of a way to group a collection of custom types?
> 
> Not sure exactly why you'd want to do the above, but a related
> guideline is that if you have custom types that belong together then a
> sensible naming convention should be used.
> 
> For example, a myMusic module could have custom type names as such:
> myMusicArtist
> myMusicTrack
> myMusicAlbum
> 
> > I would like to be able to say give me all the types that belong to
> > group A - which would return a list of object names, eg myTypeA1,
> > myTypeA2, myTypeA3. I could then then loop through the list and work
> > with all the objects.
> 
> This information is pretty darn static, so why not have a
> myMusicUtils.cfc which has a function that returns the names of all the
> types in the myMusic module?
> 
> <cffunction name="myMusicTypeNames" returntype="list" hint="Returns the
> custom type names belonging to the myMusic module">
>         <cfreturn "myMusicArtist,myMusicTrack,myMusicAlbum" />
> </cffunction>
> 
> And if you find you are instantiating these things around the place you
> could put this into a function too:
> 
> <cffunction name="myMusicTypeInstances" returntype="array"
> hint="Returns an instance of every type belonging to the myMusic
> module">
>    <!--- call myMusicTypeNames() and create an instance of each --->
> ...
> 
> > Or maybe I cold have a naming convestion such that the group name is
> > in the object name.
> 
> See above.
> 
> HTH
> 
> - tim lucas
> 
> http://www.toolmantim.com
> 
> ---
> You are currently subscribed to farcry-dev as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to [EMAIL PROTECTED]
> Aussie Macromedia Developers: http://lists.daemon.com.au/
>

---
You are currently subscribed to farcry-dev as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to