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 On Mon, Jul 18, 2011 at 8:40 PM, Andrew Scott <[email protected]>wrote: > When using either the new operand or the createObject in CF9 will not > require you to use the init() call after it. > > Sorry to point this out to you. > > > On Thu, Jul 14, 2011 at 8:19 PM, Paul Kukiel <[email protected]> wrote: > > >> Also as a small note the init method is called automatically when you use >> new but not with any of the other create object functions. Just thought >> that was interesting. >> >> Paul >> >> >> -- > You received this message because you are subscribed to the Google Groups > "cfaussie" 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/cfaussie?hl=en. > -- Paul Kukiel -- You received this message because you are subscribed to the Google Groups "cfaussie" 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/cfaussie?hl=en.
