From: Raymond I. <xw...@ya...> - 2003-10-08 18:55:40
|
It's kinda optional. If you setup a timeout and wait until the page has been loaded then you would not require the init function as the object would have already been initialized -- Raymond Irving --- Leif W <war...@us...> wrote: > 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 > > > > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: SF.net Giveback > Program. > SourceForge.net hosts over 70,000 Open Source > Projects. > See the people who have HELPED US provide better > services: > Click here: http://sourceforge.net/supporters.php > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > https://lists.sourceforge.net/lists/listinfo/dynapi-help __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com |