The <cfargument name="foo" type="numeric" required="false" /> means your 
calling code needs some conditionals too so it doesn't pass an empty string.

I'm all for

<cfargument name="foo" type="any" required="false" />

I used to have so much pain with generated beans and DAO's with numeric 
argument types I decided to just make them all type="any". I mean seeing a 
field countryId makes it fairly clear it will usually be a numeric so I don't 
care about explicitly specifying type.

My object args are usually type="Any" too.


Alan




________________________________
From: John Whish <[email protected]>
To: [email protected]
Sent: Wednesday, January 28, 2009 9:21:33 AM
Subject: [CFCDEV] Re: CFFunction's CFArgument can't takes NULL as a value  when 
the parameter's data type is numeric

I'd suggest that you have: 
<cfargument name="foo" type="numeric" required="false" /> 
and then (as Charlie suggested above) do:
<cfif NOT StructKeyExists( arguments, "foo" )>
  <!--- if not passed, treat as a null value --->
<cfelse>
  <!--- argument passed --->

</cfif>


      
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CFCDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cfcdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to