> -- In the 'layer.js' file there is a method called getTopZIndex()
> Does that have anything to do with it? I don't really get what that
> method does...


I had a tricky time working out what that method does too.  I think the way
it works is that it returns the highest Z index of any layer that is at the
same level in the layer tree. (which is to do with that whole parent child
thing)

documnet - layer 1
         - layer 2
           |- layer 2a
           |- layer 2b


layer 2a.getTopZindex() returns the greatest Z index out of layer 2a and
layer 2b.  I initially got confused thinking I should call the method on the
parent (layer 2), but the dynAPI internally find the parent layer, then all
child layers.

I've been working on a beta of a windowing system, that has added
enhancements such as automatic hiding of 'bad' form elements when the layer
is not in focus, a windowshade button, draggable title bar, automatic
relayering, automatic reflowing,  etc.. If you get stuck, I can mail you an
archive with some examples.  Currently the code is no where near widget form
though, - but it works.



James





-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Richard
Bennett
Sent: Friday, June 08, 2001 8:00 AM
To: [EMAIL PROTECTED]
Subject: Re: [Dynapi-Help] first questions


Welcome, one from the land of Pascal.

Documentation:
http://dynapi.sourceforge.net/doccenter/

Then read these excellent articles, if you haven't already:
http://www.zdnet.com/devhead/stories/articles/0,4413,2688979,00.html

http://www.zdnet.com/devhead/stories/articles/0,4413,2695172,00.html

http://www.zdnet.com/devhead/stories/articles/0,4413,2703838,00.html

http://www.zdnet.com/devhead/stories/articles/0,4413,2712462,00.html

http://www.zdnet.com/devhead/stories/articles/0,4413,2762054,00.html

Of course, they are not 100% accurate, as things change all the time.

Resize bug fix should be in the latest snapshot, although it is not 100
working as yet.
http://dynapi.sourceforge.net/cgi-bin/snapshot.pl?file=current

I have trouble with the webhosting sometimes, there's a mirror too:
http://www.resass.f2s.com/dynapi/php/examples.html

http://www.richardinfo.f2s.com/dynapi/php/examples.html

The come to top code works like this:
paste into your page:

 ///The focus code
 DynLayer.prototype.setFocus=function() {
     if(!this.origZIndex||typeof(this.origZIndex)!="number")
this.origZIndex=this.getZIndex();
     var n=1,child,z;
     for (var i in this.parent.children) {
         child=this.parent.children[i];
         z=child.getZIndex();
         if (n<=z) n=z+1;
     }
     this.setZIndex(n);
 };

And then for the dragable layers:
    myLayer.setFocus()
in the onmousedown listener.

My stuff drags in NS6, your doing something wrong I think.

Cheers,
Richard Bennett

[EMAIL PROTECTED]
www.richardinfo.com
(Everything running on, and ported to DynAPI2.53)
visit the DynAPI homepage (and FAQ) ::
http://dynapi.sourceforge.net/dynapi/index.php?menu=1
Browse (and search) the mailinglist here:
http://www.mail-archive.com/index.php3?hunt=dynapi

----- Original Message -----
From: "Guillaume Thelissen" <[EMAIL PROTECTED]>
To: "dynapi" <[EMAIL PROTECTED]>
Sent: 07 June, 2001 21:57
Subject: [Dynapi-Help] first questions


>
> Hi,
>
> Since this is my first post to this list I'll briefly introduce myself.
> My name is Gui (which is an abbreviation for Guillaume and has nothing
> to do with user interfaces of any kind :-) I live in the Netherlands and
> have been doing webdesign for about 3.5 years now and always used a lot
> of Javascript with that.
> I've done several projects using Dan Steinmans DynApi 1 which I like
> very much. Because that API is no longer updated I decided it was time
> to move on, so last week I downloaded DynAPI2 and subscribed to this list.
>
> I must say that from what I've seen so far I like this DynAPI (as well as
> this list) alot, although I agree with earlier posts that the lack of
> good documentation is a pity.
>
> At this point I am working on a little project to familiarise myself
> with the API and I have I few questions. I hope someone can point me
> in the right direction.
>
> -- I have several draggable layers; is there a method to rearrange the
> layers (when dragged) so that the dragged layer gets on top??
>
> -- In the 'layer.js' file there is a method called getTopZIndex()
> Does that have anything to do with it? I don't really get what that
> method does...
>
> -- The script I wrote so far works fine in NS4 and IE5 but in NS6 the
> layers are not draggable. Any ideas?
>
> -- The "resize-bug" has been mentioned several times, and also that
> there is a fix for that, but it's not really clear to me what the
> fix is or where to find any updates scripts.
>
>
> OK, that's it (for now :-)
> All the help I get is very much appreciated.
>
> Finally I wanna shout a big THANK YOU to all the developers that
> contributed to this API. You guys are the best!
> I hope that over time my understanding of it all will grow so that
> some day I can help out others with it.
>
> Richard, your site with all the examples is very helpfull too, thanx
> for that. Unfortunately very often I have diffeculties connecting to
> it :-( Not sure if its my connection or your hosting provider. Anyway,
> I just keep trying and in the end I'll prolly manage to view all the
> examples.
>
> Ciao,
> Gui
>
>
> --
>
> Guillaume Thelissen
> Slimbit Web Solutions
> tel:+31(0)30 2966 960
> http://www.slimbit.nl
> mailto:[EMAIL PROTECTED]
>
> "If you can't beat your computer at chess, try kickboxing."
>
> _______________________________________________
> Dynapi-Help mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/dynapi-help
>


_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help


_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help

Reply via email to