So, I'm crazy! My bad. Thank You very much!

-----Original Message-----
From: Raymond Camden [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 25, 2003 10:05 AM
To: [EMAIL PROTECTED]
Subject: RE: [CFCDev] Array Index not passing out as a number?


Number is not a valid type. You want to use numeric. Remember, if you
pass a type CFMX doesn't recognize, it assumes you mean a type of CFC.

=======================================================================
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia)

Email    : [EMAIL PROTECTED]
Blog     : www.camdenfamily.com/morpheus/blog
Yahoo IM : morpheus

"My ally is the Force, and a powerful ally it is." - Yoda 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Justin Hansen
> Sent: Tuesday, March 25, 2003 10:02 AM
> To: [EMAIL PROTECTED]
> Subject: [CFCDev] Array Index not passing out as a number?
> 
> 
> Let me change the topic for a minute and help prove whether 
> or not I'm crazy. 
> 
> I'm trying to send the current index of a "for loop" as a 
> number to another function in the cfc to build an array of 
> objects. I keep getting this lame error. If I specify 
> "aNumber" type of any, it works but I think it is treating it 
> as a string because I can see the number in the resulting 
> array. I won't all me to specify the type as a number or use 
> it in an additional function that requires a number. The var 
> "i" is a number.... right? wtf!
> 
> 
> ERROR MESSAGE: The argument ANUMBER passed to function new() 
> is not of type number.  
> If the component name is specified as a type of this 
> argument, the reason for this error might be that a 
> definition file for such component cannot be found or is not 
> accessible.  
> 
> <cffunction ...
> ...
> for(i=1; i lte daysinthemonth; i=i+1){
>   
> arrayAppend(this.objArray,createObject('component','inetcfc.ca
> lendar.Date'));
>   this.objArray[i].new(aNumber=i);
> }
> ....
> </cffunction>
> 
> <cffunction name="new" access="public" returntype="any" output="No">
>   <cfargument name="aNumber" type="number" required="Yes">
>   ...
>   <cfscript>
>     this.ShouldBeNumeric = arguments.aNumber; // if argument 
> type of any this works
>     this.Date = createDate(2003,4,arguments.aNumber); // but 
> this bombs
>     ...
>   </cfscript>
> </cffunction>
> 
> 
>  Justin Hansen
> ~~~~~~~~~~~~~~~~~~~~~~
>  Uhlig Communications
>  Systems Engineer
> ~~~~~~~~~~~~~~~~~~~~~~
>  [EMAIL PROTECTED]
>  913-754-4273 Office
>  816-695-4045 Mobile
> ~~~~~~~~~~~~~~~~~~~~~~
>  
> ----------------------------------------------------------
> 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