From: Guangyi Wu <gua...@al...> - 2000-11-15 12:36:03
|
Hi, I am relative new to DynAPI 2 and learning it with code now. Please bear with me if I make trival mistakes. I just tested the Dan's widgets in NN 4.5 and IE 5.0 on Windows NT 4. It seems the label does not work properly at following points: 1. "non-selectable" does not work for both NN and IE; 2. "resize" works well for IE and the text does not adjust itself for NN. 3. When the font size and family is undefined, it looks strange in NN. It might be better for testing if the value is set like following var pointSize = this.font.size? ' point-size='+this.font.size : '' var fontFamily = this.font.family? ' family='+this.font.family : '' var styled = '<font'+pointSize+fontFamily+'>'+this.text+'</font>' instead of that in Label.prototype.setText() var styled = '<font point-size='+this.font.size+' family="'+this.font.family+'">'+this.text+'</b>' I'll have a deeper look into the code. br George > -----Original Message----- > From: Dan Steinman [mailto:dy...@fu...] > Sent: Tuesday, November 14, 2000 7:22 AM > To: dyn...@li... > Subject: [Dynapi-Dev] My set of widgets can now be used > > > I've released 3 small patches to SourceForge with the > necessary changes for my set of widgets to work properly > (based on the latest 11-07 release). > > 1. New order of method calls in DynLayer.create() - this is > needed for my widgets to draw correctly, the setSize() was > called too soon etc. > > 2. I've added another method onto MouseEvent: > > e.cancelBrowserEvent() > > This is not the same as setBubble(). For Netscape the event > handler needs to return a boolean value. Previously what we > were doing was returning the "bubble" value, but there is a > case where you need to enable bubbling, but still return > "false" to Netscape (this is to stop text selection during > drags etc). In Label I removed the "cover layer" idea and > simply replaced with with an event listener that cancels the > browser event, the result is the same. DragEvents has been > updated to accomidate this change. > > I've repackaged dynapi-2000.11.07 with my widgets and it can > be downloaded from: > > http://fury161.dyndns.org/dynapi-2000.11.07-danwidgets.zip > > This includes all the dynapi files with my new files in > place. Mine are: > > /dynapi/js/images/* (scrollpane and arrow images) > /dynapi/js/lib/dynapi/gui/* (new/updated widgets) > /dynapi/examples/dynapi.gui.* (examples of each widget) > > Widgets: > Label - updated with new listeners and new methods for > "packing" which must be done manually now > Button - a small button widget with metal styling (used for > arrow buttons in PushPanel, but has support for text using Label) > Sprite - this is merely a DynLayer with slide methods already > attached, not sure if this is what anyone else had in mind > but I think it would be valuable to hava separate widget > specifically for use during animation. It could be the > object that you attach other methods for a timeline or > something like that. > ButtonImage - quick port of the old buttonimage, in > ScrollPane this will probably be replaced with just Button > ViewPort - the equivalent of what used to be ScrollWindow > ScrollBar - the scrollbar objects used in Scrollpane > ScrollPane - the new "Scroll" widget, functionally complete, > but not tested on Windows/IE > PushPanel - a rewritten DynAPI1 pushpanel that extends off of ViewPort > > Notes: > Actually both ScrollPane and PushPanel extend ViewPort, so > they have the same set of methods. This shows how you can do > inheritance (DynLayer->ViewPort->Scrollpane) in DynAPI2 > without using any SuperClass type of tricks. No need for > "super" methods because you rely solely on event listeners. > > LoadPanel can be used along with ScrollPane quite easily. > All you do is: > > scrollpane.setContent(loadpanel) > > Tada! Now you can load files into loadpanel (loadpanel will > resize), and scrollpane will scroll loadpanel (or any other > widget you put inside it). > > Please test them out on Windows/Mac and post any patches needed. > > Again note: you either need my patches to 11-07 or use the > api files included in my zip file mentioned above in order > for my widgets to work properly. > > Over and out, > Dan > |