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
Gnustep-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to