Obviously there is some confusion here.. or Raymond is messing with me..

Okay..

With DynAPI 2 I could do the following:

el = new EventListener(target); // instantiate an event listener object

el.onScroll=function(e){ //assign a function to the event listener object
//whatever
}
scrollbar.addEventListsner(el); // add the event listener object to a
dynlayer
and elsewhere
scrollbar.invokeEvent("scroll"); // invoke the custom event added to the
event object

Please hold off on the sarcasm here.
I am trying to make an effort to understand.
How would I do the above without the eventListener object..
i.e.; assign the target
define the _CUSTOM_ event type
invoke the custom event type.

As for my other question.. the sarcasm really was uncalled for.

blarg = {
    onBlarg : function(e){
        some code;
    },
    doBlarg : function(what){
    some more code;
    }
}

Is completely unfamiliar syntax to me.
I had never seen such syntax until it popped up in the DynAPI.
I wish to understand this syntax.

Please bear with me..
I was very new to JavaScript when I discovered DynAPI v1.
Many of the techniques and concepts I use in any JavaScript project is
heavily coloured
what I learned and observed working with the DynAPI.

While I am now a competent JavaScript programmer, there
are still some things I would never want to (and have never done) without
the DynAPI..
such as complex event hierarchies


----- Original Message -----
From: "Raymond Irving" <[EMAIL PROTECTED]>
To: "Doug Melvin" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Tuesday, March 11, 2003 8:27 PM
Subject: Re: [Dynapi-Dev] new eventListener()?!?!?


>
> --- Doug Melvin <[EMAIL PROTECTED]> wrote:
> > anyone?
> > It would make the widget porting a little easier if
> > I understood
> > building a custom event.
> >
> > I've never done it any way other than the DynAPI 2
> > way.
>
> Well, in a nutshell:
>
> var eventlistener = {
> onmousedown : function(e) {
>
> },
> onmouseup : function(e) {
>
> }
> }
>
> The events are now placed within an object.
>
>
>
> > Also.. can someone point me to a javascript
> > reference which explains the
> > difference between the folowing two styles of object
> > declaration?
>
> I don't have link just now but see my comments below:
>
> > Style one (or standard as far as I can see)
> >
> > function DynObject() {
> >  this.id = "DynObject"+DynObject._c++;
> >  DynObject.all[this.id] = this;
> > };
>
> The above is a standard javascript function
>
> >
> > Style two:
> > dynapi.functions = {
> >  removeFromArray : function(array, index, id) {
> >     ... code ...
> >  }
> > }
>
> The above is a standard javascript object that
> contains the removeFromArray function. removeFromArray
> is a property/function of the dynapi.functions object.
>
>
> Hope that sums it up for you.
>
> --
> Raymond Irving
>
> > ----- Original Message -----
> > From: "Doug Melvin" <[EMAIL PROTECTED]>
> > To: "Raymond Irving" <[EMAIL PROTECTED]>;
> > <[EMAIL PROTECTED]>
> > Sent: Tuesday, March 11, 2003 1:59 AM
> > Subject: Re: [Dynapi-Dev] new eventListener()?!?!?
> >
> >
> > > I'll ignore the sarcasm - for now..
> > > :-)
> > > I see how event subclassing works.. maybe not as
> > intuative? (Or I'm a
> > > dinasour)
> > > But how about custom even.. like onScroll for
> > example
> > >
> > >
> > >
> > >
> >
> -------------------------------------------------------
> > > 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:Crypto Challenge
> > is now open!
> > Get cracking and register here for some mind
> > boggling fun and
> > the chance of winning an Apple iPod:
> >
> http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
> > _______________________________________________
> > Dynapi-Dev mailing list
> > [EMAIL PROTECTED]
> >
> http://www.mail-archive.com/[EMAIL PROTECTED]/
>
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Web Hosting - establish your business online
> http://webhosting.yahoo.com
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by:Crypto Challenge is now open!
> Get cracking and register here for some mind boggling fun and
> the chance of winning an Apple iPod:
> http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
> _______________________________________________
> Dynapi-Dev mailing list
> [EMAIL PROTECTED]
> http://www.mail-archive.com/[EMAIL PROTECTED]/
>



-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://www.mail-archive.com/[EMAIL PROTECTED]/

Reply via email to