On Wednesday, July 6, 2016 10:58 CEST, Fred Kiefer <[email protected]> wrote: > Hi Riccardo, > > I tried to inspect this issue, but already failed in getting FTP.app to work > against ftpmain.gnustep.org. Are there any ftp sites out there where you know > the code is working correctly.
I guess you may be behind a NAT or have a local firewall? can you check that you have in the settings, tell it to use PASV. Maybe Riccardo, that could/should be made default method? Sebastian > Next I looked at the code and failed to see the point where a background > thread for the file download gets started. There is only one reference to > NSThread in the code and this is at the startup. No idea what this code is > doing there. > > In AppController setTransferProgress: you are most likely referring to the > line > [progBar setDoubleValue:percent]; > This should indeed update the progress bar the next time GNUstep redraws the > window. And even if you don't use a background thread the NSRunloop trick > should be enough to trigger this. Without being able to get this working it > is hard to say anything more. What you could try to find out is whether the > drawRect: method of the progress indicator gets called at all. It could be > that it is in a state where it just doesn't draw anything. > > Fred > > On the road > > Am 04.07.2016 um 11:47 schrieb Riccardo Mottola <[email protected]>: > > > Hi, > > > > I have FTP - written quite a while ago. > > Easy access here: > > > > https://github.com/gnustep/gap/tree/master/user-apps/FTP > > > > The implementation - hopefully correct - is the following: the download > > happens in a separate thread inside ftpclient.m which communicates back the > > progress (advancement of the file being transferred). > > > > The "progress" is shown with a ProgressBar and some text fields, quite > > simple. > > > > On Mac, everything works like a charme! The progress bar is smooth and I > > see the bytes and transfer speed! > > On GNUstep not: it is set at the beginning, then no updates until the end. > > > > The critical method is: > > > > - (oneway void)setTransferProgress:(NSNumber *)bytesTransferred > > > > I added "oneway" yesterday - with no change in functionality if not a quite > > good gain of speed on Mac: the worker thread doesn't block while actually > > "updating" the GUI. > > > > why do I have this issues on GNUstep? Any special care or tricks? > > Maybe I need to set the certain views to display or needs display on GS? > > > > I already have this old trick: > > [[NSRunLoop currentRunLoop] runUntilDate:[NSDate distantPast]]; > > > > It shouldn't be needed with two threads I think.. and with or without no > > effect. > > > > Riccardo > > > > > > _______________________________________________ > > Gnustep-dev mailing list > > [email protected] > > https://lists.gnu.org/mailman/listinfo/gnustep-dev > > > _______________________________________________ > Gnustep-dev mailing list > [email protected] > https://lists.gnu.org/mailman/listinfo/gnustep-dev _______________________________________________ Gnustep-dev mailing list [email protected] https://lists.gnu.org/mailman/listinfo/gnustep-dev
