Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » program hangs [label]
program hangs [label] [message #17628] Sat, 23 August 2008 13:16 Go to next message
TeCNoYoTTa is currently offline  TeCNoYoTTa
Messages: 138
Registered: July 2008
Location: Egypt
Experienced Member

hello all

why this code hangs

FtpUploader::FtpUploader()
{
	CtrlLayout(*this,"Upload" );
	
	btn_uplaod <<THISBACK (btn_upload_OnClick);
	prog1.SetText(IntStr(client.GetSavePos()));
	prog2.SetText( IntStr(client.GetSaveTotal()));
	client.WhenProgress = THISBACK(pro);
	
	
}
void FtpUploader::btn_upload_OnClick()
{
	status.SetText("Connecting");
	client.Connect("ftp.servage.net","tecno","password");
	
	status.SetText("Connected");
	//client.
	//x = client.WhenProgress ;
	client.Save("testo.txt",LoadFile("D:\\fileupload-class.php"));
}
bool FtpUploader::pro()
{

	//prog1 and prog2 are labels

	//pi.Set(client.GetSavePos(),client.GetSaveTotal());
	prog1.SetText(IntStr(client.GetSavePos()));
	prog2.SetText( IntStr(client.GetSaveTotal()));
	return false;
}


this program hangs then after some time returns to be normal after uploading file
Re: program hangs [label] [message #17629 is a reply to message #17628] Sat, 23 August 2008 13:40 Go to previous messageGo to next message
captainc is currently offline  captainc
Messages: 278
Registered: December 2006
Location: New Jersey, USA
Experienced Member
On first glance, because it is not threaded. I'm not sure if those classes are threaded by default though. Do you have MT enabled?
Re: program hangs [label] [message #17633 is a reply to message #17629] Sat, 23 August 2008 13:53 Go to previous messageGo to next message
TeCNoYoTTa is currently offline  TeCNoYoTTa
Messages: 138
Registered: July 2008
Location: Egypt
Experienced Member

yes MT is enabled
Re: program hangs [label] [message #17649 is a reply to message #17633] Sun, 24 August 2008 20:14 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Hard to say.

Have you tried in some good debugger to find out WHERE it hangs?

Mirek
Re: program hangs [label] [message #17655 is a reply to message #17649] Sun, 24 August 2008 22:11 Go to previous message
TeCNoYoTTa is currently offline  TeCNoYoTTa
Messages: 138
Registered: July 2008
Location: Egypt
Experienced Member

i opened it in new thread and it worked ok

but what i know is that i dont need to use threads here as gate will make GUI update automaticaly
Previous Topic: friend window
Next Topic: selected text in other application
Goto Forum:
  


Current Time: Fri Apr 26 13:38:54 CEST 2024

Total time taken to generate the page: 0.05549 seconds