I've posted all my updates to CVS. I think touched every file.
The significant changes were:
- inline creation system for Netscape now worked directly into DynLayer
- DynImage auto-resizing, this effected everything that was using DynImage
- some changes to how the "precreate", "create", and "resize" events are handled
The events took a while to work out. I didn't like how it was setup before because it
wasn't quite right when dealing with the new create system.
"precreate" should be used in widgets for doing most of the final layout for a widget
as well as setting images for the layers. Most of that stuff used to be in the
"create" event, but now with the inline creation it's more effecient to do it in
"precreate" because when you set the size/location/images of the layers you won't be
working with true DIV elements rather with just the JS objects. The goal is to do as
little work with div's as possible before you create, so that by the time DynLayer
creates the layers it already knows the size and content of them.
You still need the "create" event to check for content size, and that sort of stuff.
I had to remove all the checks for this.created from within the DynLayer and replace
them with checks for this.css!=null. The "this.created" flag is now true once the
layer/div element is created, and final position/size has been set, AND all it's
children are created also. Peviously this.created was set to true before the children
were created which conflicts with the way the inline creation system is supposed to
work. I updated all the widgets to make sure everything was working ok with this
change.
I made a few DynLayer methods into simple functions, create() assignElement,
flagChildren etc. These don't have to be methods because they are never used manually.
Also you now have to include browser.js BEFORE dynlayer.js because in dynlayer I'm
doing a check for Netscape/IE. I updated the dynapi include list for this, but if you
have any pages that don't do include('dynapi.api.*') you will have to change the order
yourself.
DynImage.getImage() can be used before onLoad, the reason there was a problem in IE is
you need a break point between the include()'s and the rest of the page. I updated
all the examples so they look like this:
<script src=dynapi.js>
<script>
DynAPI.setLibraryPath('../src/lib');
DynAPI.include('dynapi.api.*');
...
</script>
<script>
rest of code....
</script>
Some other minor changes I can remember is the setSize/Width/Height, I made setSize
call setWidth and setHeight, and in those I rearranged a few things. I removed all
references to getComponent() cause it's not needed anymore. And DynImage.getImage
won't return an Image object with .w and .h tacked on, it's unecessary - if you have
any code that uses the .w and .h, just replace it with .width and .height.
What is no longer working:
- inline.js, I think something was wrong in IE
- List - Scott A, sorry I didn't get around to fixing this one, I checked it out in IE
before all my changes and worked fantastic, I'd like to get it working again.
Probably just needs some precreate/create changes. I broke it, so I'll fix it unless
you want to take a stab at it.
Major bugs we should fix before a stable release:
- Loadpanel isn't working in IE4.
- Label/button setSelectable still isn't working, anyone know what changes are needed?
- Inline creation system for IE - I could do this eventually but I want to work on
some other things first so if anyone else wants to give it a shot you're welcome, it
should be fairly easy now that the NS code has been finalized.
Dan
_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/dynapi-dev