From: Bill W. <bil...@us...> - 2000-12-05 15:03:20
|
Álvaro- I looked for that, but I must have missed it, you're right. Hmmm. I'll have to look at it some more. I wish I had a debugger. I was about to install Visual Interdev on my laptop but it wanted to 'correct' my JDK1.3 back to 1.2.... some upgrade, sheesh. I love the debugger though. I wonder if there is a good javascript debugger that will run on my Linux system at home? -bw Álvaro Peña González <ice...@ve...> wrote: > OK, Bill, thanks for your aid, but other things more :-) > > You are right as far as that acceding to the wide one by means of the > function getWidth() more is OO than directly by means of w. > > But as far as the one of which this.css.width is single for ie or ns5 I do > not agree. > Watching the following code that is called during the creation of the layer > we found that: > > DynLayer.prototype.assignElement=function(elm) { > this.elm=elm > if (is.ns4) > > this.css=this.elm > this.doc=this.elm.document > this.doc.lyrobj=this > } > else if (is.ie || is.ns5) { > this.css=this.elm.style > this.doc=this.parent.doc > } > this.elm.lyrobj=this > this.created=true > } > > this.css directly points in the style of the layer independientemete of the > browser, in addition use ie. > > Although I repeat that you are right and the correct way to obtain the wide > of the layer is by means of the method getWidth(). > > bye. > > ----- Original Message ----- > From: "Bill Wheaton" <bil...@us...> > To: <dyn...@li...> > Sent: Monday, December 04, 2000 8:29 PM > Subject: Re: [[Dynapi-Dev] Re: Layer Aling] > > > > Perhaps, (and I am not sure) it is because this.css.width is only for ie > and > > ns5 and you might be using netscape 4.7???? > > > > I found this in DynLayer's setSize method. Otherwise it sets the clip > width > > and height. > > if (is.ie || is.ns5) { > > this.css.width=w > > this.css.height=h > > } > > For cross browser compatability use the '.getWidth()' method or, the '.w' > > property (not .css.width) > > > > But this.w accesses the width directly, which is really a no-no in OO. > > getWidth() is better, because someone may change the '.w' property to > > '.widthofmyfunkylayerthingamajig' someday. If you use this.getWidth() it > > should still work even then, assuming they did it right. > > Regards > > -bw > > > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev ____________________________________________________________________ Get free email and a permanent address at http://www.netaddress.com/?N=1 |