Then hook us up?
----- Original Message -----
From: "Christof Pohl" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, May 26, 2001 9:17 AM
Subject: RE: [Dynapi-Help] Resize issues...
> I have implemented recreation in my customized DynAPI version, and yes, it
> works there. :-) Normally it should work with DynAPI also...
>
> To my knowledge, not using recycled layers with NS4 will result in a small
> but noticable memory leak when using a lot of layers.
>
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Michael
> > Pemberton
> > Sent: Saturday, May 26, 2001 5:45 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [Dynapi-Help] Resize issues...
> >
> >
> > the importnat question is does it work, or are you still playing
> > with it at the
> > moment. I have no problems with tweaking my afroapi it it means
> > that I can get
> > resize handling working.
> >
> > since the resize problem currently only really effects NS4 and
> > there are few
> > problems regarding garbage collection in this browser, it should
> > not be too much
> > of a problem not using the recycled layers.
> >
> > Christof Pohl wrote:
> >
> > > Hi everybody!
> > >
> > > Using specificCreate didn't work for me when using removeChild before
> > > resizing the browser window. specificCreate will try to use the
> > layers from
> > > the parent.doc.recycled[] array. These "recycled" layers didn't show
up
> > > after resize as far as I can remember...
> > >
> > > First of all, I added a function to DynObject, which will call
> > > specificRecreate:
> > >
> > > DynObject.prototype.recreate=function() {
> > > if (this.created) this.specificRecreate();
> > > var l=this.children.length;
> > > for (var i=0;i<l;i++) this.children[i].recreate();
> > > };
> > > DynObject.prototype.specificRecreate=function() {};
> > >
> > > The specificRecreate function is identical to specificCreate besides
not
> > > using recycled layers (it will always use "new Layer()") and paying
> > > attention to changed clipping values.
> > >
> > > Furthermore, I have extended DynDocument:
> > >
> > > DynDocument.prototype.resizeHandler=function() {
> > > // checks for changed width or height in NS4
> > > var w=this.getWidth();
> > > var h=this.getHeight();
> > > this.findDimensions();
> > > if (is.ns4 && (w!=this.getWidth() || h!=this.getHeight())) {
> > > l=this.children.length;
> > > for( var i=0;i<l;i++) this.children[i].recreate();
> > > };
> > > };
> > >
> > > Last but not least, I have added this line to the DynDocument()
> > constructor:
> > >
> > > DynAPI.addResizeFunction(this+".resizeHandler()");
> > >
> > > which will automatically add the resize check to the onresize event.
> > >
> > > Please note that I'm using a highly customized version of DynAPI for
my
> > > current projects which is adepted to my needs, so the above
> > code might not
> > > run out of the box with DynAPI 2.53. If somebody's interested, I will
> > > implement NS4 DynLayer recreation for the current DynAPI CVS version
on
> > > Sunday...
> > >
> > > Best regards,
> > >
> > > Christof
> > >
> > > > Michael Pemberton wrote:
> > > >
> > > > if you look more closely at the dynlayer code, you'll see
> > that there is no
> > > > longer a createElement or deleteElement method. These were
> > > > removed and replaced
> > > > with the more global specificCreate and specificRemove methods.
> > > >
> > > > I am not sure exactly how the new methods, it may be possible to
> > > > use these as
> > > > part of the redraw.
> > > >
> > > > Doug Melvin wrote:
> > > >
> > > > > that's the stuff..
> > > > > Can we use that?
> > > > > ----- Original Message -----
> > > > > From: "Joachim Lundgren" <[EMAIL PROTECTED]>
> > > > > To: <[EMAIL PROTECTED]>
> > > > > Sent: Thursday, May 24, 2001 7:06 PM
> > > > > Subject: Re: [Dynapi-Help] Resize issues...
> > > > >
> > > > > > At 2001-05-25 00:46, you wrote:
> > > > > > >Your right, a dynlayer is a layer.
> > > > > > >I meant that they use no divs or spans, only layers,
> > while we do, at
> > > > > least
> > > > > > >in the widgets.
> > > > > > >I was just trying to figure out how come you could resize
> > > > their page as
> > > > > much
> > > > > > >as you want, in NS4.
> > > > > > >They don't use any onresize handler that I can see.
> > > > > >
> > > > > > It isn't needed. When resizing NS4 the browser just
> > throws away the
> > > > > representation and recreates the HTML part. The different URLs
> > > > you all have
> > > > > given examples of use document.write() WHILE the page is
> > > > loading, not after
> > > > > as is done in DynAPI.onLoad().
> > > > > >
> > > > > > The "fix" that was in the code previously had something along
> > > > these lines:
> > > > > >
> > > > > > DynDocument.resizeHandler = function() {
> > > > > > var dyndoc = this.dyndoc;
> > > > > > var w = dyndoc.getWidth();
> > > > > > var h = dyndoc.getHeight();
> > > > > > dyndoc.findDimensions();
> > > > > > if(is.ns4 && (w!=dyndoc.getWidth() ||
> > h!=dyndoc.getHeight()))
> > > > > > dyndoc.recreateAll();
> > > > > > if(DynAPI.onResize)
> > > > > > DynAPI.onResize();
> > > > > > }
> > > > > >
> > > > > > window.onresize = DynDocument.resizeHandler;
> > > > > >
> > > > > > DynDocument.prototype.recreateAll = function() {
> > > > > > this.setBgColor(this.bgColor);
> > > > > > this.setFgColor(this.fgColor);
> > > > > > for(var i=0; i<this.children.length; i++) {
> > > > > > var child = this.children[i];
> > > > > > if(child.created) {
> > > > > > child.elm = null; //
!!!!!!
> > > > > > child.deleteElement();
> > > > > > child.createElement();
> > > > > > }
> > > > > > }
> > > > > > }
> > > > > >
> > > > > > I think the deleteElement method was also fixed to handle
> > this case.
> > > > > >
> > > > > > /Lunna
> > > > > >
> > > > > >
> > > > > > _______________________________________________
> > > > > > Dynapi-Help mailing list
> > > > > > [EMAIL PROTECTED]
> > > > > > http://lists.sourceforge.net/lists/listinfo/dynapi-help
> > > > >
> > > > > _______________________________________________
> > > > > Dynapi-Help mailing list
> > > > > [EMAIL PROTECTED]
> > > > > http://lists.sourceforge.net/lists/listinfo/dynapi-help
> > > >
> > > > --
> > > > Michael Pemberton
> > > > [EMAIL PROTECTED]
> > > > ICQ: 12107010
> > > >
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > Dynapi-Help mailing list
> > > > [EMAIL PROTECTED]
> > > > http://lists.sourceforge.net/lists/listinfo/dynapi-help
> > > >
> > >
> > > _______________________________________________
> > > Dynapi-Help mailing list
> > > [EMAIL PROTECTED]
> > > http://lists.sourceforge.net/lists/listinfo/dynapi-help
> >
> > --
> > Michael Pemberton
> > [EMAIL PROTECTED]
> > ICQ: 12107010
> >
> >
> >
> >
> > _______________________________________________
> > Dynapi-Help mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/dynapi-help
> >
>
>
> _______________________________________________
> Dynapi-Help mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/dynapi-help
>
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help