Ben,

That's too bad we can't utilize overloading.  Although it's interesting
to note that arguments being passed into a function can have a type.

I will go with the workaround for my particular needs.

Thanks for the info

Sean 
http://www.kubeworks.com {work}
http://www.kubeworks.com/personal/ {play}


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Ben Forta
Sent: Monday, August 04, 2003 5:02 PM
To: [EMAIL PROTECTED]
Subject: RE: [CFCDev] Overloading CFCs

Sean,

No, overloading is not going to be supported in Red Sky. Truth is, the
whole concept of overloading is a tough one in ColdFusion as CF is
typeless.

Your best bet is to have a method accept any and all types, and then
check to see what the type is in the method and call other code
accordingly.

--- Ben



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of sean
Sent: Monday, August 04, 2003 4:56 PM
To: [EMAIL PROTECTED]
Subject: RE: [CFCDev] Overloading CFCs


Thanks Hal.  Do you know if this was fixed in Red Sky?

BTW looking forward to your class in LV.

Sean


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Hal Helms
Sent: Monday, August 04, 2003 4:54 PM
To: [EMAIL PROTECTED]
Subject: RE: [CFCDev] Overloading CFCs

Your terms are right, Sean, but unfortunately, CFCs don't support method
overloading.

Hal Helms
"Java for CF Programmers" class 
in Las Vegas, August 18-22
www.halhelms.com

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of sean
Sent: Monday, August 04, 2003 2:39 PM
To: [EMAIL PROTECTED]
Subject: [CFCDev] Overloading CFCs


Hello All,

 

I apologize in advance as this may be a newbie question.  I am currently
working with the Mach-ii methodology and was trying to do the following
in a CFC.  I want to narrow down the error I am getting to either a
logic issue on my hand or something in the mach-ii framework.

 

I am basically trying to *overload* the CFC (might be confusing my terms
here).  That is if the arguments passed to setInfo is a struct, then the
second function is called, if a simple numeric value is passed, than the
first function is executed.

 

<cffunction name="setInfo" access="public">

                        <cfargument name="bidAmount" type="numeric"
required="true" />

                        

                        <cfset this.bidAmountD = arguments.bidAmount />

                        <cfset this.bidMaxAMount = arguments.bidAmount
/>

                        <cfset this.bidType = 1/>

                        <cfset this.bidderID = 0 />

                        <cfset this.targetAuctionID = 97507 />

                        

            </cffunction>

            

            <cffunction name="setInfo" access="public">

                        <cfargument name="info" type="query"
required="true" />

                        

                        <cfset this.bidAmountD =
arguments.info.bidAmount />

                        <cfset this.bidMaxAMount =
arguments.info.bidMaxAmount />

                        <cfset this.bidType = arguments.info.bidType />

                        <cfset this.bidderID = arguments.info.bidderID
/>

                        <cfset this.targetAuctionID =
arguments.info.targetAuctionID />

                        

            </cffunction> 

 

Thanks in advance.

 

Sean Scott

http://www.kubeworks.com {work}

http://www.kubeworks.com/personal {play}

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).







----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

Reply via email to