--- 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]/

Reply via email to