Home » Community » U++ community news and announcements » 2024rc1
Re: 2024rc1 [message #60951 is a reply to message #60949] |
Sun, 13 October 2024 13:58   |
 |
mirek
Messages: 14255 Registered: November 2005
|
Ultimate Member |
|
|
Lance wrote on Sun, 13 October 2024 13:28
The one on "Syntax highlighting" tab is not as well-thought. I recommend to change it to the drop choice similar to the one on "IDE" tab. At the moment we can have these entries
1. light theme (stick with light theme, what the "white theme" buttom will do currently);
2. dark theme (stick with dark theme, what the "Dark theme" button will do currently);
3. "Use host theme"(similar to what the similar one on "IDE" tab would do);
4. "Use default colors" ( what the Restore default colors button would do).
This goes into reasonable direction, however I think that the actual choice should be single option:
"User defined colors"
If active, colors are editable (and do not change when mode changes), if not, it is current default colors for dark/light. Maybe current buttons can stay, although only active when colors are editable...
[Updated on: Sun, 13 October 2024 13:59] Report message to a moderator
|
|
|
Re: 2024rc1 [message #60952 is a reply to message #60950] |
Sun, 13 October 2024 14:20   |
Lance
Messages: 656 Registered: March 2007
|
Contributor |
|
|
mirek wrote on Sun, 13 October 2024 07:55Lance wrote on Sun, 13 October 2024 13:28
1. In dark theme, the Topic++ editor is still in light mode. Would be nice if it can melt with environment.
Another pretty though nut to crack...
What will be the equivalent of choosing the text color in the dark mode?
Not that you are editing text for both modes. We handle, barely, translation of light theme colors to dark theme colors, but is the user, while editing topic++, supposed to select light mode colors (as is now) or dark mode colors that will look different in light mode?
Anyway, all in all, I am postponing this after the release...
I see. I just checked Libre Office. It doesn't respect DarkTheme for its content area. So maybe we shall just accept what we have right now.
Unless u++ users can agree on limiting the color selection to the ones that are theme-defined -- this is doable, but quite involving, and also possibly not what our guys want. Very low priority if it ever will be considered.
[Updated on: Sun, 13 October 2024 14:22] Report message to a moderator
|
|
|
Re: 2024rc1 [message #60953 is a reply to message #60951] |
Sun, 13 October 2024 14:23   |
Lance
Messages: 656 Registered: March 2007
|
Contributor |
|
|
mirek wrote on Sun, 13 October 2024 07:58Lance wrote on Sun, 13 October 2024 13:28
The one on "Syntax highlighting" tab is not as well-thought. I recommend to change it to the drop choice similar to the one on "IDE" tab. At the moment we can have these entries
1. light theme (stick with light theme, what the "white theme" buttom will do currently);
2. dark theme (stick with dark theme, what the "Dark theme" button will do currently);
3. "Use host theme"(similar to what the similar one on "IDE" tab would do);
4. "Use default colors" ( what the Restore default colors button would do).
This goes into reasonable direction, however I think that the actual choice should be single option:
"User defined colors"
If active, colors are editable (and do not change when mode changes), if not, it is current default colors for dark/light. Maybe current buttons can stay, although only active when colors are editable...
Sounds good!
[Updated on: Sun, 13 October 2024 14:24] Report message to a moderator
|
|
|
|
Re: 2024rc1 [message #60961 is a reply to message #60940] |
Mon, 14 October 2024 16:13   |
 |
mirek
Messages: 14255 Registered: November 2005
|
Ultimate Member |
|
|
Lance wrote on Sat, 12 October 2024 20:20Code Reformat Issue.
I have been having issues with it for a while. Today I spend a few hours to create a almost mininal example.
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
class S{
void Set ( Size& sz,
int x, int y, int z,
int x1, int y1, int z1
);
const S& f(Rect& r, Rect& s)const;
struct D
{
int s(int rc)const
{
return rc*2;
}
int e(int rc)const
{
return rc*1;
}
int w(int rc)const
{
return rc*3;
}
int t()const
{
return 4;
}
int g(int k)const
{
return k;
}
void alloc();
void alloc(int a);
int v1;
int v2;
};
D col,row;
};
void S::D::alloc ()
{
}
static void func ( int& x, int& y, int& x1, int& y1, int x2, int y2,
int x3, int y3, int x4, int y4
)
{
}
const S& S::f(Rect& r, Rect& s)const
{
int t, l, row_section_bottom, n;
r.top = row.g(r.top);
s.top = t !=0 && r.top<row.v1 ? row.v1 : r.top;
r.left = col.g(r.left);
s.left = l != 0 && r.left< col.v1 ? col.v1 : r.left;
r.bottom = row.g(r.bottom);
s.bottom = row_section_bottom == 1 && r.bottom > row.v1 + row.v2 ?
row.v1+row.v2 : r.bottom;
r.right = col.g(r.right);
s.right = n == 1 && r.right> col.v1 + col.v2 ?
col.v1+col.v2 : r.right;
return *this;
}
Add the code as a separate cpp file in a CtrlLib application, with it current, press Ctrl+I to reformat it. The file before reformat compiles fine, not the reformatted one.
Works for me in windows and works in Ubuntu. Unfortunately, this feature is now using clang-format that can be different per distro...
Would be nice to give me a hint which host platform is in use...
Also, if nothing helps, please post reformatted text as well.
Mirek
|
|
|
Re: 2024rc1 [message #60962 is a reply to message #60945] |
Mon, 14 October 2024 16:17   |
 |
mirek
Messages: 14255 Registered: November 2005
|
Ultimate Member |
|
|
Quote:
Oops, we just noticed that's the wrong file. We cut the line
from Drawing_en-us.tpp and paste it to the very end of Draw_en-us.tpp. Go back to Draw.h, line 45, right click the dark blue square again, select "copy code reference id".
Switch back to Draw_en-us.tpp, with caret on the newly pasted line, Ctrl-M to bring out the "code reference" dialog. Paste the code reference id we just copied, which should be "Upp::Font::data". Click OK to close the dialog.
So far so good. Click Draw.h tab to bring it current. Oops, an "Invalid memory access!" occurs. If it doesn't, move mouse to over the blue square beside line 45 to show a help content. It happened to me twice, verified.
This error can be fixed in the following way. When restarting theide, you will be prompted to disable Assist features, select "Yes", go to the tpp file, delete thr problematic help line. Then use menu Setup/Settings, on Assist tab, check the first item "Assist libclang parser is enabled..." to reenable Assit++.
Cannot reproduce.
Maybe if this could be done without using uppsrc sources and tpp, just in single package, maybe you can prepare for me "crashing package"?
Alternative, can you run it in debugger? 
Mirek
|
|
|
Re: 2024rc1 [message #60963 is a reply to message #60961] |
Mon, 14 October 2024 16:23   |
Lance
Messages: 656 Registered: March 2007
|
Contributor |
|
|
mirek wrote on Mon, 14 October 2024 10:13Lance wrote on Sat, 12 October 2024 20:20Code Reformat Issue.
I have been having issues with it for a while. Today I spend a few hours to create a almost mininal example.
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
class S{
void Set ( Size& sz,
int x, int y, int z,
int x1, int y1, int z1
);
const S& f(Rect& r, Rect& s)const;
struct D
{
int s(int rc)const
{
return rc*2;
}
int e(int rc)const
{
return rc*1;
}
int w(int rc)const
{
return rc*3;
}
int t()const
{
return 4;
}
int g(int k)const
{
return k;
}
void alloc();
void alloc(int a);
int v1;
int v2;
};
D col,row;
};
void S::D::alloc ()
{
}
static void func ( int& x, int& y, int& x1, int& y1, int x2, int y2,
int x3, int y3, int x4, int y4
)
{
}
const S& S::f(Rect& r, Rect& s)const
{
int t, l, row_section_bottom, n;
r.top = row.g(r.top);
s.top = t !=0 && r.top<row.v1 ? row.v1 : r.top;
r.left = col.g(r.left);
s.left = l != 0 && r.left< col.v1 ? col.v1 : r.left;
r.bottom = row.g(r.bottom);
s.bottom = row_section_bottom == 1 && r.bottom > row.v1 + row.v2 ?
row.v1+row.v2 : r.bottom;
r.right = col.g(r.right);
s.right = n == 1 && r.right> col.v1 + col.v2 ?
col.v1+col.v2 : r.right;
return *this;
}
Add the code as a separate cpp file in a CtrlLib application, with it current, press Ctrl+I to reformat it. The file before reformat compiles fine, not the reformatted one.
Works for me in windows and works in Ubuntu. Unfortunately, this feature is now using clang-format that can be different per distro...
Would be nice to give me a hint which host platform is in use...
Also, if nothing helps, please post reformatted text as well.
Mirek
Operation System: Ubuntu 24.04.1 LTS
GNOME version: 46
Windowing System: Wayland
clang-format --version: Ubuntu clang-format version 18.1.3 (1ubuntu1)
Reformatted output
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
class S {
void Set(Size& sz, int x, int y, int z, int x1, int y1, int z1);
const S& f(Rect& r, Rect& s) const;
struct D {
int s(int rc) const { return rc * 2; }
int e(int rc) const { return rc * 1; }
int w(int rc) const { return rc * 3; }
int t() const { return 4; }
int g(int k) const { return k; }
void alloc();
void alloc(int a);
int v1;
int v2;
};
D col, row;
};
void S::D::alloc() {}
static void func(int& x, int& y, int& x1, int& y1, int x2, int y2, int x3, int y3, int x4,
int y4)
{
}
const S& S::f(Rect& r, Rect& s) const
{
int t, l, row_section_bottom, n;
r.top = row.g(r.top);
s.top = t != 0 && r.top < row.v1 ? row.v1 : r.top;
r.left = col.g(r.left);
s.left = l != 0 && r.left< col.v1 ? col.v1 : r.left;
s.left = l != 0 && r.left < col.v1 ? col.v1 : r.left;
r.bottom = row.g(r.bottom);
s.bottom = row_section_bottom == 1 && r.bottom > row.v1 + row.v2 ?
s.bottom =
row_section_bottom == 1 && r.bottom > row.v1 + row.v2 ? row.v1 + row.v2 : r.bottom;
r.right = col.g(r.right);
s.right = n == 1 && r.right> col.v1 + col.v2 ?
s.right = n == 1 && r.right > col.v1 + col.v2 ? col.v1 + col.v2 : r.right;
}
Line 46 (?), Line 48 ending ( , LIne 50 (?), Line 51 ending ( are highlighted by theide(libclang) to indicate grammer errors.
|
|
|
Re: 2024rc1 [message #60965 is a reply to message #60963] |
Mon, 14 October 2024 16:42   |
 |
mirek
Messages: 14255 Registered: November 2005
|
Ultimate Member |
|
|
Lance wrote on Mon, 14 October 2024 16:23mirek wrote on Mon, 14 October 2024 10:13Lance wrote on Sat, 12 October 2024 20:20Code Reformat Issue.
I have been having issues with it for a while. Today I spend a few hours to create a almost mininal example.
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
class S{
void Set ( Size& sz,
int x, int y, int z,
int x1, int y1, int z1
);
const S& f(Rect& r, Rect& s)const;
struct D
{
int s(int rc)const
{
return rc*2;
}
int e(int rc)const
{
return rc*1;
}
int w(int rc)const
{
return rc*3;
}
int t()const
{
return 4;
}
int g(int k)const
{
return k;
}
void alloc();
void alloc(int a);
int v1;
int v2;
};
D col,row;
};
void S::D::alloc ()
{
}
static void func ( int& x, int& y, int& x1, int& y1, int x2, int y2,
int x3, int y3, int x4, int y4
)
{
}
const S& S::f(Rect& r, Rect& s)const
{
int t, l, row_section_bottom, n;
r.top = row.g(r.top);
s.top = t !=0 && r.top<row.v1 ? row.v1 : r.top;
r.left = col.g(r.left);
s.left = l != 0 && r.left< col.v1 ? col.v1 : r.left;
r.bottom = row.g(r.bottom);
s.bottom = row_section_bottom == 1 && r.bottom > row.v1 + row.v2 ?
row.v1+row.v2 : r.bottom;
r.right = col.g(r.right);
s.right = n == 1 && r.right> col.v1 + col.v2 ?
col.v1+col.v2 : r.right;
return *this;
}
Add the code as a separate cpp file in a CtrlLib application, with it current, press Ctrl+I to reformat it. The file before reformat compiles fine, not the reformatted one.
Works for me in windows and works in Ubuntu. Unfortunately, this feature is now using clang-format that can be different per distro...
Would be nice to give me a hint which host platform is in use...
Also, if nothing helps, please post reformatted text as well.
Mirek
Operation System: Ubuntu 24.04.1 LTS
GNOME version: 46
Windowing System: Wayland
clang-format --version: Ubuntu clang-format version 18.1.3 (1ubuntu1)
Reformatted output
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
class S {
void Set(Size& sz, int x, int y, int z, int x1, int y1, int z1);
const S& f(Rect& r, Rect& s) const;
struct D {
int s(int rc) const { return rc * 2; }
int e(int rc) const { return rc * 1; }
int w(int rc) const { return rc * 3; }
int t() const { return 4; }
int g(int k) const { return k; }
void alloc();
void alloc(int a);
int v1;
int v2;
};
D col, row;
};
void S::D::alloc() {}
static void func(int& x, int& y, int& x1, int& y1, int x2, int y2, int x3, int y3, int x4,
int y4)
{
}
const S& S::f(Rect& r, Rect& s) const
{
int t, l, row_section_bottom, n;
r.top = row.g(r.top);
s.top = t != 0 && r.top < row.v1 ? row.v1 : r.top;
r.left = col.g(r.left);
s.left = l != 0 && r.left< col.v1 ? col.v1 : r.left;
s.left = l != 0 && r.left < col.v1 ? col.v1 : r.left;
r.bottom = row.g(r.bottom);
s.bottom = row_section_bottom == 1 && r.bottom > row.v1 + row.v2 ?
s.bottom =
row_section_bottom == 1 && r.bottom > row.v1 + row.v2 ? row.v1 + row.v2 : r.bottom;
r.right = col.g(r.right);
s.right = n == 1 && r.right> col.v1 + col.v2 ?
s.right = n == 1 && r.right > col.v1 + col.v2 ? col.v1 + col.v2 : r.right;
}
Line 46 (?), Line 48 ending ( , LIne 50 (?), Line 51 ending ( are highlighted by theide(libclang) to indicate grammer errors.
It must be some specific clang format setting that I am unable to reproduce. Can you give me some hints? E.g. screenshot of "format with options" window and/or .clang-format file? (It is listed in that dialog).
|
|
|
|
|
Re: 2024rc1 [message #60969 is a reply to message #60966] |
Tue, 15 October 2024 07:40   |
 |
mirek
Messages: 14255 Registered: November 2005
|
Ultimate Member |
|
|
Lance wrote on Mon, 14 October 2024 17:09mirek wrote on Mon, 14 October 2024 10:17
Cannot reproduce.
Maybe if this could be done without using uppsrc sources and tpp, just in single package, maybe you can prepare for me "crashing package"?
Alternative, can you run it in debugger? 
Mirek
I wasn't able to reproduce it in a new, small project. I tried to abuse logs branch to create a n instance but couldn't.
Could you try to unzip the 3 tpp files that's changed and replace their namesakes in uppsrc/Draw/src.tpp folder?
Then somehow go to Draw/Draw.h, line 45, try to display a topic++ help window for "int64 data".
Thanks!
IDK, there is just 1 .tpp file in .zip (Draw_en-us.tpp) and it seems to be unchanged from the master...
|
|
|
Re: 2024rc1 [message #60971 is a reply to message #60963] |
Tue, 15 October 2024 13:31   |
 |
mirek
Messages: 14255 Registered: November 2005
|
Ultimate Member |
|
|
Lance wrote on Mon, 14 October 2024 16:23mirek wrote on Mon, 14 October 2024 10:13Lance wrote on Sat, 12 October 2024 20:20Code Reformat Issue.
I have been having issues with it for a while. Today I spend a few hours to create a almost mininal example.
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
class S{
void Set ( Size& sz,
int x, int y, int z,
int x1, int y1, int z1
);
const S& f(Rect& r, Rect& s)const;
struct D
{
int s(int rc)const
{
return rc*2;
}
int e(int rc)const
{
return rc*1;
}
int w(int rc)const
{
return rc*3;
}
int t()const
{
return 4;
}
int g(int k)const
{
return k;
}
void alloc();
void alloc(int a);
int v1;
int v2;
};
D col,row;
};
void S::D::alloc ()
{
}
static void func ( int& x, int& y, int& x1, int& y1, int x2, int y2,
int x3, int y3, int x4, int y4
)
{
}
const S& S::f(Rect& r, Rect& s)const
{
int t, l, row_section_bottom, n;
r.top = row.g(r.top);
s.top = t !=0 && r.top<row.v1 ? row.v1 : r.top;
r.left = col.g(r.left);
s.left = l != 0 && r.left< col.v1 ? col.v1 : r.left;
r.bottom = row.g(r.bottom);
s.bottom = row_section_bottom == 1 && r.bottom > row.v1 + row.v2 ?
row.v1+row.v2 : r.bottom;
r.right = col.g(r.right);
s.right = n == 1 && r.right> col.v1 + col.v2 ?
col.v1+col.v2 : r.right;
return *this;
}
Add the code as a separate cpp file in a CtrlLib application, with it current, press Ctrl+I to reformat it. The file before reformat compiles fine, not the reformatted one.
Works for me in windows and works in Ubuntu. Unfortunately, this feature is now using clang-format that can be different per distro...
Would be nice to give me a hint which host platform is in use...
Also, if nothing helps, please post reformatted text as well.
Mirek
Operation System: Ubuntu 24.04.1 LTS
GNOME version: 46
Windowing System: Wayland
clang-format --version: Ubuntu clang-format version 18.1.3 (1ubuntu1)
Reformatted output
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
class S {
void Set(Size& sz, int x, int y, int z, int x1, int y1, int z1);
const S& f(Rect& r, Rect& s) const;
struct D {
int s(int rc) const { return rc * 2; }
int e(int rc) const { return rc * 1; }
int w(int rc) const { return rc * 3; }
int t() const { return 4; }
int g(int k) const { return k; }
void alloc();
void alloc(int a);
int v1;
int v2;
};
D col, row;
};
void S::D::alloc() {}
static void func(int& x, int& y, int& x1, int& y1, int x2, int y2, int x3, int y3, int x4,
int y4)
{
}
const S& S::f(Rect& r, Rect& s) const
{
int t, l, row_section_bottom, n;
r.top = row.g(r.top);
s.top = t != 0 && r.top < row.v1 ? row.v1 : r.top;
r.left = col.g(r.left);
s.left = l != 0 && r.left< col.v1 ? col.v1 : r.left;
s.left = l != 0 && r.left < col.v1 ? col.v1 : r.left;
r.bottom = row.g(r.bottom);
s.bottom = row_section_bottom == 1 && r.bottom > row.v1 + row.v2 ?
s.bottom =
row_section_bottom == 1 && r.bottom > row.v1 + row.v2 ? row.v1 + row.v2 : r.bottom;
r.right = col.g(r.right);
s.right = n == 1 && r.right> col.v1 + col.v2 ?
s.right = n == 1 && r.right > col.v1 + col.v2 ? col.v1 + col.v2 : r.right;
}
Line 46 (?), Line 48 ending ( , LIne 50 (?), Line 51 ending ( are highlighted by theide(libclang) to indicate grammer errors.
OK, after a bit of thinking I have added some more code to logs branch
https://github.com/ultimatepp/ultimatepp/commit/04c14131cc46 99800ca6fa74421858c26cf3eb43
Can you reproduce the problem and send me those files?
Mirek
|
|
|
Re: 2024rc1 [message #60972 is a reply to message #60971] |
Tue, 15 October 2024 15:18   |
Lance
Messages: 656 Registered: March 2007
|
Contributor |
|
|
mirek wrote on Tue, 15 October 2024 01:40
IDK, there is just 1 .tpp file in .zip (Draw_en-us.tpp) and it seems to be unchanged from the master...
Sorry my bad. Please try this one instead.
-
Attachment: tpps.zip
(Size: 6.64KB, Downloaded 77 times)
[Updated on: Wed, 16 October 2024 00:06] Report message to a moderator
|
|
|
|
|
|
|
|
Re: 2024rc1 [message #61030 is a reply to message #61005] |
Mon, 21 October 2024 02:11   |
Lance
Messages: 656 Registered: March 2007
|
Contributor |
|
|
Lance wrote on Thu, 17 October 2024 15:01
BTW, now the master branch also need the DEBUGCODE flag to compile (in release mode) because of code like these
void CodeEditor::Paint(Draw& w)
{
DLOG(Format("====at %` ==========", GetSysTime()));
DDUMP(GetScreenView());
DDUMP(GetScreenRect());
That's a misinformation. My local copy got screwed up. I have recreated it. That may mean the subseqent freeze reports might be faulty. I have recompiled logs/ide, and started testing. Sorry for possibly unnecessary frustrations it might have caused.
BTW, I have encounter this code in CtrlLib/EditField.cpp line 151
int EditField::GetTextCx(const wchar *txt, int n, bool password, Font fnt) const
{
if(password)
return n * font['*'];
const wchar *s = txt;
int x = 0;
while(n--)
x += GetCharWidth(*s++);
return x;
}
Is the passed in parameter fnt supposed to be there? Was this function originally intended to be static and using passed in Font to do calculation istead?
[Updated on: Mon, 21 October 2024 02:12] Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Fri Apr 25 19:10:33 CEST 2025
Total time taken to generate the page: 0.00779 seconds
|