Hi Benoit,

> Passing agruments via getInLine() to Dynlayer:
-----------------------------------------------

Why would you want to do that? All the common
properties (html,x,y,w,h,color) of the DynLayer will
be overwritten by DynLayer._updateValues() which is
called from DynLayer.getInline().

Note: I'm working on a library that will allow users
to create DynLayers using pre-design or pre-create
templates. This should just as fast as using inline
layers.

Remember to always include the following inside your
webpages:

<script>
   dynapi.document.insertAllChildren();
</script>


> The dictionary:
----------------
The dictionary agrument passing mechanism is much
slower than what we have now. 

For example: 

var l = new
DynLayer({html:'Hello',x:100,y:200,color:'Yellow'});

is much slower than:

var l = new
DynLayer('Hello',100,200,null,null,'Yellow'});

this is because of the {} object.

--
Raymond Irving

--- Benoit Marchant <[EMAIL PROTECTED]> wrote:
> 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/[email protected]/


__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com


-------------------------------------------------------
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/[email protected]/

Reply via email to