Update of /cvsroot/dynapi/dynapi/src
In directory usw-pr-cvs1:/tmp/cvs-serv26812

Modified Files:
        dynapi.js 
Log Message:
created=false needs to be set in removeChild as well, because the element has been 
removed by specificRemove

Index: dynapi.js
===================================================================
RCS file: /cvsroot/dynapi/dynapi/src/dynapi.js,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -r1.33 -r1.34
*** dynapi.js   2001/04/07 06:48:19     1.33
--- dynapi.js   2001/04/07 16:47:30     1.34
***************
*** 3,7 ****
     DynAPI base Object. Empty shell defining common properties and methods
  
!    The DynAPI Distribution is distributed under the terms of the GNU LGPL license.  
  */
  DynObject = function() {
--- 3,7 ----
     DynAPI base Object. Empty shell defining common properties and methods
  
!    The DynAPI Distribution is distributed under the terms of the GNU LGPL license.
  */
  DynObject = function() {
***************
*** 10,14 ****
        this.created = false;
        this.parent = null;
!       this.children = [];     
  };
  DynObject.prototype.getClass = function() { return this.constructor };
--- 10,14 ----
        this.created = false;
        this.parent = null;
!       this.children = [];
  };
  DynObject.prototype.getClass = function() { return this.constructor };
***************
*** 21,25 ****
        c.isChild = true;
        c.parent = this;
!       if(this.created) c.create() 
        this.children[this.children.length] = c;
        return c;
--- 21,25 ----
        c.isChild = true;
        c.parent = this;
!       if(this.created) c.create()
        this.children[this.children.length] = c;
        return c;
***************
*** 31,34 ****
--- 31,35 ----
                c.invokeEvent("beforeremove");
                c.specificRemove();
+               c.created=false;
                c.invokeEvent("remove");
                c.isChild = false;
***************
*** 39,47 ****
        }
  };
! DynObject.prototype.deleteFromParent = function () { 
!       if(this.parent) this.parent.deleteChild(this); 
  };
! DynObject.prototype.removeFromParent = function () { 
!       if(this.parent) this.parent.removeChild(this); 
  };
  DynObject.prototype.create = function() {
--- 40,48 ----
        }
  };
! DynObject.prototype.deleteFromParent = function () {
!       if(this.parent) this.parent.deleteChild(this);
  };
! DynObject.prototype.removeFromParent = function () {
!       if(this.parent) this.parent.removeChild(this);
  };
  DynObject.prototype.create = function() {
***************
*** 111,115 ****
  DynObject.prototype.invokeEvent               = function() {};
  DynObject.Count = 0;
! DynObject.all = [];   
  
  
--- 112,116 ----
  DynObject.prototype.invokeEvent               = function() {};
  DynObject.Count = 0;
! DynObject.all = [];
  
  
***************
*** 139,148 ****
        this.DynObject = DynObject;
        this.DynObject();
!       
        this.loaded = false;
        this.hookLoad = null;
        this.hookUnload = null;
        this.librarypath = '';
!       this.packages = [];     
        this.errorHandling = true;
        this.returnErrors = true;
--- 140,149 ----
        this.DynObject = DynObject;
        this.DynObject();
! 
        this.loaded = false;
        this.hookLoad = null;
        this.hookUnload = null;
        this.librarypath = '';
!       this.packages = [];
        this.errorHandling = true;
        this.returnErrors = true;
***************
*** 152,156 ****
  }
  DynAPIObject.prototype = new DynObject();
! DynAPIObject.prototype.setLibraryPath = function(path) { 
        if (path.substring(path.length-1)!='/') path+='/';
        this.librarypath=path;
--- 153,157 ----
  }
  DynAPIObject.prototype = new DynObject();
! DynAPIObject.prototype.setLibraryPath = function(path) {
        if (path.substring(path.length-1)!='/') path+='/';
        this.librarypath=path;
***************
*** 174,191 ****
        this.packages[pckg].libs[name] = files;
  }
! DynAPIObject.prototype.include = function(src,pth) { 
!       src=src.split('.'); 
!       if (src[src.length-1] == 'js') src.length -= 1; 
!       var path=pth||this.librarypath||''; 
!       if (path.substr(path.length-1) != "/") path += "/"; 
!       var pckg=src[0]; 
!       var grp=src[1]; 
!       var file=src[2]; 
!       if (file=='*') { 
!               if (this.packages[pckg]) group=this.packages[pckg].libs[grp]; 
                if (group) for (var i in group) document.write('<script 
language="Javascript1.2" src="'+path+pckg+'/'+grp+'/'+group[i]+'.js"><\/script>');
                else alert('include()\n\nThe following package could not be 
loaded:\n'+src+'\n\nmake sure you specified the correct path.');
        } else document.write('<script language="Javascript1.2" 
src="'+path+src.join('/')+'.js"><\/script>');
! } 
  DynAPIObject.prototype.errorHandler = function (msg, url, lno) {
        if (!this.loaded || !this.errorHandling) return false;
--- 175,192 ----
        this.packages[pckg].libs[name] = files;
  }
! DynAPIObject.prototype.include = function(src,pth) {
!       src=src.split('.');
!       if (src[src.length-1] == 'js') src.length -= 1;
!       var path=pth||this.librarypath||'';
!       if (path.substr(path.length-1) != "/") path += "/";
!       var pckg=src[0];
!       var grp=src[1];
!       var file=src[2];
!       if (file=='*') {
!               if (this.packages[pckg]) group=this.packages[pckg].libs[grp];
                if (group) for (var i in group) document.write('<script 
language="Javascript1.2" src="'+path+pckg+'/'+grp+'/'+group[i]+'.js"><\/script>');
                else alert('include()\n\nThe following package could not be 
loaded:\n'+src+'\n\nmake sure you specified the correct path.');
        } else document.write('<script language="Javascript1.2" 
src="'+path+src.join('/')+'.js"><\/script>');
! }
  DynAPIObject.prototype.errorHandler = function (msg, url, lno) {
        if (!this.loaded || !this.errorHandling) return false;


_______________________________________________
Dynapi-CVS mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-cvs

Reply via email to