我在一個組件中實現了一個<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行爲,而不是如何處理生成的輸出。也就是說,如果自動生成的訪問器不適合你,你將需要推出自己的訪問器。 –