Paul, I am going to correct you here.

When creating the constructor, whether it be init or initmethod="whatever"
you can return the object type.

public testComponent function() {
}

Also notice that I didn't include the return this, because in ColdFusion 9
this will work without it. What you can't do is dynamically change the
return type.




On Thu, Jul 14, 2011 at 1:23 PM, Paul Kukiel <kuki...@gmail.com> wrote:

> Hi Steve,
>
> That's correct the cfc was called steve.  I didn't need to import anythign
> as I just dropped the cfc in the same folder.
>
> If the cfc was in a folder say com.cfaussie or there was a com mapping the
> import would be:
>
> <cfscript>
> import com.cfaussie.steven;
>
> temp = new steven("zigZag2");
>  temp.bar();
>
> writeDump(getMetaData(temp));
>
> </cfscript>
>
> In the cfc it knows where it is so you don't need the import.  Also
> getMetaData() will return the meta data Phill was mentioning and you could
> use fullName to dynamically create the new instance.  Return type of init
> must be any however as you can't change that at run time.
>
> Eg:  http://pastebin.com/ZeE0rpYJ
>
> Running: http://demo.kukiel.net/cfaussie2.cfm
>
> Paul
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com.
To unsubscribe from this group, send email to 
cfaussie+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en.

Reply via email to