On Friday, February 28, 2003, at 06:02 PM, Doug Melvin wrote:


how about .bindInline('inlineID'); ?
thus binding yer dynlayer to an inline layer..
I like better the idea to associate telling that there's an inline layer with an id when you set the id, I think it's quite logical and natural to associate both.

If done before adding the layer to the document then when you do add, it
would bind the inline layer..
if done after the dynlayer has been added.. then delete the dynamically
created components and bind to the inline layer
Deleting would be a waste of time in that scenario.

Ideally using the inline stuff should be as close as possible to the current use. First of all, since you need all the inline divs to exists before binding it to the layers means that creating dynlayers from inline divs has to be done in the onLoad. And then, using setID(value, true); and the regular addChild() should just work.

Benoit

----- Original Message -----
From: "Raymond Irving" <[EMAIL PROTECTED]>
To: "DynAPI-Dev" <[EMAIL PROTECTED]>
Sent: Friday, February 28, 2003 2:49 PM
Subject: Re: [Dynapi-Dev] New TemplateDesigner Object for 3.0



--- Benoit Marchant <[EMAIL PROTECTED]> wrote:
So what about tweaking addChild(c,alias) method to
addChild(c,alias,inline). Then you can specify
inline as true, and we
would default to no, which means it would be
transparent to the current
api.

I disagree with adding an inline argument to the addChild. I would however suggest that a isInline property be used:

lyr.isInline=true;

or we could modify the setID() function to use the
inline agrument.

We can "override"
DynElement.prototype.addChild in the
dynlayer_inline.js, t should work
as long as you include that file, right ?

Yes but not necessary.


DynLayer.prototype.assignInlineElement = function ()
{
     if (this.parent && !this.elm) {
         //I'm not sure we want to call that as
onprecreate was usually
used to do setHTML which doesn't make sense here
since the html already
exists. Comments ?
//DynElement._flagEvent(this,'precreate');
DynLayer._assignElement(this);
DynLayer._updateValues(this);
DynElement._flagEvent(this,'create');
     }
}

Use _createInline() isstead of assignInlineElement()


function(c,alias,inline) {

function(c,alias) {


if (!c) return dynapi.debug.print("Error: no object
sent to
[DynLayer].addChild()");
if (c.isChild) c.removeFromParent();
c.isChild = true;
c.parent = this;
if (c._saveAnchor) {
c.setAnchor(c._saveAnchor);
delete c._saveAnchor;
}
if(alias) this[alias]=c;
if (this._created) {
if(!inline) c._create();

if(!c.isLine) c._create();


else {
                     c.assignInlineElement();

c._createInline();


}
this.children[this.children.length] = c;
return c;
};



--
Raymond Irving




__________________________________________________ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/


------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Dynapi-Dev mailing list [EMAIL PROTECTED] http://www.mail-archive.com/[EMAIL PROTECTED]/




------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Dynapi-Dev mailing list [EMAIL PROTECTED] http://www.mail-archive.com/[EMAIL PROTECTED]/




------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Dynapi-Dev mailing list [EMAIL PROTECTED] http://www.mail-archive.com/[EMAIL PROTECTED]/

Reply via email to