Qasim,

 

That helps a lot. Thank you very much!

 

Dan

 

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Qasim Rasheed
Sent: Tuesday, October 24, 2006 11:57 AM
To: [email protected]
Subject: Re: [Reactor for CF] What's the best way to extend somethingRecord.init()?

 

Dan,

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

On 10/24/06, Dan Sorensen <[EMAIL PROTECTED]> wrote:

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/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --


-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Reply via email to