On Jan 2, 11:22 am, sammus <[EMAIL PROTECTED]> wrote:
> I am new to farcry and trying to learn it
> I am unable to understand how the following code works
>
> oType = createObject("component",application.types['RoomType'].typepath);
> qTypes = oType.getAll();

Your content type "RoomType" extends ./packages/types/types.cfc which
in turn extends ./packages/fourq/fourq.cfc

The getAll() method is within fourq.  It returns a structure, keyed by
objectids, of structures for each content type. That data structure
will be keyed by all the content items properties.

As an aside, I hate this method and its only in place for backward
compatibility reasons.  There is no point returning a struct of
structs as it randomises the order of the structs.  The easiest thing
is to create a method inside RoomType.cfc that does specifically what
you want and return that -- but i digress.

> Will it create an object oType with the columns of the table RoomType??
> are there any default properties/methods for the createObject??
> I mean is getAll() is a method defined for the object oType or its a defualt
> method?if its a defined method where can I find it?

The easiest way to describe it is to dump it with cfdump.  Once you
have done that let us know if you have any other questions.

-- geoff
http://www.daemon.com.au/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"farcry-dev" 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/farcry-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to