// set Process
i18n.setProcess(function() {diFunctions.getI18n('http://localhost/service/i18n/page?lang=eng&group=staff') });
// Setter and getter
this.setProcess = function( opProcess ) { //here param opProcess is function with parameters see i18n.setProcess() line of code
if( opProcess == undefined)
throw "Process is undefined";
if( $.isFunction(opProcess) == false )
throw "Process is not a function"
process = opProcess;
};
this.getProcess = function() {
return process;
};
i18n.setProcess がパラメータとして param を持つ関数を setProcess に渡す方法を参照してください。
今、私が SetProcess で欲しいのはfunction() {diFunctions.getI18n('http://localhost/service/i18n/page?lang=eng&group=staff',**id**)
// id が、パラメータとして setProcess に渡された関数自体に動的に追加されることです
問題 - 関数パラメーター (Url、etc、etc、id) に加えて、セットプロセスに動的に (id によって常にアクセス可能なクラス変数で定義された) id を追加したい。関数のパラメーターは大きくなる可能性がありますが、id はパラメーターとして最後に追加する必要がありますか?
かなりの数のソリューションを試しましたが、うまくいきませんでしたか? ここをチェック