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++ TheIDE » U++ TheIDE: Other Features Wishlist and/or Bugs » Bug+solution in TheIde Topic++ (I fixed a little problem in the Topic++ part of Theide)
Bug+solution in TheIde Topic++ [message #46294] Sat, 09 April 2016 22:40 Go to next message
Alboni is currently offline  Alboni
Messages: 214
Registered: January 2012
Location: Deventer, Netherlands
Experienced Member
Problem: I can't create a topic about a database field in a .sch file if the type of the field is INT64_

index.php?t=getfile&id=4994&private=0

Solution:

Add a line in ide/Browser/Sch.cpp (starting around line 99)

if(p.Id("LONGRAW") || p.Id("LONGRAW_") || p.Id("BLOB") || p.Id("BLOB_") ||
p.Id("STRING_") || p.Id("STRING") || p.Id("CLOB") || p.Id("CLOB_"))
r << "\tString " << ReadId(p, rr) << ";";
else
if(p.Id("INT") || p.Id("INT_") || p.Id("SERIAL") || p.Id("ISERIAL"))
r << "\tint " << ReadId(p, rr) << ";";
else
if(p.Id("INT64") || p.Id("INT64_") || p.Id("SERIAL") || p.Id("ISERIAL"))
r << "\tint64 " << ReadId(p, rr) << ";";

else
if(p.Id("DOUBLE") || p.Id("DOUBLE_"))
r << "\tdouble " << ReadId(p, rr) << ";";
else
if(p.Id("TIME") || p.Id("TIME_"))
r << "\tTime " << ReadId(p, rr) << ";";
else
if(p.Id("DATE") || p.Id("DATE_"))
r << "\tDate " << ReadId(p, rr) << ";";
else
if(p.Id("BIT") || p.Id("BIT_") || p.Id("BOOL") || p.Id("BOOL_"))

  • Attachment: problem.png
    (Size: 23.84KB, Downloaded 399 times)
Re: Bug+solution in TheIde Topic++ [message #46295 is a reply to message #46294] Sat, 09 April 2016 23:03 Go to previous messageGo to next message
Alboni is currently offline  Alboni
Messages: 214
Registered: January 2012
Location: Deventer, Netherlands
Experienced Member
Also added int64 to ide/Browser/item.cpp

bool IsCppType(const String& id)
{
	static const char *t[] = {
		"int", "int64", "long", "short", "void", "float", "double", "char", "signed", "unsigned", "bool",
		"const", "mutable", "struct", "class", "union"
	};
	static Index<String> kt;
	ONCELOCK {
		for(int i = 0; i < __countof(t); i++)
			kt.Add(t[i]);
	}
	return kt.Find(id) >= 0;
}

But it doesn't change the color of int64 into blue in the popup when hovering over the little square like it does with int.
index.php?t=getfile&id=4995&private=0


  • Attachment: popup.png
    (Size: 36.73KB, Downloaded 451 times)
Re: Bug+solution in TheIde Topic++ [message #46347 is a reply to message #46295] Mon, 25 April 2016 13:34 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Makes sense, thanks.

As for IsCppType, I believe it is not correct to put int64 there, as it is not a native C++ type (it is typedef)
Previous Topic: Rare bug on CtrlCore/ImageWin32.cpp
Next Topic: [ACCEPTED] New file
Goto Forum:
  


Current Time: Thu Mar 28 20:38:37 CET 2024

Total time taken to generate the page: 0.01509 seconds