|
|
Home » Community » Newbie corner » Another String error solved, maybe. ( String error)
Another String error solved, maybe. [message #46769] |
Sun, 31 July 2016 17:30  |
nlneilson
Messages: 644 Registered: January 2010 Location: U.S. California. Mojave &...
|
Contributor |
|
|
from old apps edit field <<= just remove the =
String error
filename0=(String)OutFile;
error: no matching function for call to 'Upp::String::String(Upp::EditField&)'
All of the Strings are the upp Strings
There are no uses of the std strings
It has been several years since compiling this app but it was good before
Neil
[Updated on: Wed, 17 August 2016 10:12] Report message to a moderator
|
|
|
String error has not been solved [message #46805 is a reply to message #46769] |
Sat, 13 August 2016 06:40   |
nlneilson
Messages: 644 Registered: January 2010 Location: U.S. California. Mojave &...
|
Contributor |
|
|
filename0=(String)OutFile;
error: no matching function for call to 'Upp::String::String(Upp::EditField&)'
Is this an instance where std:string needs to be used or just a dumb error I have made when using upp 10100
I did not have this error with a previous version of upp but that could have been a few years ago.
Neil
[Updated on: Sat, 13 August 2016 06:51] Report message to a moderator
|
|
|
|
|
Re: Another String error solved, maybe. Not solved !! [message #46873 is a reply to message #46769] |
Sat, 03 September 2016 14:36   |
nlneilson
Messages: 644 Registered: January 2010 Location: U.S. California. Mojave &...
|
Contributor |
|
|
This is with upp 10200
three errors the same
(142): error: no matching function for call to 'Upp::String::String(Upp::EditField&)'
(150) and (158)
C:\upp-mingw-10200\upp\MyApps\DGPSmerge\DGPSmerge.cpp (150): error: no matching function for call to 'Upp::String::String(Upp::EditField&)'
C:\upp-mingw-10200\upp\MyApps\DGPSmerge\DGPSmerge.cpp (142): error: no matching function for call to 'Upp::String::String(Upp::EditField&)'
C:\upp-mingw-10200\upp\MyApps\DGPSmerge\DGPSmerge.cpp (142): error: no matching function for call to 'Upp::String::String(Upp::EditField&)'
#142 filename0=(String)OutFile;
# FileOut outF(filename0);
if(!outF) {
Exclamation("Unable to open Out file [* " + DeQtf(filename0));
return;
}
// FileIn in1((String)fn1);
#150 filename1=(String)BaseFile;
FileIn in1(filename1);
if(!in1) {
Exclamation("Unable to open Base file [* " + DeQtf(filename1));
return;
}
// FileIn in2((String)fn2);
#158 filename2=(String)RoamFile;
FileIn in2(filename2);
I don't understand what the problem is and what the upp changes are that causes this.
I still have the executable app that upp compiled before a few years ago that works OK still.
Here is a thread started by Mirek about changes "EditField::operator String() removed" with a mention of "is very easy to fix"
I do not understand what is required to be done. http://www.ultimatepp.org/forums/index.php?t=msg&goto=46 824&#msg_46824
[Updated on: Sat, 03 September 2016 15:11] Report message to a moderator
|
|
|
Re: Another String error solved, maybe. [message #46877 is a reply to message #46769] |
Sun, 04 September 2016 17:30   |
 |
deep
Messages: 267 Registered: July 2011 Location: Bangalore
|
Experienced Member |
|
|
Hi Neilson,
Try following.
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
struct App : public TopWindow
{
EditField infile,outfile,basefile;
String In,Out,Base;
App();
};
App::App()
{
infile.SetText("In File");
outfile.SetText("Out File");
basefile.SetText("Base File");
Add(infile.TopPos(4,20).HSizePos());
Add(outfile.TopPos(28,20).HSizePos());
Add(basefile.TopPos(52,20).HSizePos());
Title("Test EditField").Sizeable().Zoomable();
In = ~infile ;
Out = ~outfile ;
Base = ~basefile ;
DUMP(In);
DUMP(Out);
DUMP(Base);
}
GUI_APP_MAIN
{
App app;
app.SetRect(100,100,300,200);
app.Run();
}
This will give error. Will not compile.
Warm Regards
Deepak
|
|
|
|
|
|
|
|
|
|
Re: Another String error solved, maybe. [message #46915 is a reply to message #46914] |
Sat, 10 September 2016 09:49  |
 |
mirek
Messages: 14256 Registered: November 2005
|
Ultimate Member |
|
|
cbpporter wrote on Sat, 10 September 2016 09:00mirek wrote on Sat, 10 September 2016 08:49cbpporter wrote on Fri, 09 September 2016 10:43I found another thing related to String and I'm not sure of it should work with the new core or not.
Index<String> words;
Sort(words);
This won't compile. Is it supposed to?
No.
But you can use 'SortIndex'.
Mirek
Interesting design.
Why no overload Sort for Index to call SortIndex? Would help random users.
Well, maybe. However, 'Sort' is meant to be generic sorting algorithm for containers with certain set of requirements and all it does is sorting. Index does not match these requirements.
Sorting Index is quite more complex, as it works by converting Index to Vector, sorting, then recreating Index back (restoring hashing info). Maybe the warning that you are doing something unusual is in place here... Forcing user to write SortIndex instead of just Sort to acknowledge this fact is the idea....
Mirek
[Updated on: Sat, 10 September 2016 09:49] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Fri May 02 03:45:59 CEST 2025
Total time taken to generate the page: 0.02226 seconds
|
|
|