Maybe it was a CF9.01 change then!!

But try this page

http://andyscott.id.au/andrewscott/

and here is the code.

<cfscript>
writeOutput('Using CreateObject..');
test = CreateObject("component","test");
 writeDump(test);

writeOutput('Using new operand..');
 test1 = new test();
writeDump(test1);

</cfscript>

Notice I also do not use the return, nor do I have the init() method either.
Silly thing is I was just quoting what you said to someone else, and they
didn't know what I was talking about. So when I created this test page I was
like WTF...


On Mon, Jul 18, 2011 at 9:33 PM, Paul Kukiel <kuki...@gmail.com> wrote:

> Interesting as the docs indicate otherwise?
>
> Note: Only the new operator automatically invokes the initmethod or init 
> function.
> The new operator returns the value returned by init or initmethod and if
> the return is void it returns the instance of the CFC. The cfobject tags
> and the CreateObject function do not invoke the function and you must
> explicitly call any custom initialization code
>
>
> http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WS61C07B60-3D65-4d71-8F2A-8411D8010E60.html
>
> And I tried this and it dosn't call init() without explicitly calling
> init().  I can only assume they did this for backwards compatibility.
>
> 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