Slider top incorrect opening older projects in 2022.32

Edited: using MP2013 running BigSur 11.7.3.

I usually code with API1, and save with Xojo 2021r2.1 and build the apps with 2022r3.2.
So if in 2021r2.1 I position a slider, for instance, at top 45, when I open the same project with 2022r3.2, the slider’s top is 48 and so I have change it to 45. Same issue with vertical sliders, if their left was 67, it must be now put to 64 (of course, I take care of it in 2021r2.1 with #if XojoVersion >= etc.)

Is this a known isuue?
Bulding the same app for Windows, the top remains OK at 45.
It seems I’d forget using 2022.32. Right?

By the way, I even tried putting in the open event of any slider the following declare found on the forum:
Declare Sub sizeToFit Lib “AppKit” Selector “sizeToFit” ( obj as Ptr )

but running the debugger I get: “parameter “obj” expects tpe Ptr, but this is type integer”.


Regarding the declare, you’ll need to change that line to:

Declare Sub sizeToFit Lib “AppKit” Selector “sizeToFit” ( obj as Integer )

Handles on the new controls are Ptr whereas on the old ones, they were Integer.

As far as the positioning goes, when you open your project and then run it, is the slider in the wrong place? If so, it’s a bug, if not, chances are they fixed something in the framework that needed a position adjustment.

Remember most users only move forward in the version of Xojo they use for their projects. It’s actually a really good idea not to update a project until you’ve reached some sort of major milestone when you have time to do more extensive testing because things do change. Most noticeably, the macOS SDK version change every year means that sometimes controls do move around a little because of underlying system changes.

Thank you, Greg, for answering.
I’ll try the Declare and see what happens.

Yes, running and building the apps the sliders are in the wrong place. But since my license expired a couple of months ago I cannot file a bug-issue.

Yep, therefore I’ll keep coding and building in 2022r2.1.

Using the declare the positioning improves, but it still needs top = top - 1 (before the declare) for the slider to position itself in its right place; while without the declare, top had to be set as: top = top - 3.