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
Today's Messages (off)  | Unanswered Messages (on)

Forum: Menus&Toolbars
 Topic: menu's small box when i18n
menu's small box when i18n [message #57556] Wed, 22 September 2021 11:24
zouql is currently offline  zouql
Messages: 4
Registered: December 2020
Location: China
Junior Member
Hello,
In the reference AK package, if the menu "Setup" add t_("Setup"), then
there are a small box before Setup, if not the i18n t_, it will be ok.
So how to solve this display problem?

index.php?t=getfile&id=6508&private=0
  • Attachment: ak.jpg
    (Size: 51.61KB, Downloaded 32 times)
Forum: U++ TheIDE: Compiling, Linking, Debugging of your packages
 Topic: Issues with cross-compilation for MacOS on Linux
Issues with cross-compilation for MacOS on Linux [message #57554] Wed, 22 September 2021 01:19
Novo is currently offline  Novo
Messages: 1261
Registered: December 2006
Senior Contributor
In case of an attempt to cross-compile umk I'm getting a linker error below:
----- umk ( OSX MAIN CLANG SHARED BLITZ ) (14 / 14)
Linking...
ld: warning: ignoring file /home/ssg/dvlp/cpp/code/upp/out/uppsrc/ide/Builders/OSX1013cpp17.Osx.Shared/Builders.a, building for macOS-x86_64 but attempting to li
    nk with file built for macOS-x86_64
ld: archive has no table of contents file '/home/ssg/dvlp/cpp/code/upp/out/uppsrc/plugin/pcre/OSX1013cpp17.Osx.Shared/pcre.a' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Interestingly, I'm not getting any problems with linking when I'm building my own apps.


Regards,
Novo
 Topic: Issues with cross-compilation for Win32 on Linux
Issues with cross-compilation for Win32 on Linux [message #57553] Wed, 22 September 2021 01:04
Novo is currently offline  Novo
Messages: 1261
Registered: December 2006
Senior Contributor
1) Old problem with windres.exe:
x86_64-w64-mingw32-windres.exe -i "/home/ssg/dvlp/cpp/user/upp/amap/amap.rc" ...

There were errors.

I have an old version of umk where this problem is fixed. Maybe, I fixed it myself.

2) It would be good to store Upp code revision an app was built against, and output it in a "help" message.
Upp has got a bmGIT_REVCOUNT macro. The problem is that git doesn't use revision numbers, it uses hashes.


Regards,
Novo
Forum: Mac OS
 Topic: Issues with cross-compilation for MacOS on Linux
Issues with cross-compilation for MacOS on Linux [message #57552] Tue, 21 September 2021 21:48
Novo is currently offline  Novo
Messages: 1261
Registered: December 2006
Senior Contributor
There is a couple of issues with cross-compilation for MacOS on Linux.
1) Using of COMMON_FLAGS = "OSX" doesn't imply defining of POSIX. Because of that PdfDraw doesn't get linked in.
2) Folder Contents/Resources and file Contents/Info.plist do not get created. This is, probably, not a big deal, but still is an issue.

TIA.


Regards,
Novo
Forum: U++ TheIDE: Other Features Wishlist and/or Bugs
 Topic: [FIXED].bsc - compile function doesn't contain target path for object files.
[FIXED].bsc - compile function doesn't contain target path for object files. [message #57549] Mon, 20 September 2021 05:08
jjacksonRIAB is currently offline  jjacksonRIAB
Messages: 99
Registered: June 2011
Member
From the example script posted in this forum, the OutputDir variable is empty so the compile function ends up putting the .o files in the source directory.

Edit: problem was in the example script itself when it hooks into objectfile not needing to. OutputDir doesn't actually exist as any variable in UPP.

[Updated on: Mon, 20 September 2021 08:25]

Report message to a moderator

 Topic: Custom .bsc files
Custom .bsc files [message #57548] Mon, 20 September 2021 01:22
jjacksonRIAB is currently offline  jjacksonRIAB
Messages: 99
Registered: June 2011
Member
This feature also badly needs some actual documentation rather than having to search the forums.
Forum: Draw, Display, Images, Bitmaps, Icons
 Topic: Encoding an image in base64
Encoding an image in base64 [message #57546] Sun, 19 September 2021 13:34
Giorgio is currently offline  Giorgio
Messages: 217
Registered: August 2015
Experienced Member
Hi there,
I have a RichText field that contains some formatted text that I need to convert it to a base64 encoded PNG image.

I've been trying to use PNGEncoder and Encode64() with mixed results:
RichText text;

//text is filled in

ImagePainter w(3000, 100);
w.DrawRect(0, 0, 3000, 100, White());
text.Paint(w, 0, 0, 3000);

PNGEncoder png;
png.SaveFile("C:\\Temp\\richtext.png", w);


The above code works perfectly: I got a PNG image that can be viewed with any image viewer.

Anyway, I need the image to be encoded in base64, so I change the "png.SaveFile()" line above with the following:
String png_string = png.SaveString(w);
SaveFile("C:\\Temp\\test.txt",Encode64(png_string));


If I open the txt file, copy the content and paste it into an online base64 decoder (I tried a few) the image cannot be decoded.

What I do wrong?
Thankks,
gio



Forum: U++ community news and announcements
 Topic: String::Make - new way how to create a small string fast
String::Make - new way how to create a small string fast [message #57545] Sat, 18 September 2021 17:31
mirek is currently offline  mirek
Messages: 13428
Registered: November 2005
Ultimate Member
While optimizing conversion routines, I have found a relative bottleneck when converting small char buffers to String. To solve that, there is now a new static method


template <class Maker> static String Make(int alloc, Maker m)


Optimized static method for creating Strings. This method creates internal buffer of at least alloc and then invokes lambda m passing the char * pointer to the internal buffer as lambda parameter. Lambda is then supposed to fill the characters to this buffer and return the length of string (which must be <= alloc). For the best performance, alloc should be constant.

Example:

String x = String::Make(12, char *t) { *t++ = "X"; return 1; };

[Updated on: Sat, 18 September 2021 17:31]

Report message to a moderator

Forum: U++ SQL
 Topic: SqlSelect::AsTable()
SqlSelect::AsTable() [message #57534] Fri, 17 September 2021 15:20
mubeta is currently offline  mubeta
Messages: 77
Registered: October 2006
Member
In file SqlStatement.cpp, this method: SqlStatement() seems to me that it consider the runtime app declared for use a single databae. In fact it seems to me that if is use two databases, for example one Sqlite3 and one in MySQL, this method in MySql don't run as well.

For now I modified it in this way:
SqlSet SqlSelect::AsTable(const SqlId& tab, int dialect) const
{
	StringBuffer t;
	if(dialect == MSSQL || dialect == PGSQL || dialect == SQLITE3)
	{
	  t << "(";
	}
	t << "(" << text << ")";
	if(dialect != ORACLE)
	{
	  t << " as";
	}
	t << " \t" << tab.ToString() << '\t';
	if(dialect == MSSQL || dialect == PGSQL || dialect == SQLITE3)
	{
	  t << ")";
	}
	
	return SqlSet(String(t), SqlSet::HIGH);
}




Current Time: Thu Sep 23 23:52:28 CEST 2021

Total time taken to generate the page: 0.02146 seconds