You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(11) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(66) |
Feb
(52) |
Mar
(88) |
Apr
(27) |
May
(17) |
Jun
(18) |
Jul
(5) |
Aug
(12) |
Sep
(4) |
Oct
(4) |
Nov
(3) |
Dec
(3) |
2002 |
Jan
(6) |
Feb
|
Mar
|
Apr
(1) |
May
(5) |
Jun
(8) |
Jul
(8) |
Aug
(5) |
Sep
(8) |
Oct
(16) |
Nov
(6) |
Dec
(4) |
2003 |
Jan
(9) |
Feb
(5) |
Mar
(7) |
Apr
(6) |
May
(7) |
Jun
(12) |
Jul
(15) |
Aug
(17) |
Sep
(12) |
Oct
(16) |
Nov
(29) |
Dec
(27) |
2004 |
Jan
(65) |
Feb
(120) |
Mar
(50) |
Apr
(36) |
May
(21) |
Jun
(11) |
Jul
(20) |
Aug
(16) |
Sep
(11) |
Oct
(25) |
Nov
(22) |
Dec
(36) |
2005 |
Jan
(11) |
Feb
(25) |
Mar
(41) |
Apr
(7) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(4) |
Dec
|
2006 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Jeff G. <je...@we...> - 2001-06-27 17:19:32
|
:-) I think we both have a similar sense of humor, because this is the second time you made me laugh out loud... Thanks for the compliments. Jeff Greenberg je...@we... Marc van Leeuwen wrote: > Hi > > I'm sorry but I find it still very useful and well done but still sooooooo > ugly :-( > > Stop worrying, I JUST WAS KIDDING !!!!!!! :-) > > They really look great now ! Well done. I haven't even noticed Richard's > "problem" at first, but it is a really small issue on my computer (Duron > 800, w2K). > Good work, now I have to find where I can add your slider in the projects > I'm doing ! > > Marc > > At 21:53 26/06/2001, you wrote: > > >I have completed a major overhaul/update of the slider widget which now > >has component borders, component sizing, auto generated value scales and > >cleaner code. > > > >I would really appreciate it if you guys could test it out and let me > >know what you think: > > > >http://home.earthlink.net/~kendrasg/widget/Slider/sliderDemo.html > > > > > >Thanks. > > > >Jeff Greenberg > >je...@we... > > > > > >_______________________________________________ > >Dynapi-Widgetdev mailing list > >Dyn...@li... > >http://lists.sourceforge.net/lists/listinfo/dynapi-widgetdev > > _______________________________________________ > Dynapi-Widgetdev mailing list > Dyn...@li... > http://lists.sourceforge.net/lists/listinfo/dynapi-widgetdev |
From: Marc v. L. <ja...@ja...> - 2001-06-27 06:58:51
|
Hi I'm sorry but I find it still very useful and well done but still sooooooo ugly :-( Stop worrying, I JUST WAS KIDDING !!!!!!! :-) They really look great now ! Well done. I haven't even noticed Richard's "problem" at first, but it is a really small issue on my computer (Duron 800, w2K). Good work, now I have to find where I can add your slider in the projects I'm doing ! Marc At 21:53 26/06/2001, you wrote: >I have completed a major overhaul/update of the slider widget which now >has component borders, component sizing, auto generated value scales and >cleaner code. > >I would really appreciate it if you guys could test it out and let me >know what you think: > >http://home.earthlink.net/~kendrasg/widget/Slider/sliderDemo.html > > >Thanks. > >Jeff Greenberg >je...@we... > > >_______________________________________________ >Dynapi-Widgetdev mailing list >Dyn...@li... >http://lists.sourceforge.net/lists/listinfo/dynapi-widgetdev |
From: Jeff G. <je...@we...> - 2001-06-26 20:43:13
|
First off, thanks for the compliments. I really do appreciate it. Second, the problem you mention has nothing to do with the widget itself... just the updating of the display, which is not part of the widget. Some browsers, and I have noticed that this is not consistent, seem to have a problem with using setHTML often and quickly.... if you update the values to a form field instead, there is no slow down. Go figure. Anyway, the display is not part of the widget itself, you can do whatever you want with the widget's value. Jeff Greenberg je...@we... Richard Bennett wrote: > What can I say, you have once again surpassed yourself with this high > quality widget. > > All the same, I'll probably use the ugly one most of all, if only for its > silky smooth action. > > Are the nice ones a little jerky 'cause they are updating the display? or is > it an event bubble problem? (IE5.5 win) > > Richard. > > ----- Original Message ----- > From: "Jeff Greenberg" <je...@we...> > To: <dyn...@li...>; > <dyn...@li...> > Sent: 26 June, 2001 21:53 > Subject: [Dynapi-Widgetdev] Major Slider Widget Update! - Please test... > > > > > I have completed a major overhaul/update of the slider widget which now > > has component borders, component sizing, auto generated value scales and > > cleaner code. > > > > I would really appreciate it if you guys could test it out and let me > > know what you think: > > > > http://home.earthlink.net/~kendrasg/widget/Slider/sliderDemo.html > > > > > > Thanks. > > > > Jeff Greenberg > > je...@we... > > > > > > _______________________________________________ > > Dynapi-Widgetdev mailing list > > Dyn...@li... > > http://lists.sourceforge.net/lists/listinfo/dynapi-widgetdev > > > > _______________________________________________ > Dynapi-Widgetdev mailing list > Dyn...@li... > http://lists.sourceforge.net/lists/listinfo/dynapi-widgetdev |
From: Richard B. <ric...@sk...> - 2001-06-26 20:24:27
|
What can I say, you have once again surpassed yourself with this high quality widget. All the same, I'll probably use the ugly one most of all, if only for its silky smooth action. Are the nice ones a little jerky 'cause they are updating the display? or is it an event bubble problem? (IE5.5 win) Richard. ----- Original Message ----- From: "Jeff Greenberg" <je...@we...> To: <dyn...@li...>; <dyn...@li...> Sent: 26 June, 2001 21:53 Subject: [Dynapi-Widgetdev] Major Slider Widget Update! - Please test... > > I have completed a major overhaul/update of the slider widget which now > has component borders, component sizing, auto generated value scales and > cleaner code. > > I would really appreciate it if you guys could test it out and let me > know what you think: > > http://home.earthlink.net/~kendrasg/widget/Slider/sliderDemo.html > > > Thanks. > > Jeff Greenberg > je...@we... > > > _______________________________________________ > Dynapi-Widgetdev mailing list > Dyn...@li... > http://lists.sourceforge.net/lists/listinfo/dynapi-widgetdev > |
From: Jeff G. <je...@we...> - 2001-06-26 19:57:11
|
I have completed a major overhaul/update of the slider widget which now has component borders, component sizing, auto generated value scales and cleaner code. I would really appreciate it if you guys could test it out and let me know what you think: http://home.earthlink.net/~kendrasg/widget/Slider/sliderDemo.html Thanks. Jeff Greenberg je...@we... |
From: Thomas V. <tv...@co...> - 2001-06-19 12:40:03
|
I think I've narrowed it down. In my core.api.events.js in the function DynLayer.EventMethod there is an IF clause if (is.ie). In there one line is if (e.type!="mouseout" && e.type!="mouseover") e.cancelBubble=true Does anyone know why bubbling has to be cancelled at this point? What I've found so far is that the click event hits the image I placed in there as HTML code and never gets bubbled to the parent, which is a DynLayer. Any ideas? Thomas |
From: Robelix <ro...@gm...> - 2001-06-18 23:02:13
|
Am Montag, 18. Juni 2001 21:02 schrieben Sie: > From: Thomas Voirol <tv...@co...> > > But now to my problem. My widget has DynLayers for the text and > folder image plus an "levents" layer that handles clicks and > mouseovers and so on. The problem is that the event handling layer > gets no events directly over the text and the image. 1 pixel off the > actual text or image, all events work. It's as if the text and image > themselves were ABOVE the events layer. I've already tried tweaking > the Zindex of the text and image containing layers and the events > layer, but to no avail. > I was told that the same happens with the treenode-widget (Richards=20 FastTreeNode slightly modified) I use in my photogallery=20 http://www.robelix.com/dynapi/photogallery My first idea was also that it might be a problem with the z-index.=20 Since there is no Win running here I have no solution, but would be=20 happy about one. So long,=20 --=20 Roland "Robelix" Obermayer Authorisierter Nichtdenker http://www.robelix.com ro...@gm... in...@ro... ro...@we... zap...@ly... -- "SPARC" is "CRAPS" backwards --Rob Pike |
From: Scott B. <sco...@se...> - 2001-06-18 13:00:28
|
Yes, I had the same problem in IE 5.5 and it got fixed pretty quick, = can't remember how. That same problem exists in the unsupported menulist.js (pascal's = dynacore) for IE 6 as well. So no, its not just you :) -----Ursprungligt meddelande----- Fr=E5n: Thomas Voirol [mailto:tv...@co...] Skickat: den 18 juni 2001 12:28 Till: 'dyn...@li...' =C4mne: [Dynapi-Widgetdev] IE6 problem with events and possibly Z-Order (also contains how t o make Dynapi run in IE6) Hi all=20 I am developing a treeview widget based on Pascal's skintreeview. It's = based on a slightly older Dynapi (End of 2000 or so), but the problem should = be the same today. I got my Dynapi to run on IE6 by changing one line in dynlayer.js: In the DynLayer.prototype.createElement function there is a if/else if construct, the last case of which is "else if (is.ie5 || is.ns5) {" or = so. The entire if/else if tree disregards IE6. Therefore lyr is not set and = this leads to more problems. As IE6 should behave much like IE5 and I expect future browsers to be standards compliant, I changed the whole line to "else". But now to my problem. My widget has DynLayers for the text and folder = image plus an "levents" layer that handles clicks and mouseovers and so on. = The problem is that the event handling layer gets no events directly over = the text and the image. 1 pixel off the actual text or image, all events = work. It's as if the text and image themselves were ABOVE the events layer. = I've already tried tweaking the Zindex of the text and image containing = layers and the events layer, but to no avail.=20 Has anyone else experienced event handling problems like this in IE6? Thank you Thomas _______________________________________________ Dynapi-Widgetdev mailing list Dyn...@li... http://lists.sourceforge.net/lists/listinfo/dynapi-widgetdev |
From: Thomas V. <tv...@co...> - 2001-06-18 10:27:59
|
Hi all I am developing a treeview widget based on Pascal's skintreeview. It's based on a slightly older Dynapi (End of 2000 or so), but the problem should be the same today. I got my Dynapi to run on IE6 by changing one line in dynlayer.js: In the DynLayer.prototype.createElement function there is a if/else if construct, the last case of which is "else if (is.ie5 || is.ns5) {" or so. The entire if/else if tree disregards IE6. Therefore lyr is not set and this leads to more problems. As IE6 should behave much like IE5 and I expect future browsers to be standards compliant, I changed the whole line to "else". But now to my problem. My widget has DynLayers for the text and folder image plus an "levents" layer that handles clicks and mouseovers and so on. The problem is that the event handling layer gets no events directly over the text and the image. 1 pixel off the actual text or image, all events work. It's as if the text and image themselves were ABOVE the events layer. I've already tried tweaking the Zindex of the text and image containing layers and the events layer, but to no avail. Has anyone else experienced event handling problems like this in IE6? Thank you Thomas |
From: Day, O. V <ovd...@Gl...> - 2001-06-13 17:37:15
|
I am currently developing for a portal that needs a crossplatform DHTML menuList widget and I've been working with the DynAPI 1 version. This has a flaw that is discussed (very briefly) in another post but not really explained. Tomoki Tsuchida wrote on 2001.01.18: In IE5.5 the event layer doesn't respond unless there is something in the > layer, i.e. <img src="/images/spacer.gif">. I used to use menulist from > DynAPI 1 too, and basically I had to put the space image and set > its width > to the width of the menu and height to an arbitrary length :( He goes on to say it works fine in DynAPI2 but I can't find any reference to the widget he developed. Pascal Bestebroer goes on in a reply stating that he used a different technique "creates an url image for the background using javascript as the url: javascript:null" but again I couldn't find reference to this code. I did find a popUp menu in Pascal's resass.f2s.com directory (http://www.resass.f2s.com/dynapi/Pascal_Bestebroer_Dynacore_Examples/) but I don't think this is the same thing. I really would like to know if anyone has either patched the problem successfully in v1 of DynAPI so I can at least run the menu for now or ported the widget to API 2 so I can recode my autoGeneration tool to use the newer one. Any help at all would be appreciated. thanks, Oliver |
From: Michael P. <mp...@ph...> - 2001-06-13 03:38:12
|
Here's what the progressbar said in Mozilla 0.91 Error: redeclaration of function Image Source File: http://home.earthlink.net/~kendrasg/widget/ProgressBar/progressbar.js Line: 1 Error: ProgressBar is not defined Source File: http://home.earthlink.net/~kendrasg/widget/ProgressBar/levelData.js Line: 53 It worked fine in NS4.77 / IE5.0 in Win2000 Jeff Greenberg wrote: > Hello everyone.... > > I've been away for a while, but recently had a chance to update my widgets page. > Here's what's doing: > > The address is still: http://home.earthlink.net/~kendrasg/widget/ > > 1) Updated all the demo pages to work with DynAPI 2.53. > > 2) Updated the Slider widget, which now allows for horizontal as well as > vertical positioning (someome had asked me about this, but I lost their email > address, so if you happen to read this, please email me with any further > questions) > > 3) Updated the ColorPicker widget to use the latest slider widget. > > 4) NEW!--- Added a very customizable progress bar widget. > > I'd also love it if everyone could test these widgets out to make sure nothing > got broken with the new version of DynAPI. I've noticed some strange behaviors > under NS 4.X under Win98, but nothing consistent. > > Anyway, thanks and enjoy. > > Jeff Greenberg > je...@we... > > _______________________________________________ > Dynapi-Widgetdev mailing list > Dyn...@li... > http://lists.sourceforge.net/lists/listinfo/dynapi-widgetdev -- Michael Pemberton mp...@ph... ICQ: 12107010 |
From: Jeff G. <je...@we...> - 2001-06-12 20:44:31
|
Hello everyone.... I've been away for a while, but recently had a chance to update my widgets page. Here's what's doing: The address is still: http://home.earthlink.net/~kendrasg/widget/ 1) Updated all the demo pages to work with DynAPI 2.53. 2) Updated the Slider widget, which now allows for horizontal as well as vertical positioning (someome had asked me about this, but I lost their email address, so if you happen to read this, please email me with any further questions) 3) Updated the ColorPicker widget to use the latest slider widget. 4) NEW!--- Added a very customizable progress bar widget. I'd also love it if everyone could test these widgets out to make sure nothing got broken with the new version of DynAPI. I've noticed some strange behaviors under NS 4.X under Win98, but nothing consistent. Anyway, thanks and enjoy. Jeff Greenberg je...@we... |
From: <ma...@ir...> - 2001-06-05 09:55:20
|
Hi DynAPI/WidgetDev, I hope I am adressing the right mailing list for this purpose, I just joined it :-) I'm currently doing a homepage for one of my collegues mother, who is a textile-designer/artist. I wanted to make a fully interactive page that incorporates many of the features from the DynAPI, to make the actual browsing an exciting and interesting experience. See the working demo here: http://www.irisworks.dk/studsgarth/template.vaerk.asp I am NOT asking you to "deconstruct" the entire sourcecode of this page, but just to help me with a few questions that I have: 1: The comment/info (pushpanel) to the right does not automatically resize, although it has a "repack()" function attached. Only when clicked TWICE does the panel resize??? 2: Is there a way to suppress the page until the graphics used inside widgets such as the scrollpanel are fully done loading?? Right now it shows whenever the GetImage() statements are done, should I add the arrows/scrollbars/etc. to my list of GetImage() statements, and would that mean that I would have to change the source code of the involved widgets? (Maybe we should consider a standardized way to "skin" our widgets then) 3: In Netscape (4.5) - a DynImage (GIF with transparency) on top of a HTML page with a background picture becomes fully opaque. You would have to load the picture for background as (another) DynImage, and position it on top of the HTML page (I have disabled this right now in the example, it only loads a single picture) That's it! I hope somebody will be able to answer one or more of these questions, as I have only a beginning/learning understanding of the DynAPI methods... Thanks in advance!!! /Bjørn Næsby Nielsen |
From: Alain M. <ala...@em...> - 2001-05-23 22:48:38
|
Yeah, I had a problem with lists the first app I tried to write, one list would catch the other's select message. This 'should' fix it ... but it *may* introduce new bugs of its own ... your mileage may vary! You may notice that in for the 'afterSelect' functionality I have used setTimeout to call the 'external' function. The reason for this is because of my application which needs to do a fair amount of processing at that point, and for some reason this processing holds DynAPI back from redawing the screen even though it is the last statement in the method! Al. /* DynAPI Distribution FastList Class This Class is VERY similar to the standard FastList Class, however it is a LOT faster to create and has slightly better performance when running. It also has the ability to create horizontal lists. NB: the listItem does NOT inherit from the Label class for speed of execution ... the theory goes that less EventListeners = better performance The DynAPI Distribution is distributed under the terms of the GNU LGPL license. Requirements: dynapi.api [dynlayer, dyndocument, browser, events] */ function FastListItem(text,value){ this.DynLayer = DynLayer; this.DynLayer(); this.value = value; this.deselectable = true; this.isMouseOver = false; this.selected = false; this.index=-1 this.wrap = false; this.padding = 4; this.align = 'left'; this.itemStyle = {}; this.itemStyle.font = {}; this.itemStyle.font.family="arial"; this.itemStyle.font.size="2"; this.itemStyle.font.color = "#000000"; this.pWidth = false; this.pHeight = false; this.setText(text); this.addEventListener(FastListItem.listevents); // Ns6 hack this.first = true } FastListItem.prototype = new DynLayer(); FastListItem.listevents = new EventListener(); FastListItem.listevents.onmouseover = function (e) { e.cancelBrowserEvent(); var o = e.getSource(); o.list.listMouseOver(o.index) }; FastListItem.listevents.onmouseout = function (e) { e.cancelBrowserEvent(); var o = e.getSource(); o.list.listMouseOut(o.index) }; FastListItem.listevents.onmousedown = function (e) { e.cancelBrowserEvent(); var o = e.getSource(); o.setSelected(!o.selected); }; FastListItem.listevents.oncreate = function(e) { var o = e.getSource(); if (o.created&&(is.ie||is.dom)) { o.css.cursor="hand"; } }; FastListItem.listevents.onmouseup = function(e) { e.cancelBrowserEvent(); // This is needed because since mousedown are cancelled, NS4 does not generate its own 'click' event if(is.ns4) { var ne = new DynMouseEvent(e) ne.type = 'click' e.getSource().invokeEvent('click',ne) } }; FastListItem.listevents.onresize = function(e) { var o = e.getSource(); if (o.created) { if(is.ns&&o.wrap) o.setText(o.text) if(is.ns6&&o.first) {o.first=false;return} o.pack((o.getWidth()==null)||(o.wrap&&o.pWidth),o.getHeight()==null||o.pHeight) } }; FastListItem.prototype.setSelected = function(b) { if (this.selected==b || !this.deselectable) return; this.selected=b; if (b) { this.setBgColor(this.itemStyle.bgColorSelect); this.list.select(this) } else { this.setBgColor(this.isMouseOver?this.itemStyle.bgColorRoll:this.itemStyle.bgcolor) this.list.deselect(this) } }; FastListItem.prototype.setColors = function(bg,bgr,bgs,tn) { var s = this.itemStyle; s.bgcolor = bg||'#eeeeee'; s.bgColorRoll = bgr||'#cccccc'; s.bgColorSelect = bgs||'lightblue'; s.font.textColor = tn||'#000000'; this.setBgColor(s.bgcolor); this.setText(this.text); }; FastListItem.prototype.getValue = function() { return this.value; }; FastListItem.prototype.setText = function(text) { this.text = text || ''; var width = this.wrap? 'width='+this.w : ''; var wrap = this.wrap? '':'nowrap'; var t1 = '<table '+width+' cellpadding='+this.padding+' cellspacing=0 border=0><td align="'+this.align+'" '+wrap+'><font size="'+this.itemStyle.font.size+'" face="'+this.itemStyle.font.family+'" color="'; var t2 = '">'+this.text+'</font></td></table>'; this.textHTML = t1+this.itemStyle.font.color+t2; this.setHTML(this.textHTML); }; FastListItem.prototype.pack = function(bWidth,bHeight) { if (!bWidth && bWidth!=false) bWidth=true; if (!bHeight && bHeight!=false) bHeight=true; this.pWidth = bWidth; this.pHeight = bHeight; var w = bWidth? this.getContentWidth() : this.w; var h = bHeight? this.getContentHeight() : this.h; if (this.created) this.setSize(w,h,false); }; function FastList(){ this.DynLayer=DynLayer; this.DynLayer(); this.multiMode = false; this.items = []; this.addEventListener(FastList.listener); /*default style*/ this.listStyle = {}; this.listStyle.borders = 1; this.listStyle.spacing = 1; this.listStyle.bg = "#eeeeee"; this.listStyle.bgRoll = "#cccccc"; this.listStyle.bgSelect = "lightblue"; this.listStyle.textNormal = "#000000"; this.totalHeight = this.listStyle.borders; this.overIndex = -1; this.setVertical(); } FastList.prototype = new DynLayer(); FastList.listener = new EventListener() FastList.listener.oncreate = function(e){ var o = e.getSource(); o.arrangeItems(); }; FastList.listener.afterSelect = function(e){ var o = e.getSource(); o.afterSelect(); }; FastList.prototype.setVertical = function() { this.vertical = true; this.horizontal = false; }; FastList.prototype.setHorizontal = function() { this.vertical = false; this.horizontal = true; }; FastList.prototype.add = function(text,value){ var i = new FastListItem(text,value); i.list = this; var ls = this.listStyle; i.setColors(ls.bg,ls.bgRoll,ls.bgSelect,ls.textNormal); i.index=this.items.length this.items[this.items.length] = i; this.addChild(i); }; FastList.prototype.arrangeItems = function(){ if (this.vertical) { this.totalHeight = this.listStyle.borders; for (var i=0;i<this.items.length;i++){ this.items[i].moveTo(this.listStyle.borders,this.totalHeight); this.items[i].setWidth(this.w-this.listStyle.borders*2); this.totalHeight = this.totalHeight+this.items[i].h+this.listStyle.spacing; } this.setHeight(this.totalHeight-this.listStyle.spacing+this.listStyle.borders); } else { this.totalWidth = this.listStyle.borders; for (var i=0;i<this.items.length;i++){ this.items[i].moveTo(this.totalWidth,this.listStyle.borders); this.items[i].setHeight(this.h-this.listStyle.borders*2); this.totalWidth = this.totalWidth+this.items[i].w+this.listStyle.spacing; } this.setWidth(this.totalWidth-this.listStyle.spacing+this.listStyle.borders); } }; FastList.prototype.remove = function(item){ var i = this.getIndexOf(item); if (i==-1) return; this.items[i].deleteFromParent(); Methods.removeFromArray(this.items,item); if (this.selectedIndex==i){ this.selectedIndex=-1; this.selectedItem=null; } }; FastList.prototype.removeAll = function(){ for (var i=this.items.length-1; i>-1; i--) { this.items[i].removeFromParent(); } delete this.items this.items=[]; this.selectedIndex=-1; this.selectedItem=null; }; FastList.prototype.origSetWidth = DynLayer.prototype.setWidth; FastList.prototype.setWidth = function(w){ this.origSetWidth(w); if (this.vertical) { for (var i=0;i<this.items.length;i++){ this.items[i].setWidth(w-this.listStyle.borders*2); } } }; FastList.prototype.origSetHeight = DynLayer.prototype.setHeight; FastList.prototype.setHeight = function(w){ this.origSetHeight(w); if (!this.vertical) { for (var i=0;i<this.items.length;i++){ this.items[i].setHeight(w-this.listStyle.borders*2); } } }; FastList.prototype.getIndexOf = function(item){ for (var i=0;i<this.items.length;i++){ if (this.items[i]==item) return i; } return -1; }; FastList.prototype.afterSelect = function() {}; FastList.prototype.select = function(item){ var oldSelectedIndex=this.selectedIndex this.selectedIndex = this.getIndexOf(item); this.selectedItem = item; if (!this.multiMode) { // APM - 04/04/01 - Unset the previously selected index if (oldSelectedIndex > -1) this.items[oldSelectedIndex].setSelected(false); } setTimeout(this.afterSelect,1); }; FastList.prototype.selectIndex = function (i) { this.items[i].setSelected(true); }; FastList.prototype.deselect = function(item){ if (this.selectedItem == item){ this.selectedItem = null; this.selectedIndex = -1; } }; FastList.prototype.deselectAll = function(){ for (var i=0;i<this.items.length;i++) { if (this.items[i].selected) this.items[i].setSelected(false); } }; FastList.prototype.setSelectionMode = function(mode) { this.deselectAll(); this.multiMode = mode; }; FastList.prototype.setColors = function(bg,bgRoll,bgSelect,textNormal){ var ls = this.listStyle; ls.bg = bg||ls.bg; ls.bgRoll = bgRoll||ls.bgRoll; ls.bgSelect = bgSelect||ls.bgSelect; ls.textNormal = textNormal||ls.textNormal; if (this.items.length == 0) return; for (var i=0;i<this.items.length;i++) { this.items[i].setColors(bg,bgRoll,bgSelect,textNormal); } }; FastList.prototype.getSelectedIndex = function() { return this.selectedIndex; }; FastList.prototype.getSelectedItem = function() { return this.selectedItem; }; FastList.prototype.getSelectedIndexes = function() { var a = []; for (var i=0;i<this.items.length;i++) if (this.items[i].selected) a[a.length] = i; return a; }; FastList.prototype.setBorders = function(b){ this.listStyle.borders = b; }; FastList.prototype.setSpacing = function(b){ this.listStyle.spacing = b; }; FastList.prototype.listMouseOver = function (i){ if (this.overIndex>-1) { var o = this.items[this.overIndex] if (!o.selected) { o.setBgColor(o.itemStyle.bgcolor); } o.isMouseOver = false; } var o = this.items[i] if (!o.selected) { o.setBgColor(o.itemStyle.bgColorRoll); o.isMouseOver = true; } this.overIndex=i }; FastList.prototype.listMouseOut = function (i){ if (this.overIndex>-1) { var o = this.items[this.overIndex] if (!o.selected) { o.setBgColor(o.itemStyle.bgcolor); } o.isMouseOver = false; } var o = this.items[i] if (!o.selected) { o.setBgColor(o.itemStyle.bgcolor); } o.isMouseOver = false; this.overIndex=-1 }; ----------------------------------------------- FREE! The World's Best Email Address @email.com Reserve your name now at http://www.email.com |
From: Richard B. <ric...@sk...> - 2001-05-21 18:45:40
|
No nastiness intended - haven't had any of that on this list as long as I can remember, an I like that :o) ----- Original Message ----- From: "A. Joannou" <ari...@nt...> To: <dyn...@li...> Sent: 21 May, 2001 17:18 Subject: RE: [Dynapi-Widgetdev] Events fire all over the place on subclasses > We do not need to get nasty and therefore I need to make one thing clear. > I have not misunderstood. On the contrary, I am all FOR the project, and > appreciate what's available as building blocks. I have been using the API > since Dan wrote the first version and have never expected anything more > than what was already there. I never had the time to contribute to > the project, and maybe that time has come. Sadly, I have not been involved > with the 'Event' side of things which seems to be involved right done to the > core and I do not want to mess around with that. > Thanks for your help. > > -----Original Message----- > From: dyn...@li... > [mailto:dyn...@li...]On Behalf Of > Richard Bennett > Sent: 21 May 2001 15:43 > To: dyn...@li... > Subject: Re: [Dynapi-Widgetdev] Events fire all over the place on > subclasses > > > In case you misunderstood, this is open-source software, distributed under > the GNU license. > In this case that means that any effort you, or anyone, put into the project > is entirely voluntary, and unpaid. > Basically we all need a robust tool for dhtml, and do our bit to contribute > as we can. > Let's leave who can help as an open question, they all read this list, and > whoever can will take a look. > It's been registered as a bug, so will be tackled sooner or later. > > It seems pretty basic to the whole inheritance idea that this should work, > but obviously something went wrong with the event listeners. > > Richard. > > ----- Original Message ----- > From: "A. Joannou" <ari...@nt...> > To: <dyn...@li...> > Sent: 21 May, 2001 13:04 > Subject: RE: [Dynapi-Widgetdev] Events fire all over the place on subclasses > > > > Richard, > > > > Thanks for the prompt reply! I hope tey pay you well! > > Do you think I/we should let someone else know that can fix this? > > The problem is a global one affecting any secondary+ subclass, and > > needs to be addressed I think, because bypasses and shortcuts > > for quick solutions are always available. Who do you think would > > be the best person to contact on the matter? > > > > Deli > > > > -----Original Message----- > > From: dyn...@li... > > [mailto:dyn...@li...]On Behalf Of > > Richard Bennett > > Sent: 21 May 2001 07:34 > > To: dyn...@li... > > Subject: Re: [Dynapi-Widgetdev] Events fire all over the place on > > subclasses > > > > > > hi, > > I did some research on this, see: > > http://www.richardinfo.f2s.com/dynapi/Deli/ > > > > To cut a long story short, this problem happens with lists, scrollpanes, > and > > pushpanel. > > The problem with lists is down to a bug in that widget itself, and only > > happens when listening for onselect - use onmouseup instead. > > > > The problem with scrollpanes and pushpanel, comes because these are the > only > > two widgets at the moment NOT prototyped off a DynLayer, but prototyped > off > > a viewport in this case. > > Obviously our inheritance model isn't working as it should . > > If you change scrollpane, so it inherits from DynLayer, and add viewport > as > > a child, it works as it should, regarding eventlisteners. > > What changed since version 2, when I suspect this worked normally, has > been > > the setting of the IDs, I tried a few things here, but couldn't find the > > final solution. > > Nice but no cigar, as they say. > > Maybe someone more at home with DynAPI's inheritance can help out here. > > > > Richard. > > > > > > > > ----- Original Message ----- > > From: "A. Joannou" <ari...@nt...> > > To: <dyn...@li...> > > Sent: 20 May, 2001 22:12 > > Subject: [Dynapi-Widgetdev] Events fire all over the place on subclasses > > > > > > > Hi, > > > My name is Deli, and I am facing a HUGE problem. > > > On objects made from other objects which in turn are made from the > > DynLayer > > > (e.g. scrollPane), eventListeners placed on one object, fire on ALL of > > them > > > as outlined in the following example. Why is this? Is there a solution? > > > This problem is apparent on any objects created in the same way (e.g. if > I > > > create an object 'A' based on DynLayer, and then create an object 'B' > > based > > > on object 'A', the same problem occurs). > > > This makes programming of complex objects IMPOSSIBLE. > > > > > > Looking forward to your prompt reply. > > > Deli. > > > > > > PS. Below is a simple Scrollpane example (example#1) outlining the > > problem. > > > Scrollpane#1 and Scrollpane#2 are created, but only Scrollpane#1 is > given > > an > > > eventlistener to listen for the 'create' event. > > > The problem is that the event fires ALSO when the Scrollpane#2 is > created, > > > when REALLY I haven't asked it to. > > > This does NOT happen if the example was made with DynLayers (example#2). > > > > > > example#1 > > > <html> > > > <head> > > > <title>CoreLib example</title> > > > > > > </head> > > > > > > <script language="Javascript" src="../src/dynapi.js"></script> > > > <script language="Javascript"> > > > > > > DynAPI.setLibraryPath('../src/lib/') > > > DynAPI.include('dynapi.api.*'); > > > DynAPI.include('dynapi.event.*') > > > DynAPI.include('dynapi.util.thread.js'); > > > DynAPI.include('dynapi.util.pathanim.js'); > > > DynAPI.include('dynapi.gui.dynimage.js'); > > > DynAPI.include('dynapi.gui.button.js'); > > > DynAPI.include('dynapi.gui.scrollbar.js'); > > > DynAPI.include('dynapi.gui.viewport.js'); > > > DynAPI.include('dynapi.gui.scrollpane.js'); > > > DynAPI.include('dynapi.gui.label.js'); > > > > > > > > > > > > //########################################################################## > > > ################## > > > DynAPI.onLoad=function() { > > > label1 = new Label('<table border=1><tr><td width=160 height=160>label 1 > > > alk jskj slkj k dkjkj dk skslkdjf lskd f</td></tr></table>') > > > label1.setWrap(false) > > > label1.setPadding(5) > > > label1.setBgColor('cyan') > > > label1.setSize(160,160) > > > > > > label2 = new Label('<table border=1><tr><td width=160 height=160>label 1 > > > alk jskj slkj k dkjkj dk skslkdjf lskd f</td></tr></table>') > > > label2.setWrap(false) > > > label2.setPadding(5) > > > label2.setBgColor('cyan') > > > label2.setSize(160,160) > > > > > > > > > > > > > > > //########################################################################## > > > #################// > > > //SCROLLPANE#1 > > > > > > > > > //########################################################################## > > > #################// > > > var scrollpane1 = new ScrollPane(label1); > > > scrollpane1.setSize(150,150) > > > scrollpane1.moveTo(250,50) > > > scrollpane1.setBgColor('#c0c0c0') > > > > > > > > > > > > //########################################################################## > > > ## > > > //EVENT LISTENERS > > > > > > > > > //########################################################################## > > > ## > > > var EListener1 = new EventListener(); > > > > > > > > > //########################################################################## > > > ## > > > EListener1.oncreate = function(e) { > > > var o=e.getSource(); > > > alert("from SP1: "+o.id); > > > }; > > > scrollpane1.addEventListener(EListener1); > > > > > > DynAPI.document.addChild(scrollpane1); > > > > > > > > > > > > //########################################################################## > > > #################// > > > //SCROLLPANE#2 > > > > > > > > > //########################################################################## > > > #################// > > > var scrollpane2 = new ScrollPane(label2); > > > scrollpane2.setSize(150,150) > > > scrollpane2.moveTo(250,300) > > > scrollpane2.setBgColor('#c0c0c0') > > > DynAPI.document.addChild(scrollpane2); > > > > > > > > > > > > > > > } > > > > > > </script> > > > > > > > > > <body bgcolor="#ffffff"> > > > </body> > > > </html> > > > > > > > > > Below is the DynLayer example in which THIS effect does NOT happen. > > > The code has not been changed apart from the declarations of the objects > > > new ScrollPane(label2) -> new DynLayer() ) > > > > > > example#2 > > > <html> > > > <head> > > > <title>CoreLib example</title> > > > > > > </head> > > > > > > <script language="Javascript" src="../src/dynapi.js"></script> > > > <script language="Javascript"> > > > > > > DynAPI.setLibraryPath('../src/lib/') > > > DynAPI.include('dynapi.api.*'); > > > DynAPI.include('dynapi.event.*') > > > DynAPI.include('dynapi.util.thread.js'); > > > DynAPI.include('dynapi.util.pathanim.js'); > > > DynAPI.include('dynapi.gui.dynimage.js'); > > > DynAPI.include('dynapi.gui.button.js'); > > > DynAPI.include('dynapi.gui.scrollbar.js'); > > > DynAPI.include('dynapi.gui.viewport.js'); > > > DynAPI.include('dynapi.gui.scrollpane.js'); > > > DynAPI.include('dynapi.gui.label.js'); > > > > > > > > > > > > //########################################################################## > > > ################## > > > DynAPI.onLoad=function() { > > > label1 = new Label('<table border=1><tr><td width=160 height=160>label 1 > > > alk jskj slkj k dkjkj dk skslkdjf lskd f</td></tr></table>') > > > label1.setWrap(false) > > > label1.setPadding(5) > > > label1.setBgColor('cyan') > > > label1.setSize(160,160) > > > > > > label2 = new Label('<table border=1><tr><td width=160 height=160>label 1 > > > alk jskj slkj k dkjkj dk skslkdjf lskd f</td></tr></table>') > > > label2.setWrap(false) > > > label2.setPadding(5) > > > label2.setBgColor('cyan') > > > label2.setSize(160,160) > > > > > > > > > > > > > > > //########################################################################## > > > #################// > > > //SCROLLPANE#1 > > > > > > > > > //########################################################################## > > > #################// > > > var scrollpane1 = new DynLayer(); > > > scrollpane1.setSize(150,150) > > > scrollpane1.moveTo(250,50) > > > scrollpane1.setBgColor('#c0c0c0') > > > > > > > > > > > > //########################################################################## > > > ## > > > //EVENT LISTENERS > > > > > > > > > //########################################################################## > > > ## > > > var EListener1 = new EventListener(); > > > > > > > > > //########################################################################## > > > ## > > > EListener1.oncreate = function(e) { > > > var o=e.getSource(); > > > alert("from SP1: "+o.id); > > > }; > > > scrollpane1.addEventListener(EListener1); > > > > > > DynAPI.document.addChild(scrollpane1); > > > > > > > > > > > > //########################################################################## > > > #################// > > > //SCROLLPANE#2 > > > > > > > > > //########################################################################## > > > #################// > > > var scrollpane2 = new DynLayer(); > > > scrollpane2.setSize(150,150) > > > scrollpane2.moveTo(250,300) > > > scrollpane2.setBgColor('#c0c0c0') > > > DynAPI.document.addChild(scrollpane2); > > > > > > > > > > > > > > > } > > > > > > </script> > > > > > > > > > <body bgcolor="#ffffff"> > > > </body> > > > </html> > > > > > > > > > _______________________________________________ > > > Dynapi-Widgetdev mailing list > > > Dyn...@li... > > > http://lists.sourceforge.net/lists/listinfo/dynapi-widgetdev > > > > > > > > > _______________________________________________ > > Dynapi-Widgetdev mailing list > > Dyn...@li... > > http://lists.sourceforge.net/lists/listinfo/dynapi-widgetdev > > > > > > _______________________________________________ > > Dynapi-Widgetdev mailing list > > Dyn...@li... > > http://lists.sourceforge.net/lists/listinfo/dynapi-widgetdev > > > > > _______________________________________________ > Dynapi-Widgetdev mailing list > Dyn...@li... > http://lists.sourceforge.net/lists/listinfo/dynapi-widgetdev > > > _______________________________________________ > Dynapi-Widgetdev mailing list > Dyn...@li... > http://lists.sourceforge.net/lists/listinfo/dynapi-widgetdev > |
From: A. J. <ari...@nt...> - 2001-05-21 15:17:57
|
We do not need to get nasty and therefore I need to make one thing clear. I have not misunderstood. On the contrary, I am all FOR the project, and appreciate what's available as building blocks. I have been using the API since Dan wrote the first version and have never expected anything more than what was already there. I never had the time to contribute to the project, and maybe that time has come. Sadly, I have not been involved with the 'Event' side of things which seems to be involved right done to the core and I do not want to mess around with that. Thanks for your help. -----Original Message----- From: dyn...@li... [mailto:dyn...@li...]On Behalf Of Richard Bennett Sent: 21 May 2001 15:43 To: dyn...@li... Subject: Re: [Dynapi-Widgetdev] Events fire all over the place on subclasses In case you misunderstood, this is open-source software, distributed under the GNU license. In this case that means that any effort you, or anyone, put into the project is entirely voluntary, and unpaid. Basically we all need a robust tool for dhtml, and do our bit to contribute as we can. Let's leave who can help as an open question, they all read this list, and whoever can will take a look. It's been registered as a bug, so will be tackled sooner or later. It seems pretty basic to the whole inheritance idea that this should work, but obviously something went wrong with the event listeners. Richard. ----- Original Message ----- From: "A. Joannou" <ari...@nt...> To: <dyn...@li...> Sent: 21 May, 2001 13:04 Subject: RE: [Dynapi-Widgetdev] Events fire all over the place on subclasses > Richard, > > Thanks for the prompt reply! I hope tey pay you well! > Do you think I/we should let someone else know that can fix this? > The problem is a global one affecting any secondary+ subclass, and > needs to be addressed I think, because bypasses and shortcuts > for quick solutions are always available. Who do you think would > be the best person to contact on the matter? > > Deli > > -----Original Message----- > From: dyn...@li... > [mailto:dyn...@li...]On Behalf Of > Richard Bennett > Sent: 21 May 2001 07:34 > To: dyn...@li... > Subject: Re: [Dynapi-Widgetdev] Events fire all over the place on > subclasses > > > hi, > I did some research on this, see: > http://www.richardinfo.f2s.com/dynapi/Deli/ > > To cut a long story short, this problem happens with lists, scrollpanes, and > pushpanel. > The problem with lists is down to a bug in that widget itself, and only > happens when listening for onselect - use onmouseup instead. > > The problem with scrollpanes and pushpanel, comes because these are the only > two widgets at the moment NOT prototyped off a DynLayer, but prototyped off > a viewport in this case. > Obviously our inheritance model isn't working as it should . > If you change scrollpane, so it inherits from DynLayer, and add viewport as > a child, it works as it should, regarding eventlisteners. > What changed since version 2, when I suspect this worked normally, has been > the setting of the IDs, I tried a few things here, but couldn't find the > final solution. > Nice but no cigar, as they say. > Maybe someone more at home with DynAPI's inheritance can help out here. > > Richard. > > > > ----- Original Message ----- > From: "A. Joannou" <ari...@nt...> > To: <dyn...@li...> > Sent: 20 May, 2001 22:12 > Subject: [Dynapi-Widgetdev] Events fire all over the place on subclasses > > > > Hi, > > My name is Deli, and I am facing a HUGE problem. > > On objects made from other objects which in turn are made from the > DynLayer > > (e.g. scrollPane), eventListeners placed on one object, fire on ALL of > them > > as outlined in the following example. Why is this? Is there a solution? > > This problem is apparent on any objects created in the same way (e.g. if I > > create an object 'A' based on DynLayer, and then create an object 'B' > based > > on object 'A', the same problem occurs). > > This makes programming of complex objects IMPOSSIBLE. > > > > Looking forward to your prompt reply. > > Deli. > > > > PS. Below is a simple Scrollpane example (example#1) outlining the > problem. > > Scrollpane#1 and Scrollpane#2 are created, but only Scrollpane#1 is given > an > > eventlistener to listen for the 'create' event. > > The problem is that the event fires ALSO when the Scrollpane#2 is created, > > when REALLY I haven't asked it to. > > This does NOT happen if the example was made with DynLayers (example#2). > > > > example#1 > > <html> > > <head> > > <title>CoreLib example</title> > > > > </head> > > > > <script language="Javascript" src="../src/dynapi.js"></script> > > <script language="Javascript"> > > > > DynAPI.setLibraryPath('../src/lib/') > > DynAPI.include('dynapi.api.*'); > > DynAPI.include('dynapi.event.*') > > DynAPI.include('dynapi.util.thread.js'); > > DynAPI.include('dynapi.util.pathanim.js'); > > DynAPI.include('dynapi.gui.dynimage.js'); > > DynAPI.include('dynapi.gui.button.js'); > > DynAPI.include('dynapi.gui.scrollbar.js'); > > DynAPI.include('dynapi.gui.viewport.js'); > > DynAPI.include('dynapi.gui.scrollpane.js'); > > DynAPI.include('dynapi.gui.label.js'); > > > > > > > //########################################################################## > > ################## > > DynAPI.onLoad=function() { > > label1 = new Label('<table border=1><tr><td width=160 height=160>label 1 > > alk jskj slkj k dkjkj dk skslkdjf lskd f</td></tr></table>') > > label1.setWrap(false) > > label1.setPadding(5) > > label1.setBgColor('cyan') > > label1.setSize(160,160) > > > > label2 = new Label('<table border=1><tr><td width=160 height=160>label 1 > > alk jskj slkj k dkjkj dk skslkdjf lskd f</td></tr></table>') > > label2.setWrap(false) > > label2.setPadding(5) > > label2.setBgColor('cyan') > > label2.setSize(160,160) > > > > > > > > > //########################################################################## > > #################// > > //SCROLLPANE#1 > > > > > //########################################################################## > > #################// > > var scrollpane1 = new ScrollPane(label1); > > scrollpane1.setSize(150,150) > > scrollpane1.moveTo(250,50) > > scrollpane1.setBgColor('#c0c0c0') > > > > > > > //########################################################################## > > ## > > //EVENT LISTENERS > > > > > //########################################################################## > > ## > > var EListener1 = new EventListener(); > > > > > //########################################################################## > > ## > > EListener1.oncreate = function(e) { > > var o=e.getSource(); > > alert("from SP1: "+o.id); > > }; > > scrollpane1.addEventListener(EListener1); > > > > DynAPI.document.addChild(scrollpane1); > > > > > > > //########################################################################## > > #################// > > //SCROLLPANE#2 > > > > > //########################################################################## > > #################// > > var scrollpane2 = new ScrollPane(label2); > > scrollpane2.setSize(150,150) > > scrollpane2.moveTo(250,300) > > scrollpane2.setBgColor('#c0c0c0') > > DynAPI.document.addChild(scrollpane2); > > > > > > > > > > } > > > > </script> > > > > > > <body bgcolor="#ffffff"> > > </body> > > </html> > > > > > > Below is the DynLayer example in which THIS effect does NOT happen. > > The code has not been changed apart from the declarations of the objects > > new ScrollPane(label2) -> new DynLayer() ) > > > > example#2 > > <html> > > <head> > > <title>CoreLib example</title> > > > > </head> > > > > <script language="Javascript" src="../src/dynapi.js"></script> > > <script language="Javascript"> > > > > DynAPI.setLibraryPath('../src/lib/') > > DynAPI.include('dynapi.api.*'); > > DynAPI.include('dynapi.event.*') > > DynAPI.include('dynapi.util.thread.js'); > > DynAPI.include('dynapi.util.pathanim.js'); > > DynAPI.include('dynapi.gui.dynimage.js'); > > DynAPI.include('dynapi.gui.button.js'); > > DynAPI.include('dynapi.gui.scrollbar.js'); > > DynAPI.include('dynapi.gui.viewport.js'); > > DynAPI.include('dynapi.gui.scrollpane.js'); > > DynAPI.include('dynapi.gui.label.js'); > > > > > > > //########################################################################## > > ################## > > DynAPI.onLoad=function() { > > label1 = new Label('<table border=1><tr><td width=160 height=160>label 1 > > alk jskj slkj k dkjkj dk skslkdjf lskd f</td></tr></table>') > > label1.setWrap(false) > > label1.setPadding(5) > > label1.setBgColor('cyan') > > label1.setSize(160,160) > > > > label2 = new Label('<table border=1><tr><td width=160 height=160>label 1 > > alk jskj slkj k dkjkj dk skslkdjf lskd f</td></tr></table>') > > label2.setWrap(false) > > label2.setPadding(5) > > label2.setBgColor('cyan') > > label2.setSize(160,160) > > > > > > > > > //########################################################################## > > #################// > > //SCROLLPANE#1 > > > > > //########################################################################## > > #################// > > var scrollpane1 = new DynLayer(); > > scrollpane1.setSize(150,150) > > scrollpane1.moveTo(250,50) > > scrollpane1.setBgColor('#c0c0c0') > > > > > > > //########################################################################## > > ## > > //EVENT LISTENERS > > > > > //########################################################################## > > ## > > var EListener1 = new EventListener(); > > > > > //########################################################################## > > ## > > EListener1.oncreate = function(e) { > > var o=e.getSource(); > > alert("from SP1: "+o.id); > > }; > > scrollpane1.addEventListener(EListener1); > > > > DynAPI.document.addChild(scrollpane1); > > > > > > > //########################################################################## > > #################// > > //SCROLLPANE#2 > > > > > //########################################################################## > > #################// > > var scrollpane2 = new DynLayer(); > > scrollpane2.setSize(150,150) > > scrollpane2.moveTo(250,300) > > scrollpane2.setBgColor('#c0c0c0') > > DynAPI.document.addChild(scrollpane2); > > > > > > > > > > } > > > > </script> > > > > > > <body bgcolor="#ffffff"> > > </body> > > </html> > > > > > > _______________________________________________ > > Dynapi-Widgetdev mailing list > > Dyn...@li... > > http://lists.sourceforge.net/lists/listinfo/dynapi-widgetdev > > > > > _______________________________________________ > Dynapi-Widgetdev mailing list > Dyn...@li... > http://lists.sourceforge.net/lists/listinfo/dynapi-widgetdev > > > _______________________________________________ > Dynapi-Widgetdev mailing list > Dyn...@li... > http://lists.sourceforge.net/lists/listinfo/dynapi-widgetdev > _______________________________________________ Dynapi-Widgetdev mailing list Dyn...@li... http://lists.sourceforge.net/lists/listinfo/dynapi-widgetdev |
From: Richard B. <ric...@sk...> - 2001-05-21 14:45:22
|
In case you misunderstood, this is open-source software, distributed under the GNU license. In this case that means that any effort you, or anyone, put into the project is entirely voluntary, and unpaid. Basically we all need a robust tool for dhtml, and do our bit to contribute as we can. Let's leave who can help as an open question, they all read this list, and whoever can will take a look. It's been registered as a bug, so will be tackled sooner or later. It seems pretty basic to the whole inheritance idea that this should work, but obviously something went wrong with the event listeners. Richard. ----- Original Message ----- From: "A. Joannou" <ari...@nt...> To: <dyn...@li...> Sent: 21 May, 2001 13:04 Subject: RE: [Dynapi-Widgetdev] Events fire all over the place on subclasses > Richard, > > Thanks for the prompt reply! I hope tey pay you well! > Do you think I/we should let someone else know that can fix this? > The problem is a global one affecting any secondary+ subclass, and > needs to be addressed I think, because bypasses and shortcuts > for quick solutions are always available. Who do you think would > be the best person to contact on the matter? > > Deli > > -----Original Message----- > From: dyn...@li... > [mailto:dyn...@li...]On Behalf Of > Richard Bennett > Sent: 21 May 2001 07:34 > To: dyn...@li... > Subject: Re: [Dynapi-Widgetdev] Events fire all over the place on > subclasses > > > hi, > I did some research on this, see: > http://www.richardinfo.f2s.com/dynapi/Deli/ > > To cut a long story short, this problem happens with lists, scrollpanes, and > pushpanel. > The problem with lists is down to a bug in that widget itself, and only > happens when listening for onselect - use onmouseup instead. > > The problem with scrollpanes and pushpanel, comes because these are the only > two widgets at the moment NOT prototyped off a DynLayer, but prototyped off > a viewport in this case. > Obviously our inheritance model isn't working as it should . > If you change scrollpane, so it inherits from DynLayer, and add viewport as > a child, it works as it should, regarding eventlisteners. > What changed since version 2, when I suspect this worked normally, has been > the setting of the IDs, I tried a few things here, but couldn't find the > final solution. > Nice but no cigar, as they say. > Maybe someone more at home with DynAPI's inheritance can help out here. > > Richard. > > > > ----- Original Message ----- > From: "A. Joannou" <ari...@nt...> > To: <dyn...@li...> > Sent: 20 May, 2001 22:12 > Subject: [Dynapi-Widgetdev] Events fire all over the place on subclasses > > > > Hi, > > My name is Deli, and I am facing a HUGE problem. > > On objects made from other objects which in turn are made from the > DynLayer > > (e.g. scrollPane), eventListeners placed on one object, fire on ALL of > them > > as outlined in the following example. Why is this? Is there a solution? > > This problem is apparent on any objects created in the same way (e.g. if I > > create an object 'A' based on DynLayer, and then create an object 'B' > based > > on object 'A', the same problem occurs). > > This makes programming of complex objects IMPOSSIBLE. > > > > Looking forward to your prompt reply. > > Deli. > > > > PS. Below is a simple Scrollpane example (example#1) outlining the > problem. > > Scrollpane#1 and Scrollpane#2 are created, but only Scrollpane#1 is given > an > > eventlistener to listen for the 'create' event. > > The problem is that the event fires ALSO when the Scrollpane#2 is created, > > when REALLY I haven't asked it to. > > This does NOT happen if the example was made with DynLayers (example#2). > > > > example#1 > > <html> > > <head> > > <title>CoreLib example</title> > > > > </head> > > > > <script language="Javascript" src="../src/dynapi.js"></script> > > <script language="Javascript"> > > > > DynAPI.setLibraryPath('../src/lib/') > > DynAPI.include('dynapi.api.*'); > > DynAPI.include('dynapi.event.*') > > DynAPI.include('dynapi.util.thread.js'); > > DynAPI.include('dynapi.util.pathanim.js'); > > DynAPI.include('dynapi.gui.dynimage.js'); > > DynAPI.include('dynapi.gui.button.js'); > > DynAPI.include('dynapi.gui.scrollbar.js'); > > DynAPI.include('dynapi.gui.viewport.js'); > > DynAPI.include('dynapi.gui.scrollpane.js'); > > DynAPI.include('dynapi.gui.label.js'); > > > > > > > //########################################################################## > > ################## > > DynAPI.onLoad=function() { > > label1 = new Label('<table border=1><tr><td width=160 height=160>label 1 > > alk jskj slkj k dkjkj dk skslkdjf lskd f</td></tr></table>') > > label1.setWrap(false) > > label1.setPadding(5) > > label1.setBgColor('cyan') > > label1.setSize(160,160) > > > > label2 = new Label('<table border=1><tr><td width=160 height=160>label 1 > > alk jskj slkj k dkjkj dk skslkdjf lskd f</td></tr></table>') > > label2.setWrap(false) > > label2.setPadding(5) > > label2.setBgColor('cyan') > > label2.setSize(160,160) > > > > > > > > > //########################################################################## > > #################// > > //SCROLLPANE#1 > > > > > //########################################################################## > > #################// > > var scrollpane1 = new ScrollPane(label1); > > scrollpane1.setSize(150,150) > > scrollpane1.moveTo(250,50) > > scrollpane1.setBgColor('#c0c0c0') > > > > > > > //########################################################################## > > ## > > //EVENT LISTENERS > > > > > //########################################################################## > > ## > > var EListener1 = new EventListener(); > > > > > //########################################################################## > > ## > > EListener1.oncreate = function(e) { > > var o=e.getSource(); > > alert("from SP1: "+o.id); > > }; > > scrollpane1.addEventListener(EListener1); > > > > DynAPI.document.addChild(scrollpane1); > > > > > > > //########################################################################## > > #################// > > //SCROLLPANE#2 > > > > > //########################################################################## > > #################// > > var scrollpane2 = new ScrollPane(label2); > > scrollpane2.setSize(150,150) > > scrollpane2.moveTo(250,300) > > scrollpane2.setBgColor('#c0c0c0') > > DynAPI.document.addChild(scrollpane2); > > > > > > > > > > } > > > > </script> > > > > > > <body bgcolor="#ffffff"> > > </body> > > </html> > > > > > > Below is the DynLayer example in which THIS effect does NOT happen. > > The code has not been changed apart from the declarations of the objects > > new ScrollPane(label2) -> new DynLayer() ) > > > > example#2 > > <html> > > <head> > > <title>CoreLib example</title> > > > > </head> > > > > <script language="Javascript" src="../src/dynapi.js"></script> > > <script language="Javascript"> > > > > DynAPI.setLibraryPath('../src/lib/') > > DynAPI.include('dynapi.api.*'); > > DynAPI.include('dynapi.event.*') > > DynAPI.include('dynapi.util.thread.js'); > > DynAPI.include('dynapi.util.pathanim.js'); > > DynAPI.include('dynapi.gui.dynimage.js'); > > DynAPI.include('dynapi.gui.button.js'); > > DynAPI.include('dynapi.gui.scrollbar.js'); > > DynAPI.include('dynapi.gui.viewport.js'); > > DynAPI.include('dynapi.gui.scrollpane.js'); > > DynAPI.include('dynapi.gui.label.js'); > > > > > > > //########################################################################## > > ################## > > DynAPI.onLoad=function() { > > label1 = new Label('<table border=1><tr><td width=160 height=160>label 1 > > alk jskj slkj k dkjkj dk skslkdjf lskd f</td></tr></table>') > > label1.setWrap(false) > > label1.setPadding(5) > > label1.setBgColor('cyan') > > label1.setSize(160,160) > > > > label2 = new Label('<table border=1><tr><td width=160 height=160>label 1 > > alk jskj slkj k dkjkj dk skslkdjf lskd f</td></tr></table>') > > label2.setWrap(false) > > label2.setPadding(5) > > label2.setBgColor('cyan') > > label2.setSize(160,160) > > > > > > > > > //########################################################################## > > #################// > > //SCROLLPANE#1 > > > > > //########################################################################## > > #################// > > var scrollpane1 = new DynLayer(); > > scrollpane1.setSize(150,150) > > scrollpane1.moveTo(250,50) > > scrollpane1.setBgColor('#c0c0c0') > > > > > > > //########################################################################## > > ## > > //EVENT LISTENERS > > > > > //########################################################################## > > ## > > var EListener1 = new EventListener(); > > > > > //########################################################################## > > ## > > EListener1.oncreate = function(e) { > > var o=e.getSource(); > > alert("from SP1: "+o.id); > > }; > > scrollpane1.addEventListener(EListener1); > > > > DynAPI.document.addChild(scrollpane1); > > > > > > > //########################################################################## > > #################// > > //SCROLLPANE#2 > > > > > //########################################################################## > > #################// > > var scrollpane2 = new DynLayer(); > > scrollpane2.setSize(150,150) > > scrollpane2.moveTo(250,300) > > scrollpane2.setBgColor('#c0c0c0') > > DynAPI.document.addChild(scrollpane2); > > > > > > > > > > } > > > > </script> > > > > > > <body bgcolor="#ffffff"> > > </body> > > </html> > > > > > > _______________________________________________ > > Dynapi-Widgetdev mailing list > > Dyn...@li... > > http://lists.sourceforge.net/lists/listinfo/dynapi-widgetdev > > > > > _______________________________________________ > Dynapi-Widgetdev mailing list > Dyn...@li... > http://lists.sourceforge.net/lists/listinfo/dynapi-widgetdev > > > _______________________________________________ > Dynapi-Widgetdev mailing list > Dyn...@li... > http://lists.sourceforge.net/lists/listinfo/dynapi-widgetdev > |
From: A. J. <ari...@nt...> - 2001-05-21 11:18:34
|
Do you have any working examples, based on the example I have supplied? In my example, I am not raising(invoking) any events (so I cannot set bubbling), I only catch the 'create' event when it happens. -----Original Message----- From: dyn...@li... [mailto:dyn...@li...]On Behalf Of Digital Strider Sent: 20 May 2001 21:49 To: dyn...@li... Subject: RE: [Dynapi-Widgetdev] Events fire all over the place on subclasses Event propagation is controlled by bubbling. Set bubbling to false. -----Original Message----- From: dyn...@li... [mailto:dyn...@li...]On Behalf Of A. Joannou Sent: Sunday, May 20, 2001 1:13 PM To: dyn...@li... Subject: [Dynapi-Widgetdev] Events fire all over the place on subclasses Hi, My name is Deli, and I am facing a HUGE problem. On objects made from other objects which in turn are made from the DynLayer (e.g. scrollPane), eventListeners placed on one object, fire on ALL of them as outlined in the following example. Why is this? Is there a solution? This problem is apparent on any objects created in the same way (e.g. if I create an object 'A' based on DynLayer, and then create an object 'B' based on object 'A', the same problem occurs). This makes programming of complex objects IMPOSSIBLE. Looking forward to your prompt reply. Deli. PS. Below is a simple Scrollpane example (example#1) outlining the problem. Scrollpane#1 and Scrollpane#2 are created, but only Scrollpane#1 is given an eventlistener to listen for the 'create' event. The problem is that the event fires ALSO when the Scrollpane#2 is created, when REALLY I haven't asked it to. This does NOT happen if the example was made with DynLayers (example#2). example#1 <html> <head> <title>CoreLib example</title> </head> <script language="Javascript" src="../src/dynapi.js"></script> <script language="Javascript"> DynAPI.setLibraryPath('../src/lib/') DynAPI.include('dynapi.api.*'); DynAPI.include('dynapi.event.*') DynAPI.include('dynapi.util.thread.js'); DynAPI.include('dynapi.util.pathanim.js'); DynAPI.include('dynapi.gui.dynimage.js'); DynAPI.include('dynapi.gui.button.js'); DynAPI.include('dynapi.gui.scrollbar.js'); DynAPI.include('dynapi.gui.viewport.js'); DynAPI.include('dynapi.gui.scrollpane.js'); DynAPI.include('dynapi.gui.label.js'); //########################################################################## ################## DynAPI.onLoad=function() { label1 = new Label('<table border=1><tr><td width=160 height=160>label 1 alk jskj slkj k dkjkj dk skslkdjf lskd f</td></tr></table>') label1.setWrap(false) label1.setPadding(5) label1.setBgColor('cyan') label1.setSize(160,160) label2 = new Label('<table border=1><tr><td width=160 height=160>label 1 alk jskj slkj k dkjkj dk skslkdjf lskd f</td></tr></table>') label2.setWrap(false) label2.setPadding(5) label2.setBgColor('cyan') label2.setSize(160,160) //########################################################################## #################// //SCROLLPANE#1 //########################################################################## #################// var scrollpane1 = new ScrollPane(label1); scrollpane1.setSize(150,150) scrollpane1.moveTo(250,50) scrollpane1.setBgColor('#c0c0c0') //########################################################################## ## //EVENT LISTENERS //########################################################################## ## var EListener1 = new EventListener(); //########################################################################## ## EListener1.oncreate = function(e) { var o=e.getSource(); alert("from SP1: "+o.id); }; scrollpane1.addEventListener(EListener1); DynAPI.document.addChild(scrollpane1); //########################################################################## #################// //SCROLLPANE#2 //########################################################################## #################// var scrollpane2 = new ScrollPane(label2); scrollpane2.setSize(150,150) scrollpane2.moveTo(250,300) scrollpane2.setBgColor('#c0c0c0') DynAPI.document.addChild(scrollpane2); } </script> <body bgcolor="#ffffff"> </body> </html> Below is the DynLayer example in which THIS effect does NOT happen. The code has not been changed apart from the declarations of the objects new ScrollPane(label2) -> new DynLayer() ) example#2 <html> <head> <title>CoreLib example</title> </head> <script language="Javascript" src="../src/dynapi.js"></script> <script language="Javascript"> DynAPI.setLibraryPath('../src/lib/') DynAPI.include('dynapi.api.*'); DynAPI.include('dynapi.event.*') DynAPI.include('dynapi.util.thread.js'); DynAPI.include('dynapi.util.pathanim.js'); DynAPI.include('dynapi.gui.dynimage.js'); DynAPI.include('dynapi.gui.button.js'); DynAPI.include('dynapi.gui.scrollbar.js'); DynAPI.include('dynapi.gui.viewport.js'); DynAPI.include('dynapi.gui.scrollpane.js'); DynAPI.include('dynapi.gui.label.js'); //########################################################################## ################## DynAPI.onLoad=function() { label1 = new Label('<table border=1><tr><td width=160 height=160>label 1 alk jskj slkj k dkjkj dk skslkdjf lskd f</td></tr></table>') label1.setWrap(false) label1.setPadding(5) label1.setBgColor('cyan') label1.setSize(160,160) label2 = new Label('<table border=1><tr><td width=160 height=160>label 1 alk jskj slkj k dkjkj dk skslkdjf lskd f</td></tr></table>') label2.setWrap(false) label2.setPadding(5) label2.setBgColor('cyan') label2.setSize(160,160) //########################################################################## #################// //SCROLLPANE#1 //########################################################################## #################// var scrollpane1 = new DynLayer(); scrollpane1.setSize(150,150) scrollpane1.moveTo(250,50) scrollpane1.setBgColor('#c0c0c0') //########################################################################## ## //EVENT LISTENERS //########################################################################## ## var EListener1 = new EventListener(); //########################################################################## ## EListener1.oncreate = function(e) { var o=e.getSource(); alert("from SP1: "+o.id); }; scrollpane1.addEventListener(EListener1); DynAPI.document.addChild(scrollpane1); //########################################################################## #################// //SCROLLPANE#2 //########################################################################## #################// var scrollpane2 = new DynLayer(); scrollpane2.setSize(150,150) scrollpane2.moveTo(250,300) scrollpane2.setBgColor('#c0c0c0') DynAPI.document.addChild(scrollpane2); } </script> <body bgcolor="#ffffff"> </body> </html> _______________________________________________ Dynapi-Widgetdev mailing list Dyn...@li... http://lists.sourceforge.net/lists/listinfo/dynapi-widgetdev --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.252 / Virus Database: 125 - Release Date: 5/9/2001 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.252 / Virus Database: 125 - Release Date: 5/9/2001 |
From: A. J. <ari...@nt...> - 2001-05-21 11:04:00
|
Richard, Thanks for the prompt reply! I hope tey pay you well! Do you think I/we should let someone else know that can fix this? The problem is a global one affecting any secondary+ subclass, and needs to be addressed I think, because bypasses and shortcuts for quick solutions are always available. Who do you think would be the best person to contact on the matter? Deli -----Original Message----- From: dyn...@li... [mailto:dyn...@li...]On Behalf Of Richard Bennett Sent: 21 May 2001 07:34 To: dyn...@li... Subject: Re: [Dynapi-Widgetdev] Events fire all over the place on subclasses hi, I did some research on this, see: http://www.richardinfo.f2s.com/dynapi/Deli/ To cut a long story short, this problem happens with lists, scrollpanes, and pushpanel. The problem with lists is down to a bug in that widget itself, and only happens when listening for onselect - use onmouseup instead. The problem with scrollpanes and pushpanel, comes because these are the only two widgets at the moment NOT prototyped off a DynLayer, but prototyped off a viewport in this case. Obviously our inheritance model isn't working as it should . If you change scrollpane, so it inherits from DynLayer, and add viewport as a child, it works as it should, regarding eventlisteners. What changed since version 2, when I suspect this worked normally, has been the setting of the IDs, I tried a few things here, but couldn't find the final solution. Nice but no cigar, as they say. Maybe someone more at home with DynAPI's inheritance can help out here. Richard. ----- Original Message ----- From: "A. Joannou" <ari...@nt...> To: <dyn...@li...> Sent: 20 May, 2001 22:12 Subject: [Dynapi-Widgetdev] Events fire all over the place on subclasses > Hi, > My name is Deli, and I am facing a HUGE problem. > On objects made from other objects which in turn are made from the DynLayer > (e.g. scrollPane), eventListeners placed on one object, fire on ALL of them > as outlined in the following example. Why is this? Is there a solution? > This problem is apparent on any objects created in the same way (e.g. if I > create an object 'A' based on DynLayer, and then create an object 'B' based > on object 'A', the same problem occurs). > This makes programming of complex objects IMPOSSIBLE. > > Looking forward to your prompt reply. > Deli. > > PS. Below is a simple Scrollpane example (example#1) outlining the problem. > Scrollpane#1 and Scrollpane#2 are created, but only Scrollpane#1 is given an > eventlistener to listen for the 'create' event. > The problem is that the event fires ALSO when the Scrollpane#2 is created, > when REALLY I haven't asked it to. > This does NOT happen if the example was made with DynLayers (example#2). > > example#1 > <html> > <head> > <title>CoreLib example</title> > > </head> > > <script language="Javascript" src="../src/dynapi.js"></script> > <script language="Javascript"> > > DynAPI.setLibraryPath('../src/lib/') > DynAPI.include('dynapi.api.*'); > DynAPI.include('dynapi.event.*') > DynAPI.include('dynapi.util.thread.js'); > DynAPI.include('dynapi.util.pathanim.js'); > DynAPI.include('dynapi.gui.dynimage.js'); > DynAPI.include('dynapi.gui.button.js'); > DynAPI.include('dynapi.gui.scrollbar.js'); > DynAPI.include('dynapi.gui.viewport.js'); > DynAPI.include('dynapi.gui.scrollpane.js'); > DynAPI.include('dynapi.gui.label.js'); > > > //########################################################################## > ################## > DynAPI.onLoad=function() { > label1 = new Label('<table border=1><tr><td width=160 height=160>label 1 > alk jskj slkj k dkjkj dk skslkdjf lskd f</td></tr></table>') > label1.setWrap(false) > label1.setPadding(5) > label1.setBgColor('cyan') > label1.setSize(160,160) > > label2 = new Label('<table border=1><tr><td width=160 height=160>label 1 > alk jskj slkj k dkjkj dk skslkdjf lskd f</td></tr></table>') > label2.setWrap(false) > label2.setPadding(5) > label2.setBgColor('cyan') > label2.setSize(160,160) > > > > //########################################################################## > #################// > //SCROLLPANE#1 > > //########################################################################## > #################// > var scrollpane1 = new ScrollPane(label1); > scrollpane1.setSize(150,150) > scrollpane1.moveTo(250,50) > scrollpane1.setBgColor('#c0c0c0') > > > //########################################################################## > ## > //EVENT LISTENERS > > //########################################################################## > ## > var EListener1 = new EventListener(); > > //########################################################################## > ## > EListener1.oncreate = function(e) { > var o=e.getSource(); > alert("from SP1: "+o.id); > }; > scrollpane1.addEventListener(EListener1); > > DynAPI.document.addChild(scrollpane1); > > > //########################################################################## > #################// > //SCROLLPANE#2 > > //########################################################################## > #################// > var scrollpane2 = new ScrollPane(label2); > scrollpane2.setSize(150,150) > scrollpane2.moveTo(250,300) > scrollpane2.setBgColor('#c0c0c0') > DynAPI.document.addChild(scrollpane2); > > > > > } > > </script> > > > <body bgcolor="#ffffff"> > </body> > </html> > > > Below is the DynLayer example in which THIS effect does NOT happen. > The code has not been changed apart from the declarations of the objects > new ScrollPane(label2) -> new DynLayer() ) > > example#2 > <html> > <head> > <title>CoreLib example</title> > > </head> > > <script language="Javascript" src="../src/dynapi.js"></script> > <script language="Javascript"> > > DynAPI.setLibraryPath('../src/lib/') > DynAPI.include('dynapi.api.*'); > DynAPI.include('dynapi.event.*') > DynAPI.include('dynapi.util.thread.js'); > DynAPI.include('dynapi.util.pathanim.js'); > DynAPI.include('dynapi.gui.dynimage.js'); > DynAPI.include('dynapi.gui.button.js'); > DynAPI.include('dynapi.gui.scrollbar.js'); > DynAPI.include('dynapi.gui.viewport.js'); > DynAPI.include('dynapi.gui.scrollpane.js'); > DynAPI.include('dynapi.gui.label.js'); > > > //########################################################################## > ################## > DynAPI.onLoad=function() { > label1 = new Label('<table border=1><tr><td width=160 height=160>label 1 > alk jskj slkj k dkjkj dk skslkdjf lskd f</td></tr></table>') > label1.setWrap(false) > label1.setPadding(5) > label1.setBgColor('cyan') > label1.setSize(160,160) > > label2 = new Label('<table border=1><tr><td width=160 height=160>label 1 > alk jskj slkj k dkjkj dk skslkdjf lskd f</td></tr></table>') > label2.setWrap(false) > label2.setPadding(5) > label2.setBgColor('cyan') > label2.setSize(160,160) > > > > //########################################################################## > #################// > //SCROLLPANE#1 > > //########################################################################## > #################// > var scrollpane1 = new DynLayer(); > scrollpane1.setSize(150,150) > scrollpane1.moveTo(250,50) > scrollpane1.setBgColor('#c0c0c0') > > > //########################################################################## > ## > //EVENT LISTENERS > > //########################################################################## > ## > var EListener1 = new EventListener(); > > //########################################################################## > ## > EListener1.oncreate = function(e) { > var o=e.getSource(); > alert("from SP1: "+o.id); > }; > scrollpane1.addEventListener(EListener1); > > DynAPI.document.addChild(scrollpane1); > > > //########################################################################## > #################// > //SCROLLPANE#2 > > //########################################################################## > #################// > var scrollpane2 = new DynLayer(); > scrollpane2.setSize(150,150) > scrollpane2.moveTo(250,300) > scrollpane2.setBgColor('#c0c0c0') > DynAPI.document.addChild(scrollpane2); > > > > > } > > </script> > > > <body bgcolor="#ffffff"> > </body> > </html> > > > _______________________________________________ > Dynapi-Widgetdev mailing list > Dyn...@li... > http://lists.sourceforge.net/lists/listinfo/dynapi-widgetdev > _______________________________________________ Dynapi-Widgetdev mailing list Dyn...@li... http://lists.sourceforge.net/lists/listinfo/dynapi-widgetdev |
From: Richard B. <ric...@sk...> - 2001-05-21 06:36:49
|
hi, I did some research on this, see: http://www.richardinfo.f2s.com/dynapi/Deli/ To cut a long story short, this problem happens with lists, scrollpanes, and pushpanel. The problem with lists is down to a bug in that widget itself, and only happens when listening for onselect - use onmouseup instead. The problem with scrollpanes and pushpanel, comes because these are the only two widgets at the moment NOT prototyped off a DynLayer, but prototyped off a viewport in this case. Obviously our inheritance model isn't working as it should . If you change scrollpane, so it inherits from DynLayer, and add viewport as a child, it works as it should, regarding eventlisteners. What changed since version 2, when I suspect this worked normally, has been the setting of the IDs, I tried a few things here, but couldn't find the final solution. Nice but no cigar, as they say. Maybe someone more at home with DynAPI's inheritance can help out here. Richard. ----- Original Message ----- From: "A. Joannou" <ari...@nt...> To: <dyn...@li...> Sent: 20 May, 2001 22:12 Subject: [Dynapi-Widgetdev] Events fire all over the place on subclasses > Hi, > My name is Deli, and I am facing a HUGE problem. > On objects made from other objects which in turn are made from the DynLayer > (e.g. scrollPane), eventListeners placed on one object, fire on ALL of them > as outlined in the following example. Why is this? Is there a solution? > This problem is apparent on any objects created in the same way (e.g. if I > create an object 'A' based on DynLayer, and then create an object 'B' based > on object 'A', the same problem occurs). > This makes programming of complex objects IMPOSSIBLE. > > Looking forward to your prompt reply. > Deli. > > PS. Below is a simple Scrollpane example (example#1) outlining the problem. > Scrollpane#1 and Scrollpane#2 are created, but only Scrollpane#1 is given an > eventlistener to listen for the 'create' event. > The problem is that the event fires ALSO when the Scrollpane#2 is created, > when REALLY I haven't asked it to. > This does NOT happen if the example was made with DynLayers (example#2). > > example#1 > <html> > <head> > <title>CoreLib example</title> > > </head> > > <script language="Javascript" src="../src/dynapi.js"></script> > <script language="Javascript"> > > DynAPI.setLibraryPath('../src/lib/') > DynAPI.include('dynapi.api.*'); > DynAPI.include('dynapi.event.*') > DynAPI.include('dynapi.util.thread.js'); > DynAPI.include('dynapi.util.pathanim.js'); > DynAPI.include('dynapi.gui.dynimage.js'); > DynAPI.include('dynapi.gui.button.js'); > DynAPI.include('dynapi.gui.scrollbar.js'); > DynAPI.include('dynapi.gui.viewport.js'); > DynAPI.include('dynapi.gui.scrollpane.js'); > DynAPI.include('dynapi.gui.label.js'); > > > //########################################################################## > ################## > DynAPI.onLoad=function() { > label1 = new Label('<table border=1><tr><td width=160 height=160>label 1 > alk jskj slkj k dkjkj dk skslkdjf lskd f</td></tr></table>') > label1.setWrap(false) > label1.setPadding(5) > label1.setBgColor('cyan') > label1.setSize(160,160) > > label2 = new Label('<table border=1><tr><td width=160 height=160>label 1 > alk jskj slkj k dkjkj dk skslkdjf lskd f</td></tr></table>') > label2.setWrap(false) > label2.setPadding(5) > label2.setBgColor('cyan') > label2.setSize(160,160) > > > > //########################################################################## > #################// > //SCROLLPANE#1 > > //########################################################################## > #################// > var scrollpane1 = new ScrollPane(label1); > scrollpane1.setSize(150,150) > scrollpane1.moveTo(250,50) > scrollpane1.setBgColor('#c0c0c0') > > > //########################################################################## > ## > //EVENT LISTENERS > > //########################################################################## > ## > var EListener1 = new EventListener(); > > //########################################################################## > ## > EListener1.oncreate = function(e) { > var o=e.getSource(); > alert("from SP1: "+o.id); > }; > scrollpane1.addEventListener(EListener1); > > DynAPI.document.addChild(scrollpane1); > > > //########################################################################## > #################// > //SCROLLPANE#2 > > //########################################################################## > #################// > var scrollpane2 = new ScrollPane(label2); > scrollpane2.setSize(150,150) > scrollpane2.moveTo(250,300) > scrollpane2.setBgColor('#c0c0c0') > DynAPI.document.addChild(scrollpane2); > > > > > } > > </script> > > > <body bgcolor="#ffffff"> > </body> > </html> > > > Below is the DynLayer example in which THIS effect does NOT happen. > The code has not been changed apart from the declarations of the objects > new ScrollPane(label2) -> new DynLayer() ) > > example#2 > <html> > <head> > <title>CoreLib example</title> > > </head> > > <script language="Javascript" src="../src/dynapi.js"></script> > <script language="Javascript"> > > DynAPI.setLibraryPath('../src/lib/') > DynAPI.include('dynapi.api.*'); > DynAPI.include('dynapi.event.*') > DynAPI.include('dynapi.util.thread.js'); > DynAPI.include('dynapi.util.pathanim.js'); > DynAPI.include('dynapi.gui.dynimage.js'); > DynAPI.include('dynapi.gui.button.js'); > DynAPI.include('dynapi.gui.scrollbar.js'); > DynAPI.include('dynapi.gui.viewport.js'); > DynAPI.include('dynapi.gui.scrollpane.js'); > DynAPI.include('dynapi.gui.label.js'); > > > //########################################################################## > ################## > DynAPI.onLoad=function() { > label1 = new Label('<table border=1><tr><td width=160 height=160>label 1 > alk jskj slkj k dkjkj dk skslkdjf lskd f</td></tr></table>') > label1.setWrap(false) > label1.setPadding(5) > label1.setBgColor('cyan') > label1.setSize(160,160) > > label2 = new Label('<table border=1><tr><td width=160 height=160>label 1 > alk jskj slkj k dkjkj dk skslkdjf lskd f</td></tr></table>') > label2.setWrap(false) > label2.setPadding(5) > label2.setBgColor('cyan') > label2.setSize(160,160) > > > > //########################################################################## > #################// > //SCROLLPANE#1 > > //########################################################################## > #################// > var scrollpane1 = new DynLayer(); > scrollpane1.setSize(150,150) > scrollpane1.moveTo(250,50) > scrollpane1.setBgColor('#c0c0c0') > > > //########################################################################## > ## > //EVENT LISTENERS > > //########################################################################## > ## > var EListener1 = new EventListener(); > > //########################################################################## > ## > EListener1.oncreate = function(e) { > var o=e.getSource(); > alert("from SP1: "+o.id); > }; > scrollpane1.addEventListener(EListener1); > > DynAPI.document.addChild(scrollpane1); > > > //########################################################################## > #################// > //SCROLLPANE#2 > > //########################################################################## > #################// > var scrollpane2 = new DynLayer(); > scrollpane2.setSize(150,150) > scrollpane2.moveTo(250,300) > scrollpane2.setBgColor('#c0c0c0') > DynAPI.document.addChild(scrollpane2); > > > > > } > > </script> > > > <body bgcolor="#ffffff"> > </body> > </html> > > > _______________________________________________ > Dynapi-Widgetdev mailing list > Dyn...@li... > http://lists.sourceforge.net/lists/listinfo/dynapi-widgetdev > |
From: Digital S. <dst...@or...> - 2001-05-20 20:49:04
|
Event propagation is controlled by bubbling. Set bubbling to false. -----Original Message----- From: dyn...@li... [mailto:dyn...@li...]On Behalf Of A. Joannou Sent: Sunday, May 20, 2001 1:13 PM To: dyn...@li... Subject: [Dynapi-Widgetdev] Events fire all over the place on subclasses Hi, My name is Deli, and I am facing a HUGE problem. On objects made from other objects which in turn are made from the DynLayer (e.g. scrollPane), eventListeners placed on one object, fire on ALL of them as outlined in the following example. Why is this? Is there a solution? This problem is apparent on any objects created in the same way (e.g. if I create an object 'A' based on DynLayer, and then create an object 'B' based on object 'A', the same problem occurs). This makes programming of complex objects IMPOSSIBLE. Looking forward to your prompt reply. Deli. PS. Below is a simple Scrollpane example (example#1) outlining the problem. Scrollpane#1 and Scrollpane#2 are created, but only Scrollpane#1 is given an eventlistener to listen for the 'create' event. The problem is that the event fires ALSO when the Scrollpane#2 is created, when REALLY I haven't asked it to. This does NOT happen if the example was made with DynLayers (example#2). example#1 <html> <head> <title>CoreLib example</title> </head> <script language="Javascript" src="../src/dynapi.js"></script> <script language="Javascript"> DynAPI.setLibraryPath('../src/lib/') DynAPI.include('dynapi.api.*'); DynAPI.include('dynapi.event.*') DynAPI.include('dynapi.util.thread.js'); DynAPI.include('dynapi.util.pathanim.js'); DynAPI.include('dynapi.gui.dynimage.js'); DynAPI.include('dynapi.gui.button.js'); DynAPI.include('dynapi.gui.scrollbar.js'); DynAPI.include('dynapi.gui.viewport.js'); DynAPI.include('dynapi.gui.scrollpane.js'); DynAPI.include('dynapi.gui.label.js'); //########################################################################## ################## DynAPI.onLoad=function() { label1 = new Label('<table border=1><tr><td width=160 height=160>label 1 alk jskj slkj k dkjkj dk skslkdjf lskd f</td></tr></table>') label1.setWrap(false) label1.setPadding(5) label1.setBgColor('cyan') label1.setSize(160,160) label2 = new Label('<table border=1><tr><td width=160 height=160>label 1 alk jskj slkj k dkjkj dk skslkdjf lskd f</td></tr></table>') label2.setWrap(false) label2.setPadding(5) label2.setBgColor('cyan') label2.setSize(160,160) //########################################################################## #################// //SCROLLPANE#1 //########################################################################## #################// var scrollpane1 = new ScrollPane(label1); scrollpane1.setSize(150,150) scrollpane1.moveTo(250,50) scrollpane1.setBgColor('#c0c0c0') //########################################################################## ## //EVENT LISTENERS //########################################################################## ## var EListener1 = new EventListener(); //########################################################################## ## EListener1.oncreate = function(e) { var o=e.getSource(); alert("from SP1: "+o.id); }; scrollpane1.addEventListener(EListener1); DynAPI.document.addChild(scrollpane1); //########################################################################## #################// //SCROLLPANE#2 //########################################################################## #################// var scrollpane2 = new ScrollPane(label2); scrollpane2.setSize(150,150) scrollpane2.moveTo(250,300) scrollpane2.setBgColor('#c0c0c0') DynAPI.document.addChild(scrollpane2); } </script> <body bgcolor="#ffffff"> </body> </html> Below is the DynLayer example in which THIS effect does NOT happen. The code has not been changed apart from the declarations of the objects new ScrollPane(label2) -> new DynLayer() ) example#2 <html> <head> <title>CoreLib example</title> </head> <script language="Javascript" src="../src/dynapi.js"></script> <script language="Javascript"> DynAPI.setLibraryPath('../src/lib/') DynAPI.include('dynapi.api.*'); DynAPI.include('dynapi.event.*') DynAPI.include('dynapi.util.thread.js'); DynAPI.include('dynapi.util.pathanim.js'); DynAPI.include('dynapi.gui.dynimage.js'); DynAPI.include('dynapi.gui.button.js'); DynAPI.include('dynapi.gui.scrollbar.js'); DynAPI.include('dynapi.gui.viewport.js'); DynAPI.include('dynapi.gui.scrollpane.js'); DynAPI.include('dynapi.gui.label.js'); //########################################################################## ################## DynAPI.onLoad=function() { label1 = new Label('<table border=1><tr><td width=160 height=160>label 1 alk jskj slkj k dkjkj dk skslkdjf lskd f</td></tr></table>') label1.setWrap(false) label1.setPadding(5) label1.setBgColor('cyan') label1.setSize(160,160) label2 = new Label('<table border=1><tr><td width=160 height=160>label 1 alk jskj slkj k dkjkj dk skslkdjf lskd f</td></tr></table>') label2.setWrap(false) label2.setPadding(5) label2.setBgColor('cyan') label2.setSize(160,160) //########################################################################## #################// //SCROLLPANE#1 //########################################################################## #################// var scrollpane1 = new DynLayer(); scrollpane1.setSize(150,150) scrollpane1.moveTo(250,50) scrollpane1.setBgColor('#c0c0c0') //########################################################################## ## //EVENT LISTENERS //########################################################################## ## var EListener1 = new EventListener(); //########################################################################## ## EListener1.oncreate = function(e) { var o=e.getSource(); alert("from SP1: "+o.id); }; scrollpane1.addEventListener(EListener1); DynAPI.document.addChild(scrollpane1); //########################################################################## #################// //SCROLLPANE#2 //########################################################################## #################// var scrollpane2 = new DynLayer(); scrollpane2.setSize(150,150) scrollpane2.moveTo(250,300) scrollpane2.setBgColor('#c0c0c0') DynAPI.document.addChild(scrollpane2); } </script> <body bgcolor="#ffffff"> </body> </html> _______________________________________________ Dynapi-Widgetdev mailing list Dyn...@li... http://lists.sourceforge.net/lists/listinfo/dynapi-widgetdev --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.252 / Virus Database: 125 - Release Date: 5/9/2001 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.252 / Virus Database: 125 - Release Date: 5/9/2001 |
From: A. J. <ari...@nt...> - 2001-05-20 20:12:06
|
Hi, My name is Deli, and I am facing a HUGE problem. On objects made from other objects which in turn are made from the DynLayer (e.g. scrollPane), eventListeners placed on one object, fire on ALL of them as outlined in the following example. Why is this? Is there a solution? This problem is apparent on any objects created in the same way (e.g. if I create an object 'A' based on DynLayer, and then create an object 'B' based on object 'A', the same problem occurs). This makes programming of complex objects IMPOSSIBLE. Looking forward to your prompt reply. Deli. PS. Below is a simple Scrollpane example (example#1) outlining the problem. Scrollpane#1 and Scrollpane#2 are created, but only Scrollpane#1 is given an eventlistener to listen for the 'create' event. The problem is that the event fires ALSO when the Scrollpane#2 is created, when REALLY I haven't asked it to. This does NOT happen if the example was made with DynLayers (example#2). example#1 <html> <head> <title>CoreLib example</title> </head> <script language="Javascript" src="../src/dynapi.js"></script> <script language="Javascript"> DynAPI.setLibraryPath('../src/lib/') DynAPI.include('dynapi.api.*'); DynAPI.include('dynapi.event.*') DynAPI.include('dynapi.util.thread.js'); DynAPI.include('dynapi.util.pathanim.js'); DynAPI.include('dynapi.gui.dynimage.js'); DynAPI.include('dynapi.gui.button.js'); DynAPI.include('dynapi.gui.scrollbar.js'); DynAPI.include('dynapi.gui.viewport.js'); DynAPI.include('dynapi.gui.scrollpane.js'); DynAPI.include('dynapi.gui.label.js'); //########################################################################## ################## DynAPI.onLoad=function() { label1 = new Label('<table border=1><tr><td width=160 height=160>label 1 alk jskj slkj k dkjkj dk skslkdjf lskd f</td></tr></table>') label1.setWrap(false) label1.setPadding(5) label1.setBgColor('cyan') label1.setSize(160,160) label2 = new Label('<table border=1><tr><td width=160 height=160>label 1 alk jskj slkj k dkjkj dk skslkdjf lskd f</td></tr></table>') label2.setWrap(false) label2.setPadding(5) label2.setBgColor('cyan') label2.setSize(160,160) //########################################################################## #################// //SCROLLPANE#1 //########################################################################## #################// var scrollpane1 = new ScrollPane(label1); scrollpane1.setSize(150,150) scrollpane1.moveTo(250,50) scrollpane1.setBgColor('#c0c0c0') //########################################################################## ## //EVENT LISTENERS //########################################################################## ## var EListener1 = new EventListener(); //########################################################################## ## EListener1.oncreate = function(e) { var o=e.getSource(); alert("from SP1: "+o.id); }; scrollpane1.addEventListener(EListener1); DynAPI.document.addChild(scrollpane1); //########################################################################## #################// //SCROLLPANE#2 //########################################################################## #################// var scrollpane2 = new ScrollPane(label2); scrollpane2.setSize(150,150) scrollpane2.moveTo(250,300) scrollpane2.setBgColor('#c0c0c0') DynAPI.document.addChild(scrollpane2); } </script> <body bgcolor="#ffffff"> </body> </html> Below is the DynLayer example in which THIS effect does NOT happen. The code has not been changed apart from the declarations of the objects new ScrollPane(label2) -> new DynLayer() ) example#2 <html> <head> <title>CoreLib example</title> </head> <script language="Javascript" src="../src/dynapi.js"></script> <script language="Javascript"> DynAPI.setLibraryPath('../src/lib/') DynAPI.include('dynapi.api.*'); DynAPI.include('dynapi.event.*') DynAPI.include('dynapi.util.thread.js'); DynAPI.include('dynapi.util.pathanim.js'); DynAPI.include('dynapi.gui.dynimage.js'); DynAPI.include('dynapi.gui.button.js'); DynAPI.include('dynapi.gui.scrollbar.js'); DynAPI.include('dynapi.gui.viewport.js'); DynAPI.include('dynapi.gui.scrollpane.js'); DynAPI.include('dynapi.gui.label.js'); //########################################################################## ################## DynAPI.onLoad=function() { label1 = new Label('<table border=1><tr><td width=160 height=160>label 1 alk jskj slkj k dkjkj dk skslkdjf lskd f</td></tr></table>') label1.setWrap(false) label1.setPadding(5) label1.setBgColor('cyan') label1.setSize(160,160) label2 = new Label('<table border=1><tr><td width=160 height=160>label 1 alk jskj slkj k dkjkj dk skslkdjf lskd f</td></tr></table>') label2.setWrap(false) label2.setPadding(5) label2.setBgColor('cyan') label2.setSize(160,160) //########################################################################## #################// //SCROLLPANE#1 //########################################################################## #################// var scrollpane1 = new DynLayer(); scrollpane1.setSize(150,150) scrollpane1.moveTo(250,50) scrollpane1.setBgColor('#c0c0c0') //########################################################################## ## //EVENT LISTENERS //########################################################################## ## var EListener1 = new EventListener(); //########################################################################## ## EListener1.oncreate = function(e) { var o=e.getSource(); alert("from SP1: "+o.id); }; scrollpane1.addEventListener(EListener1); DynAPI.document.addChild(scrollpane1); //########################################################################## #################// //SCROLLPANE#2 //########################################################################## #################// var scrollpane2 = new DynLayer(); scrollpane2.setSize(150,150) scrollpane2.moveTo(250,300) scrollpane2.setBgColor('#c0c0c0') DynAPI.document.addChild(scrollpane2); } </script> <body bgcolor="#ffffff"> </body> </html> |
From: Alain M. <ala...@em...> - 2001-05-18 13:13:52
|
Hi, I've made a couple of hacks to to scrollbar & scrollpane widgets, such that you can now assign a start & end image to the trough. I say 'hacks' because I havent created a new 'theme', I just hacked the old one. And I didnt modify the 'theme' inside the scrollbar, because I wasnt sure what might happen if someone used the expanded 'theme' with another widget other than the scrollpane. Anyway, attached are the modified files .. they work for ME, but as usual - your mileage may vary! Coming soon: (as soon as I tidy up the code a bit) 1. FastList - a slimmed-down version of the list-class that makes long list create MUCH faster (can you say >60sec down to less than 4secs on a PII 233 w 256MB RAM) 2. NudgePanel - a variation on the PushPanel that uses the position of the mouse cursor to define the speed of the scroll, currently a bit stuttery but I havent tried it since I installed the 2.53 release. 3. SlidePanel - not even started yet, but a bit like the Nudge/PushPanels except moving the cursor scrolls the window ... having trouble working out how I'm going to deal with the mouse leaving the widget ... capturing mouse-events from the document does NOT sound like a good idea. (Suggestions would be welcome) Thx, Al. PS: sorry about mailing out an attachment, but I wasnt sure how else to send the files, and its only 10K so I thought ... what the heck! PPS: these files are based on the 2.53 release of DynAPI ----------------------------------------------- FREE! The World's Best Email Address @email.com Reserve your name now at http://www.email.com |
From: Keith C. <kei...@dc...> - 2001-05-18 03:39:10
|
thanks I try that I tried invoking the even but I forgot the ' thanks Keith At 07:40 AM 5/17/01 +0200, you wrote: >If you have already registered an event listener on your class ignore the >following code. Otherwise, this is how you register an event listener > >This code goes inside your class declaration. >--------------------------------------------------------------- > this.events = new EventListener(this); > this.events.onresize = function(e) { > o = e.getTarget(); > o."myfunction"(); <-- Insert function name here > }; > this.addEventListener(this.events); >------------------------------------------------------------------ > > >To create an event there are two ways you can do it. > >a) You can set the size of your panel to its existing size >------------------------------------------------------ > > >panel.prototype.setalign = function (align){// set caption align > this.align=align; > this.setSize(this.getWidth(),this.getHeight()); >} > >-------------------------------------------------------- > >or b) You can fire an event using the invokeEvent() method >(line 42ish in listeners.js) > > > > > >--------------------------------------------------------- > >panel.prototype.setalign = function (align){// set caption align > this.align=align; > this.invokeEvent('resize'); >} > >---------------------------------------------------------- > > > >Hope this helps you. > >Scott Bristowe > > >_______________________________________________ >Dynapi-Widgetdev mailing list >Dyn...@li... >http://lists.sourceforge.net/lists/listinfo/dynapi-widgetdev |
From: Scott B. <sco...@se...> - 2001-05-17 05:40:26
|
If you have already registered an event listener on your class ignore the following code. Otherwise, this is how you register an event listener This code goes inside your class declaration. --------------------------------------------------------------- this.events = new EventListener(this); this.events.onresize = function(e) { o = e.getTarget(); o."myfunction"(); <-- Insert function name here }; this.addEventListener(this.events); ------------------------------------------------------------------ To create an event there are two ways you can do it. a) You can set the size of your panel to its existing size ------------------------------------------------------ panel.prototype.setalign = function (align){// set caption align this.align=align; this.setSize(this.getWidth(),this.getHeight()); } -------------------------------------------------------- or b) You can fire an event using the invokeEvent() method (line 42ish in listeners.js) --------------------------------------------------------- panel.prototype.setalign = function (align){// set caption align this.align=align; this.invokeEvent('resize'); } ---------------------------------------------------------- Hope this helps you. Scott Bristowe |