From: Dan S. <dy...@fu...> - 2000-11-14 01:04:55
|
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 |