"when you set variables outside of a method (including init), then it can only be hard coded values"
you're talking about the protected variables within the CFC, yes? if so, not quite: they can also be simple calculated values like "#now()#". but the essence of what you're saying is true: by the time the code passes that point, the value within those variables has to be known - which includes <nothing> waiting for a method to supply it a value. On Thu, Dec 3, 2009 at 3:48 AM, John Whish <[email protected]> wrote: > I believe that when you set variables outside of a method (including init), > then it can only be hard coded values. If you call the createobject inside > the init method then it will store a reference to your object which you can > then call in other methods. > > 2009/12/2 Jared Rypka-Hauer <[email protected]> >> >> Move your createObject() call to within the init() method. The pseudo >> constructor carries a whole pile of issues with it (none of which I can >> exactly remember at the moment) because of the minute technical details of >> the way things are run at instantiation time. > > -- > > You received this message because you are subscribed to the Google Groups > "CFCDev" 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/cfcdev?hl=en. > -- You received this message because you are subscribed to the Google Groups "CFCDev" 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/cfcdev?hl=en.
