My apologies Raymond, we had a bit of duplicate work - I also added some of those features (change load to get(), added getValue), and I reorganized some of the variables a bit better, and made a nice post demo. I didn't check your code yet, but I also added the necessary encode() procedure in IOElement, and an unencode() to dynapi.functions.getURLArguments(). I've attached my version to this message.
I like the multitasking idea, though I think it's only of use in very particular
applications - maybe it could be an extension? Also I think it would be proper to add
Netscape 4 post support through a standard frame element.
Let me know if you'll have time to work on this further, otherwise I can get your the
multi-task code into my version and in CVS this week (have to figure out the
Sourceforge CVS thing again first).
Regards,
Dan Steinman
On Mon, Jan 21, 2002 at 10:02:54AM -0800, Raymond Irving wrote:
> Hello,
>
> I added a semi-multitasking feature to IOElement (it's
> not work very well) which can use very useful to some
> apps. The idea is to create more than one loader (or
> thread) so that two or more downloads can
> theoretically occur at the same time. This feature
> could be used in place of creating four separate
> IOElement objects.
>
> example:
>
> ioelm= new IOElement(4) // creates 4 loader threads
> ioelm.get('iothread-slow.html','some data',fn)
> ioelm.get('iothread-med.html','some data',fn)
> ioelm.get('iothread-fast.html','some data',fn)
>
> The above should load all three pages at virtually the
> same time (similar to how frames work in a browser).
>
> The multitasking feature needs some more work. So feel
> to hack away at it.
>
> I've also added the get(url,data,fn) method which
> replaces the load() method, a post(url,data,fn) and a
> getValue(variablename) method
>
> The data argument can be either an object {} or a
> string:
>
> data={name:value} or data='some text here'
>
> if data is a string the variable name ioData is used
> when sending it to the server.
>
> For the getValue() method if no variable name
> specified the name ioData is used as default.
>
> Any thoughts? Do you think these features are useful?
>
> --
> Raymond Irving
>
>
> __________________________________________________
> Do You Yahoo!?
> Send FREE video emails in Yahoo! Mail!
> http://promo.yahoo.com/videomail/
ioelm.zip
Description: Zip compressed data
