mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-26 22:02:13 +09:00
cast 메소드에 있던 too many recursion 버그 수정
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6868 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
d3111892d8
commit
044af4db04
1 changed files with 11 additions and 7 deletions
|
|
@ -95,7 +95,7 @@ _xe_base = {
|
|||
* @brief overrides broadcast method
|
||||
*/
|
||||
broadcast : function(oSender, msg, params) {
|
||||
for(var i=0; i < this._apps.length; i++) {
|
||||
for(var i=0; i < _apps.length; i++) {
|
||||
this._apps[i].cast(oSender, msg, params);
|
||||
}
|
||||
|
||||
|
|
@ -210,10 +210,12 @@ _app_base = {
|
|||
this._fn_level++;
|
||||
|
||||
// BEFORE hooker
|
||||
var bContinue = this.cast(sender, 'BEFORE_'+msg, params);
|
||||
if (!bContinue) {
|
||||
this._fn_level--;
|
||||
return;
|
||||
if (typeof aMsg['BEFORE_'+msg] != 'undefined') {
|
||||
var bContinue = this.cast(sender, 'BEFORE_'+msg, params);
|
||||
if (!bContinue) {
|
||||
this._fn_level--;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// main api function
|
||||
|
|
@ -228,12 +230,14 @@ _app_base = {
|
|||
}
|
||||
|
||||
// AFTER hooker
|
||||
this.cast(sender, 'AFTER_'+msg, params);
|
||||
if (typeof aMsg['AFTER_'+msg] != 'undefined') {
|
||||
this.cast(sender, 'AFTER_'+msg, params);
|
||||
}
|
||||
|
||||
// decrease function level
|
||||
this._fn_level--;
|
||||
|
||||
if (_fn_level < 0) { // top level function
|
||||
if (this._fn_level < 0) { // top level function
|
||||
return vRet;
|
||||
} else {
|
||||
if (typeof vRet == 'undefined') vRet = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue