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 » FileSel&FileList, Path » Problem with FileSel
Problem with FileSel [message #27082] Thu, 24 June 2010 23:12 Go to next message
koldo is currently offline  koldo
Messages: 3268
Registered: August 2008
Senior Veteran
Hello Mirek

There is a problem with FileSel, at least choosing a file for reading.

It contains a DropList called type.

To add a new type it is used:

type.Add(type.GetCount(), name);

However if a name with wildcards is included as file name, it is called this:

type.Add(fn, t_("Custom file type (") + fn + ')');

After choosing the file, the program gets an exception here:

int ti = ~type;

As type contains an String, it cannot be assigned to an int.


Best regards
Iñaki
Re: Problem with FileSel [message #27104 is a reply to message #27082] Fri, 25 June 2010 15:11 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13442
Registered: November 2005
Ultimate Member
Thanks. Hopefully fixed:

	FileUpdate();
	Update();
	int c = TopWindow::Run(appmodal);
	TopWindow::Close();
	lastsby = list.GetSbPos();
	if(IsNumber(~type)) {
		int ti = ~type;
		type.Trim(dlc);
		if(ti >= 0 && ti < type.GetCount())
			activetype = type.GetValue(ti);
	}


Mirek
Re: Problem with FileSel [message #27117 is a reply to message #27104] Sat, 26 June 2010 16:28 Go to previous message
koldo is currently offline  koldo
Messages: 3268
Registered: August 2008
Senior Veteran
Smile

Best regards
Iñaki
Previous Topic: FileSel file seting
Next Topic: Style for FileSel / FileList
Goto Forum:
  


Current Time: Wed Oct 20 08:13:08 CEST 2021

Total time taken to generate the page: 0.01190 seconds