This would be better done in another place.  We should close the stream in
the Conduit or in the SimpleClient, It should be in the same layer as the
file is open.  Mixing GUI code with file code is no good, it is bad style,
and more difficult to work with.


I will take a look at this.

Thanks for the tip!

Paul

> From: "Jebu Ittiachen" <jebu at bigfoot.com>
> Reply-To: freenet-dev at lists.sourceforge.net
> Date: Sun, 9 Apr 2000 12:14:03 -0500
> To: <freenet-dev at lists.sourceforge.net>
> Subject: Re: [Freenet-dev] Improved FGUI
> 
> Hi,
> I'm pretty new to this stuff and have been lurking around for a few
> days. I've been having problems getting the scripts to run on the Windowze
> a few days back)  but no probs on my Linux sys. But it does a pretty good
> job of installing now.
> Anyway the GUI looks pretty good, a small note on the way the
> FileStreams were handled, I was downloading the Freenet source from freenet
> with the GUI and WinZip gave errors due to file contention on the file, said
> it was not able to open the file or something like that. I did a small
> change in the ProgressBar to close the stream in the finished method.
> Something like this.....
> ProgressBar.java------------- snips
> <change>
> java.io.OutputStream out;
> 
> public void setStream(java.io.OutputStream out){
> this.out=out;
> }
> </change>
> public void finished() {
> setVisible(false);
> done = true;
> <change>
> try{
> if (out!=null)
> out.close();
> }catch(java.io.IOException e){
> e.printStackTrace();
> }
> </change>
> }
> 
> and something like this to the SimpleRequestClient.java
> DataReply reply = rc.request(key);
> InputStream stream= reply.in;
> <change>
> counter.setStream(out);
> </change>
> counter.start(reply.length.longValue(), file);
> 
> I guess the same problems exists in the command line clients but since they
> exit after the use the streams are closed automatically. I'm just getting
> used to the API so could not figure out where else to put it in, maybe there
> would be a better place to signal stream close......
> 
> Regards
> Jebu Ittiachen
> 
> 
> ----- Original Message -----
> From: "Oskar Sandberg" <md98-osa at nada.kth.se>
> To: <freenet-dev at lists.sourceforge.net>
> Sent: Sunday, April 09, 2000 8:34 AM
> Subject: Re: [Freenet-dev] Improved FGUI
> 
> 
>> 
>> Cool. It is very nice seeing someone use those client classes the way I
>> intended when I wrote them. If there are any particular wishes you want on
> the
>> InsertClient and RequestClient classes, you should say so.
>> 
>> Like I advocate with the command line client, I think that you should take
>> the address in without the "tcp/" first. Having the protocol there is nice
> in
>> our protocol since it helps us keep it independent of the carrier - but
> FGUI
>> would need to be rewritten to work with a new protocol anyways, and the
> "tcp/"
>> will confuse users. At least you should catch the ugly exceptions a
> wrongly
>> written address causes.
>> 
>> On Sun, 09 Apr 2000, Paul Kappler wrote:
>>> With a start from Adam, I added Progress Bars and improved FGUI's
>>> multitasking ability.  Take a look.
>>> 
>>> If you think it appropriate for windows and unix respectively, it would
> be
>>> nice to add FGUI to the scripts folder; Both in the build scripts and a
>>> script to start it up.  What do you think?
>>> 
>>> Cheers,
>>> 
>>> Paul Kappler
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> Freenet-dev mailing list
>>> Freenet-dev at lists.sourceforge.net
>>> http://lists.sourceforge.net/mailman/listinfo/freenet-dev
>> --
>> 
>> Oskar Sandberg
>> 
>> md98-osa at nada.kth.se
>> 
>> #!/bin/perl -sp0777i<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<j]dsj
>> $/=unpack('H*',$_);$_=`echo 16dio\U$k"SK$/SM$n\EsN0p[lN*1
>> lK[d2%Sa2/d0$^Ixp"|dc`;s/\W//g;$_=pack('H*',/((..)*)$/)
>> 
>> _______________________________________________
>> Freenet-dev mailing list
>> Freenet-dev at lists.sourceforge.net
>> http://lists.sourceforge.net/mailman/listinfo/freenet-dev
>> 
> 
> _____________________________________________
> NetZero - Defenders of the Free World
> Click here for FREE Internet Access and Email
> http://www.netzero.net/download/index.html
> 
> _______________________________________________
> Freenet-dev mailing list
> Freenet-dev at lists.sourceforge.net
> http://lists.sourceforge.net/mailman/listinfo/freenet-dev


_______________________________________________
Freenet-dev mailing list
Freenet-dev at lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/freenet-dev

Reply via email to