Hi

I've been playing with a widget that can be initialized from an inline div. The reason I'm looking at that is that I can generate dynamically divs on the server side, and there's a HUGE speed difference between initializing Dynlayers on existing div in the html compared to create everything using javascript.

The problem I'm facing is that there's no way right now to provide extra arguments to the getInline() part that create the DynLayer, or I wish some subclasses. I see how we could pass a class name/class to create a subclass, but I'm not sure about the arguments specific to some widgets subclasses.
I've been doing a bunch of widget with dynapi2, and I've always found it difficult to respect/remember the argument orders when calling the super class prototype, and extend it as well.

I remember a proposition on the list about using a dictionary to provide arguments. First of all it has the benefit of providing a natural documentation as you fill it with the properties. Then it provide an easy way to forward the dictionary variable to the super class. If a widget subclass wish to override some arguments, it can do so and then sent the dictionary to the super constructor who will only look up it's own properties, etc .

then we could pass that dictionary to the getInline "class" method which would make the initialization of any widget from inline divs much easier.
In the widget I've been playing with, child DynLayers are only needed when some user actions occurs like a click on an image which in turns cause child layers to be moved. So in my code I create the link between the child dynlayer and the real div only at that time.
It's more efficient, but kind of a hack right now. That's a problem I'm looking at solving.

What do you think ?

Benoit



-------------------------------------------------------
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://www.mail-archive.com/dynapi-dev@lists.sourceforge.net/

Reply via email to