Here is a psuedo code snippet from one of the applications at my work.
<!--- Record Object --->
<cffunction name="init" access="public" hint="I configure and return this record object." output="false" returntype=" com.myreactorproject.MyRecord">
<cfargument name="Arg1" type="string" default="" hint="" />
<cfargument name="Arg2" type="string" default="" hint="" />
<cfset super.init( argumentCollection=arguments ) />
<cfset setArg1( arguments.Arg1) />
<cfset setArg2( arguments.setArg2) />
<cfreturn this />
</cffunction>
HTH
Qasim
I would like to change a couple default settings in my somethingRecord.init() method, and I would like to know the preferred way of overwriting defaults. I hope I don't have to copy the entire generated init() into the customizable version of the somethingRecord.init(). (The 'something' is irrelevant; this question could apply to most any Reactor Record).
This blog article ( http://www.evenamonkey.com/reactor_tip_super_validate--2006--doug_sims) refers to validation, but I wonder if the same principal applies. Basically, it says to write the custom method and then call super.validate() to invoke the default method and then return the combined result.
Since I would like to overwrite rather than supplement the defaults, I'm guessing that, within my custom init(), I should call super.init() first, and then overwrite the 3 default variables before returning the combined result. Am I on the right track?
Any advice, blog articles, additional documentation or mailing list threads to look up would be helpful.
Thank you in advance,
Dan
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
