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) » What is the status of IDOK please?
What is the status of IDOK please? [message #13296] Sun, 30 December 2007 21:55 Go to next message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
I notice that IDOK is used throughout the examples and frequently in the forums too and I have been using it in a similar way in my code. However, when I try to compile with GCC under Linux, it says

error: ISO C++ says that these are ambiguous, ....

What is the proper thing to do please? Should I just replace IDOK with 1 ?

Nick
Re: What is the status of IDOK please? [message #13309 is a reply to message #13296] Mon, 31 December 2007 18:46 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
nixnixnix wrote on Sun, 30 December 2007 15:55

I notice that IDOK is used throughout the examples and frequently in the forums too and I have been using it in a similar way in my code. However, when I try to compile with GCC under Linux, it says

error: ISO C++ says that these are ambiguous, ....

What is the proper thing to do please? Should I just replace IDOK with 1 ?

Nick


Oh, that is something new. In Ubuntu, I see no such problem. Where the other IDOK comes from?

Mirek
Re: What is the status of IDOK please? [message #13359 is a reply to message #13309] Thu, 03 January 2008 00:21 Go to previous messageGo to next message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
Yeah I don't know why it thinks it is ambiguous. I am using Ubuntu 7.04 desktop on a E6600.

I may have something setup wrong though as I took the upp7.1 debian package and simply overwrote the source files with more recent dev versions in order to be able to compile my project.

Nick
Re: What is the status of IDOK please? [message #13371 is a reply to message #13359] Thu, 03 January 2008 14:43 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
nixnixnix wrote on Wed, 02 January 2008 18:21

Yeah I don't know why it thinks it is ambiguous. I am using Ubuntu 7.04 desktop on a E6600.

I may have something setup wrong though as I took the upp7.1 debian package and simply overwrote the source files with more recent dev versions in order to be able to compile my project.

Nick


Does it tell you where are those conflicting definitions?

Mirek

[Updated on: Thu, 03 January 2008 14:43]

Report message to a moderator

Re: What is the status of IDOK please? [message #13373 is a reply to message #13371] Thu, 03 January 2008 15:20 Go to previous messageGo to next message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
Hi Mirek,

No the only message I get is


Quote:


/home/user/MyApps/OpenWind/MetMastLayer.cpp:247: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
/home/user/MyApps/OpenWind/MetMastLayer.cpp:247: note: candidate 1: operator!=(int, int) <built-in>
/home/user/upp/uppsrc/Core/Value.h:187: note: candidate 2: bool Upp::operator!=(bool, const Upp::Value&)




however I notice that there are lots of IDOK in the uppsrc so I don't understand why mine are not ok. Just to give you some background: I have got my project to build by simply copying the latest source files over the top of those in the 2007.1 release. Is this correct?

Nick
Re: What is the status of IDOK please? [message #13377 is a reply to message #13373] Thu, 03 January 2008 17:58 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
nixnixnix wrote on Thu, 03 January 2008 09:20

Hi Mirek,

No the only message I get is


Quote:


/home/user/MyApps/OpenWind/MetMastLayer.cpp:247: error: ISO C++ says that these are ambiguous, even though the worst conversion for the first is better than the worst conversion for the second:
/home/user/MyApps/OpenWind/MetMastLayer.cpp:247: note: candidate 1: operator!=(int, int) <built-in>
/home/user/upp/uppsrc/Core/Value.h:187: note: candidate 2: bool Upp::operator!=(bool, const Upp::Value&)




however I notice that there are lots of IDOK in the uppsrc so I don't understand why mine are not ok. Just to give you some background: I have got my project to build by simply copying the latest source files over the top of those in the 2007.1 release. Is this correct?

Nick


Hey, this is different bug. It does not mean anything is wrong with IDOK.

Can you show me the piece of code? (My guess is that you are storing dialog result code into wrong type of variable...)

Mirek
Re: What is the status of IDOK please? [message #13384 is a reply to message #13377] Thu, 03 January 2008 20:14 Go to previous messageGo to next message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
Thanks Mirek,

I am not storing the result. This is the code which causes the first error (picked cos it was first)

void OpenWind::ReportAllSites()
{
	FileSel fs;
	fs.DefaultExt("txt");
	fs.Type("Tab-Delimited Text File *.txt", "*.txt");
	fs.ActiveDir(GetActiveDir());
	
	if(fs.ExecuteSaveAs("Save Energy Capture Results")!=IDOK)return;

....


it compiles fine under windows with MSC8, MSC9 and MINGW.

What do you think? Is there anything else I can supply?

Nick
Re: What is the status of IDOK please? [message #13386 is a reply to message #13384] Thu, 03 January 2008 21:27 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
nixnixnix wrote on Thu, 03 January 2008 14:14

Thanks Mirek,

I am not storing the result. This is the code which causes the first error (picked cos it was first)

void OpenWind::ReportAllSites()
{
	FileSel fs;
	fs.DefaultExt("txt");
	fs.Type("Tab-Delimited Text File *.txt", "*.txt");
	fs.ActiveDir(GetActiveDir());
	
	if(fs.ExecuteSaveAs("Save Energy Capture Results")!=IDOK)return;

....


it compiles fine under windows with MSC8, MSC9 and MINGW.

What do you think? Is there anything else I can supply?

Nick


I see. Well, you are not supposed to use IDOK there - it returns "true" on success, "false" on cancel.

	if(fs.ExecuteSaveAs("Save Energy Capture Results"))return;


(Note that even formally, it is not "OK" button in the FileSel after all Smile

Mirek
Re: What is the status of IDOK please? [message #13394 is a reply to message #13386] Thu, 03 January 2008 21:43 Go to previous messageGo to next message
mr_ped is currently offline  mr_ped
Messages: 825
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor
luzr wrote on Thu, 03 January 2008 21:27


...
Mirek



probably
	if(!fs.ExecuteSaveAs("Save Energy Capture Results"))return;

in his case. Smile

(or I will hide under bed for whole month in shame)
Re: What is the status of IDOK please? [message #13396 is a reply to message #13394] Thu, 03 January 2008 21:45 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Hehe, right, thanks Wink

Mirek
Re: What is the status of IDOK please? [message #13398 is a reply to message #13396] Thu, 03 January 2008 23:10 Go to previous message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
LOL - perfect - thanks guys Smile
Previous Topic: FindFile::GetCreationTime() not found in linux
Next Topic: Bug in app.cpp compiling non-gui apps (linux)
Goto Forum:
  


Current Time: Fri Apr 19 20:21:54 CEST 2024

Total time taken to generate the page: 0.02812 seconds