Paladin C++ IDE feedback

Probably due to the recent interface fixes for the HiDPI displays. Currently there are no maintainers if I’m correct.

This bug is there long before these changes. IIRC, it’s due to the view not being attached to the BScrollView. It’s easy to fix but no one did create a PR (ok I admit I could have done it, too. My bad)

4 Likes

Adam @adamfowleruk is a maintainer, however he is toop busy to work on Paladin right now!
Other devs have to step in to fix this annoying old bug!

We may move it to HaikuArchives…

3 Likes

A workaround is to resize and move window using ctrl+alt+either right and left click drag
Very inconviniant but works…

Looking into a copy of Paladin in my Developer folder, I have found out that I fixed this problem by commenting out two lines in LibWindow.cpp:

//#ifdef B_SCROLL_VIEW_AWARE
		| B_SCROLL_VIEW_AWARE
//#endif

The ifdef/endif pair checks if there is a B_SCROLL_VIEW_AWARE macro but it’s not able to find it as it is instead defined as:

const uint32 B_SCROLL_VIEW_AWARE = 0x00200000UL; /* 21 */

in headers/os/interface/View.h.
Failing to do so, the flag B_SCROLL_VIEW_AWARE is never added to the BView at compile time.
B_SCROLL_VIEW_AWARE was introduced in Feb 2019 but I can’t tell if it was a macro before, tbh.

I think it’s fairly simple to locally fix it even for non-developers.
Until we know that @adamfowleruk has time to review and approve PRs or he wants to move Paladin to HaikuArchives.

2 Likes

Thanks for the responses. I changed the lines as indicated by Nexus-6 however compiling the source fails in AsciiWindow.cpp with an “asprintf” not defined error. My research indicates this should be defined in stdio.h but it was not in that file on my Haiku install. (I am using the latest R4 beta). I found the code for asprintf but not sure whether to write another header with just this function to include with the Paladin sources - any advice welcome. I may be working beyond my depth!
The alt-control click worked once Ifigured that you meant I needed to move the window up(nearly off the screen) and then resize down. This is cumbersome but certainly did work and if I only have to do this once or twice is quite usable.

I’m not sure why asprintf is not found in the usual stdio.h location but you can format using a BString::SetToFormat instead without the headaches associated with asprintf.

https://www.haiku-os.org/docs/api/classBString.html#a41beabb582880a92965c632662c46fe7

I’m not in front of my PC but if I remember correctly, asprintf is a GNU extension and may be provided by gnulib. Please install it via HaikuDepot and check if that works.

The libraries scrolling bug seems have been introduced when we switched to using dynamically sized scroll bars and Paladin needs to be updated to use the new code (for some reason.) The bug has been there for a while now.

Are you sure this is the root cause? The bug itself is fixed by removing the #ifdef around B_SCROLL_VIEW_AWARE and it doesn’t seem to be related to the scroll bar.
Definitely the #ifdef should not be there, at all.

The bug may be fixed by removing the #ifdef B_SCROLL_VIEW_AWARE but only because it was defined in hrev52835 and the checklist view is not aware of the scroll view.

No, it is part of glibc and also available in Haiku. Probably something is wrong with include paths or with usage of features.h (maybe _DEFAULT_SOURCE should be defined to enable it for example).

Just for the record, I was able to get it working with

#define _GNU_SOURCE

in AsciiWindow.cpp.

So I was able to clone the lastest commit from the develop branch of Paladin and got it running on Haiku R4 with only a few tweaks.

I’m following Haiku for a while and was always a fan of Paladin and DarkWyrm’s C++ Lessons for Haiku. I think these plus Paladin are a very attractive way to get people interested in contributing to Haiku and - perhaps - learn C++ and contribute to some projects (as it was the case for me).

I know that there are now more upcoming IDEs for Haiku than perhaps active developers, despite that I would really love to see Paladin to live on and get some attention. It is not an IDE for advanced coders but it is a tool that makes developing Haiku Apps extremly accessible. And if it is only for its built-in build system so nobody has to learn cmake to get things running.

I would love to volunteer and tackle some issues if there is a way to contribute to the code repository. So perhaps @adamfowleruk could you make a statements about the state of Paladin and if you might want to open the repo up for some new contributors?

8 Likes

Adam is not the only maintainer of it, just the last person to actively work on it. Just send your changes as pull requests to the Paladin repository at github.com/haikuarchives and we’ll find someone to review and merge them.

And if you work enough on it you may get direct commit access just like Adam did :smiley:

7 Likes

Well, that’s good to know, thanks!

2 Likes

Hmm, ”This branch is 142 commits behind adamfowleruk:master” though? (seems to be at 1.3.x while his is 2.0.x)

EDIT: …which in turn is ”8 commits ahead, 18 commits behind” his develop branch.

1 Like

It’s not very hard to push Adam’s work back into haikuarchives. I will do it when I have some time.

3 Likes

I already have a few commits ready in the develop branch and wait for @PulkoMandy to update the haikuarchives branch.

3 Likes