On 12/16/05, William Langshaw <[EMAIL PROTECTED]> wrote: > My ultimate question is: how "safe" and "reliable" is using > returntype="any"? Is it a big performance hit too?
returntype="any" simply disables type checking on that return value so it will always work to return a component. In reality, what type checking buys you is a specific runtime exception, so if you say returntype="foo" and you accidentally return a string, you get an exception (at runtime) saying that the return value from the function doesn't match foo. If you change that to returntype="any" (but still return a string) you'll still get an exception (at runtime) but it will most likely be complaining about converting a string to an object with methods at the point of the first use of the returned value. So you'll still get a runtime exception, it just won't be as easy to debug. You can always use the (fully documented) returntype="WEB-INF.cftags.component" to enforce that your method actually returns some sort of component... -- Sean A Corfield -- http://corfield.org/ Got frameworks? "If you're not annoying somebody, you're not really alive." -- Margaret Atwood ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
