Javascriptでオブジェクトを作成しようとしています(Appcelerator / Titanium用)。「オブジェクト」は次のように定義されます。
function server () {
this.cacheimages = 0;
this.login = "";
this.name = "";
this.root = "";
this.signup = "";
this.useimages = 0;
this.userexists = "";
this.isdefault = 0;
return this;
}
同じファイルで、この行を実行すると別の関数で:
「return」行がある場合とない場合で試したときにvar server = new server();
エラーが発生します。どちらも機能しません。Result of expression 'server' is not a constructor.
私は何が間違っているのですか?