我在一个组件中实现了一个<cfinterface>
。此接口的目的之一是确保在组件内定义某些属性(cfproperty)。所以,我已经明确地为接口中的获取器/设置器创建了函数原型,并在<cfcomponent>
标记中设置了accessors="true"
。现在cfproperty getter/setter的“output”属性的默认值是多少?
,我想用output="false"
在接口这些功能,但它给了我一个错误:
Argument output value mismatch.
The <FunctionName> function does not specify the same value for the output argument in the <ComponentName> ColdFusion component and the <InterfaceName> ColdFusion interface.
我怎样才能确保默认的getter/setter有output="false"
?
我不认为输出设置应该在接口中指定,应该吗?接口用于指定API行为,而不是如何处理生成的输出。也就是说,如果自动生成的访问器不适合你,你将需要推出自己的访问器。 –