From: Eytan H. <ey...@tr...> - 2001-02-18 13:06:43
|
What is that delete command? delete array[which.id]? 8an |
From: Michael P. <mp...@ph...> - 2001-02-18 13:11:34
|
this is to deal with arrays where the elements are known be name. eg document.all['id'] there is no need to continue if this is the type of element. Eytan Heidingsfeld wrote: > What is that delete command? > delete array[which.id]? > 8an > > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/lists/listinfo/dynapi-dev -- Michael Pemberton mp...@ph... ICQ: 12107010 |
From: Jordi - I. - M. <jmi...@or...> - 2001-02-16 13:23:13
|
Speed optimization can always be introduced. In fact, the latest precreation code that caused some old bugs to reappear and some people to complain about the API going backwards was introduced in order to speed up layer creation, something that was not a problem until people started wanting hundreds, even thousands of layers onscreen. I've been tempted to suggest this many times but I didn't want to spawn another "code split-up" argument. Some critical methods like, say, moveTo or setSize might speed up by doing.: if(is.ns) DynLayer.prototype.moveTo = function A else DynLayer.prototype.moveTo = function B I'll try myself in see what happens Pascal wrote: > me again :) > > I don't think this test is really useable. > Your current Tcanvas code misses ALOT of things DynLayer takes care of. > > DynLayer sets sizes, z-index,clipping,bgimages in initialisation (and also a > few other style properties.. note that setting a style property is what > slows everything down) I once did some optimization tricks to the dynlayer, > by removing sizes/clipping etc.. this speeds up things BIG TIME, but also > brakes useability for a large amount of widgets, and is less flexible. > > DynLayer has code included for fast child-creation.. even though there are > no child layers in your test, this code is still called (function calls). > This could be made faster in dynlayer, but for now is more readable for > developers. Do another test with layers containing a large amount child > layers.. Dynlayer's precreation will probably be faster. > > shreded enough? ;) > > Pascal Bestebroer (pb...@oi...) > Software ontwikkelaar > Oberon Informatiesystemen b.v. > http://www.oibv.com > > > -----Oorspronkelijk bericht----- > > Van: dyn...@li... > > [mailto:dyn...@li...]Namens Eytan > > Heidingsfeld > > Verzonden: vrijdag 16 februari 2001 13:19 > > Aan: Dynapi-Dev > > Onderwerp: [Dynapi-Dev] TCanvas vs. DynLayer > > > > > > I'd love to test performance one against the other. The only > > test I did was > > create 100 layers and check the times. In IE TCanvas was 200 > > ms faster and > > in NS it was 1300(canvas) to 10000(dynlayer). > > > > I'd love you guys to start tearing my canvas to shreds. > > > > Included in the zip are: > > tcanvas.js > > browser.js > > > > they need to be included in the document(working on adding .include) > > > > 8an > > > > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/lists/listinfo/dynapi-dev |
From: Gilles B. <gil...@la...> - 2001-02-16 13:36:41
|
Hello IE accept more events than those declared in DynAPI (for exemple onmouseenter , onresizestart ...) how could I modify the file events.js so that DynAPI could work with this new event. I want to make listener on a Dynlayer with this new event. In events.js, I have modify the fct DynLayer.prototype.captureMouseEvents with this line elm.onmouseenter =elm.onmousedown=elm.onmouseup=elm.onmouseover=elm.onmouseout=elm.onclick=el m.ondblclick=DynLayer.prototype.EventMethod; and the fct DynDocument.prototype.captureMouseEvents with this line this.doc.onmouseenter =this.doc.onmousemove=this.doc.onmousedown=this.doc.onmouseup=this.doc.oncli ck=this.doc.ondblclick=DynDocument.prototype.EventMethod; and the fct DynDocument.prototype.releaseMouseEvents with this line this.doc.onmouseenter =this.doc.onmousemove = this.doc.onmousedown = this.doc.onmouseup = this.doc.onclick = this.doc.ondblclick = function(e) { return false }; I have try to make a dynlayer and an eventlistener like this mylayer=new DynLayer(null,400,100,50,50); mylayer.setBgColor('red') mylayer.setVisible(true) var l = new EventListener(mylayer); l.onmouseenter = function(e) { var o = e.getTarget(); alert('EventListener onmouseenter ) } mylayer.addEventListener(mylayer); but nothing happens, if someone could help me, I will apreciate. Thanks. |
From: Doug M. <do...@cr...> - 2001-02-16 16:25:30
|
I would not recommend modifiying events.js You COULD extend events.js (the same way events.js extends Dynlayer.js) and put your code in IE_events.js or some such. ----- Original Message ----- From: "Gilles Bayon" <gil...@la...> To: <dyn...@li...>; <dyn...@li...> Sent: Friday, February 16, 2001 5:40 AM Subject: [Dynapi-Dev] DynAPI new event > Hello > > IE accept more events than those declared in DynAPI (for exemple > onmouseenter , onresizestart ...) how could I modify the file events.js so > that DynAPI could work with this new event. I want to make listener on a > Dynlayer with this new event. > > In events.js, I have modify the fct > DynLayer.prototype.captureMouseEvents > with this line > elm.onmouseenter > =elm.onmousedown=elm.onmouseup=elm.onmouseover=elm.onmouseout=elm.onclick=el > m.ondblclick=DynLayer.prototype.EventMethod; > > and the fct > DynDocument.prototype.captureMouseEvents > with this line > this.doc.onmouseenter > =this.doc.onmousemove=this.doc.onmousedown=this.doc.onmouseup=this.doc.oncli > ck=this.doc.ondblclick=DynDocument.prototype.EventMethod; > > and the fct > DynDocument.prototype.releaseMouseEvents > with this line > this.doc.onmouseenter =this.doc.onmousemove = this.doc.onmousedown = > this.doc.onmouseup = this.doc.onclick = this.doc.ondblclick = function(e) > { return false }; > > I have try to make a dynlayer and an eventlistener like this > > mylayer=new DynLayer(null,400,100,50,50); > mylayer.setBgColor('red') > mylayer.setVisible(true) > > var l = new EventListener(mylayer); > l.onmouseenter = function(e) { > var o = e.getTarget(); > alert('EventListener onmouseenter ) > } > > mylayer.addEventListener(mylayer); > > but nothing happens, if someone could help me, I will apreciate. > > Thanks. > > > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/lists/listinfo/dynapi-dev --- Outgoing mail is certified Virus Free by AVG Free Edition http://www.grisoft.com/html/us_index.cfm Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.231 / Virus Database: 112 - Release Date: 2/12/01 |