Hello,
Is there a way to pass arguments at the time of cfc object creation? All of
the methods in my CFC require a particular parameter, say 'ID' that I would
like to pass in at the time of object creation ('this.ID =
') and then all of the methods will know that 'this.ID' and can refer to it.
Otherwise, it seems like I have to have an 'Init' method in my CFC which
sets the 'this.ID' variable and sets a 'this.IsInitialized' variable for the
object. Then, all object functions will have to check 'this.Initialized' at
the top of their function. If it is not there, they will have to do a
<cfthrow>.
My current process means two things that I don't want to do:
1) create the cfc object and then initialize it
2) check in each cfc function to ensure that the initialization occurred
I would like to:
1) pass in initialization parameters at the time of object creation, whereby
all objects will automatically be initialzed and each function will not have
to check for initialization.
I didn't see any solutions in the documentation or on the web.
Thanks!
Jon Gunnip
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4