0
我有一个组件具有几个属性定义和一个init()方法。我可以访问getUuid(),但不能getSandwich()。如预期其中夹层的情况下,该属性不即使值被施加到setSandwich()方法设置访问隐式设置程序/ getter
component output="false" accessors="true" {
property
name="uuid"
type="string"
default=""
hint="The sandwich ID";
property
name="sandwich"
type="string"
default=""
hint="The fucking sandwich";
public any function init() {
this.setUuid(CreateUUID());
this.setSandwich = "Peanut Butter and Banana";
return this;
}
}
的UUID属性和对应getSandwich()方法是在实例可用。
* Re:this.setSandwich =“花生酱和香蕉”; *这是一个错字或错误?你是不是指'this.setSandwich(“花生酱和香蕉”)? – Leigh
我的,这是一个愚蠢的错误,我只是看不到。对我来说这是一个奇怪的日子。谢谢你的目光。如果它被表示为一个,我会检查这个答案。现在,加上一个给你。 –
我听到你'。逻辑错误很容易让疲倦的眼睛想念。 – Leigh