From: Leif W <war...@us...> - 2003-10-08 18:23:27
|
That's more intuitive. Is the init function mandatory or optional? Looking at the code it seems like it's required otherwise it doesn't do much. ;-) Just a note in the docs about the required init would also be helpful. Leif ----- Original Message ----- From: "Raymond Irving" <xw...@ya...> To: <dyn...@li...> Sent: Wednesday, October 08, 2003 10:33 AM Subject: Re: [Dynapi-Help] FileReader, init function, and advice > > See below: > > --- Leif W <war...@us...> wrote: > > > > I also think it looks a bit confusing at first, at > > least not intuitive. I > > believe it's just illustrating two things. First, > > you have a "hook" in the > > FileReader constructor so you can pass a function as > > an argument. Second, I > > think it shows that you can get the contents of the > > url using the read > > function. But it's hard for me to absorb, even > > though there's barely 1kb of > > code alltogether. > > > > Well I guess your correct not much thought was put > into it's design. Maybe something like: > > var fl = new FileReader(); > fl.OnInit(function(){ > // this function is called > // once the filereader object has been > // initialized > var url = 'mypage.html'; > var rt = this.read(url); > }) > > How about the above? Is it more intuitive? > > -- > Raymond Irving > > __________________________________ > Do you Yahoo!? > The New Yahoo! Shopping - with improved product search > http://shopping.yahoo.com > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > https://lists.sourceforge.net/lists/listinfo/dynapi-help > > |