Comments on 0.99

Updates on the progress of this project
User avatar
richmond62
Posts: 2776
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Comments on 0.99

Post by richmond62 »

Watch this space: just trying to get 0.99 going on MacOS 12 Monterey.

1. Version number: OXTLITE . . . very clever indeed.

2. On MacOS 12 opened straightaway: no mess, no stress. 8-)

3. Started up far, far more quickly than 0.98.
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 2776
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Comments on 0.99

Post by richmond62 »

BUT . . . part of the windowBar is hidden by the Mac Menu (i.e. to near the top): MacOS Monterey.

Does the size of the Mac Menu bar depend on the MacOS version or on the model of the Macintosh computer you are using?

If it is the former a routine can run to work out how far from the top of the deskstop the thing should be.
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 2776
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Comments on 0.99

Post by richmond62 »

If OXT Lite launches WITHOUT the window bar showing it positions itself correctly below the Mac menu bar as I have seen on MacOS 12 and MacOS 14; so I would assume this should not be an arduous problem.

On MacOS 12, without the window bar the revMenubar stack has its vertical location at 46 (which is exactly right for the Mac menu bar on MacOS 12).

If one puts this into the messageBox:

Code: Select all

put the top of stack "revMenuBar"
one gets 23

WITH the window bar the revMenubar stack has its vertical location at 68 (which is wrong).

If one puts this into the messageBox:

Code: Select all

put the top of stack "revMenuBar"
one gets 45

Which is no good as the bigness of the Mac menu bar is NOT 22.

Opening the revmenubar.livecodescript file from inwith the OXT Lite 0.99 Mac bundle . . .

there is a line (#38) that runs:

Code: Select all

if the platform contains "mac" then set the top of wd "revMenuBar" to 22
1. That is silly as different versions of the MacOS have different heights to the Mac menu bar.

To be more precise we need to use both platform and systemVersion.

Admittedly systemVersion is a laugh-a-minute, as for MacOS 12 it returns 10.16, and as MacOS Catalina is numbered at 10.15, presumably MacOS 11 returns 10.15 and a half.
-
Screenshot 2024-01-20 at 15.57.45.png
Screenshot 2024-01-20 at 15.57.45.png (23.09 KiB) Viewed 1026 times
-
This has been sorted out "on the other side" in their 9.6.8 commercial version.

https://forums.livecode.com/viewtopic.p ... on#p226900
Attachments
Screenshot 2024-01-20 at 15.57.45.png
Screenshot 2024-01-20 at 15.57.45.png (23.09 KiB) Viewed 1027 times
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 2776
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Comments on 0.99

Post by richmond62 »

Here's a marvellous page: https://livecode.com/resources/support/bug/

"We take quality very seriously. If you are encountering an issue with LiveCode, we recommend submitting a bug report in our quality control center."

It is marvellous because there is NO link to the 'quality control center."

HOWEVER: having tracked down bug 22887 there is something useful there:
-
Screenshot 2024-01-20 at 16.19.33.png
Screenshot 2024-01-20 at 16.19.33.png (121.68 KiB) Viewed 1023 times
-
Because, even though there is no indication of how the systemVersion "Woz dun", there is something we can use in OXT to circumvent that:

Code: Select all

function mySystemVersion
   get shell("sw_vers -productVersion")
   return it
end mySystemVersion
-
Screenshot 2024-01-20 at 16.24.53.png
Screenshot 2024-01-20 at 16.24.53.png (126.74 KiB) Viewed 1023 times
-
So THIS can be used to decide how far down the screen the top (with or without a window bar) the revMenubar stack can be positioned on a Macintosh system.
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 2776
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Comments on 0.99

Post by richmond62 »

Of course, just to throw an enormous great spanner in the works:
-
Screenshot 2024-01-20 at 16.28.05.png
Screenshot 2024-01-20 at 16.28.05.png (86.94 KiB) Viewed 1022 times
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 2776
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Comments on 0.99

Post by richmond62 »

This (Swift) will give one the menu bar height:

Code: Select all

NSStatusBar.system.thickness
But HTFF one either turns that into xTalk or leverages it from inwith xTalk I just don't know.

Well, F*ck a Duck: ChatGPT has produced this:
-
Screenshot 2024-01-20 at 16.45.45.png
Screenshot 2024-01-20 at 16.45.45.png (242.5 KiB) Viewed 1019 times
-

Code: Select all

put the systemMetrics["menubar"] into menubarThickness
answer "Menubar Thickness: " & menubarThickness
I wonder if this will work?

Aaaaah: ChatGPT, despite what we have been led to believe, may be inventing xTalk as it goes:
-
Screenshot 2024-01-20 at 16.48.56.png
Screenshot 2024-01-20 at 16.48.56.png (47.6 KiB) Viewed 1019 times
-
No 'systemMetrics'.
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 2776
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Comments on 0.99

Post by richmond62 »

Should I laugh or should I cry?
-
Screenshot 2024-01-20 at 16.55.13.png
Screenshot 2024-01-20 at 16.55.13.png (214.12 KiB) Viewed 1018 times
-
Screenshot 2024-01-20 at 16.57.44.png
Screenshot 2024-01-20 at 16.57.44.png (160.54 KiB) Viewed 1017 times
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 2776
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Comments on 0.99

Post by richmond62 »

The problem with this:

Code: Select all

put item 4 of the screenRect - item 4 of the working screenRect
is that the working screenRect also takes into account the macOS Dock.

HOWEVER, by using hide menubar one should get the number one needs.
-
Screenshot 2024-01-20 at 17.15.28.png
Screenshot 2024-01-20 at 17.15.28.png (167.73 KiB) Viewed 1015 times
-
BLAST!

Obviously, the xTalk command hide menubar makes the menubar invisible to thee and me, it is still visible to OXT.

AND as hide menubar also hides the Dock it is NBG.
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 1538
Joined: Tue Dec 21, 2021 9:10 pm
Location: Britain (Previously known as Great Britain)
Contact:

Re: Comments on 0.99

Post by tperry2x »

We made a variable for this a while back:

Code: Select all

put tsystemversionnumber
You can use that for the correct version string.
22 is right for the menubar up to Catalina. Anything past that is variable.
That is why I asked if people could report the height of the window please to me on Big Sur and above.
https://www.openxtalk.org/forum/viewtop ... 5794#p5794

You can also always tweak it with the offsets provided already.
Screenshot at 2024-01-20 15-56-26.png
Screenshot at 2024-01-20 15-56-26.png (76.71 KiB) Viewed 1010 times
User avatar
richmond62
Posts: 2776
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Comments on 0.99

Post by richmond62 »

Well, I learnt one useful thing today: I'll never go to a robot barber in case it removes my testicles instead of my hair. 8-)
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 2776
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Comments on 0.99

Post by richmond62 »

Increasingly cheesed-off about having to supply 32 characters.
-
Screenshot 2024-01-20 at 18.44.53.png
Screenshot 2024-01-20 at 18.44.53.png (45.42 KiB) Viewed 1000 times
-
Groovy Baby!
-
OM.jpg
OM.jpg (248.9 KiB) Viewed 996 times
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 2776
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Comments on 0.99

Post by richmond62 »

There SHOULD be a way for a standalone or the IDE to automatically work out the height of the MacOS menu bar.

https://www.purebasic.fr/english/viewtopic.php?t=78832

"I have found that the Menu bar height is different on the Silicon machine (66) and the Intel machine (54). I need a way to tell which machine I'm on and adjust accordingly."

Free versions: https://www.purebasic.com/download.php

I wonder.
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 1538
Joined: Tue Dec 21, 2021 9:10 pm
Location: Britain (Previously known as Great Britain)
Contact:

Re: Comments on 0.99

Post by tperry2x »

I get the feeling I've opened a can of worms in making the revMenubar stack a standard window :lol:
User avatar
richmond62
Posts: 2776
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Comments on 0.99

Post by richmond62 »

Supposedly

Code: Select all

put item 2 of the working screenRect
should return the height of the MacOS menu bar, but it seems to be wrong.
https://richmondmathewson.owlstown.net/
User avatar
richmond62
Posts: 2776
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Comments on 0.99

Post by richmond62 »

https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 1538
Joined: Tue Dec 21, 2021 9:10 pm
Location: Britain (Previously known as Great Britain)
Contact:

Re: Comments on 0.99

Post by tperry2x »

Why, I wonder, is the immediate reaction 'over there' to question "Why you'd need this?" - because I asked for it, that's why. :roll:

Just a thought:

Code: Select all

put the bottom of group "toolbar" of stack "revMenubar"
Does this return the correct value?

I'm hoping it varies greatly on MacOS. Off to test now in 10.9 to 10.15

edit: better solution:

Code: Select all

set the bottom of stack "revmenubar" to the bottom of group "toolbar" of stack "revmenubar"
test 2: :?

Code: Select all

set the bottom of stack "revmenubar" to the bottom of group "toolbar" of stack "revmenubar" + the height of group "revmenubar" of stack "revmenubar" /2 +6
"Test 2" works on Catalina and Mavericks
User avatar
richmond62
Posts: 2776
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Comments on 0.99

Post by richmond62 »

Why, I wonder, is the immediate reaction 'over there' to question "Why you'd need this?"
Because they know what you know what I know that I am "probably" asking that sort of question for reasons to do with OXT, and that lot over there have coalesced into a core of apostles guarding the sacred flame, and preserving its purity, and feeling threatened by someone who is not impressed by that one little bit.

All my life I have really had a faceful of people endlessly asking me to justify any acts, pronouncements, decisions, or questions . . .

And I remember a lecturer in the Philosophy Department at Durham saying, when some other undergraduate asked WHY I had asked a leading question, "Because he's better than you are."

All those acolytes "over there" are far, far more skilled programmers than I am, or am ever likely to be (and that does not really fuss me), but they all seem to have extremely limited imaginations, and be extremely bad at asking the sort of questions that attract answers that have some value.
-
Screenshot 2024-01-20 at 21.40.23.png
Screenshot 2024-01-20 at 21.40.23.png (140.07 KiB) Viewed 945 times
-
Most of them are probably still stuck playing chess. 8-)

https://www.artofmanliness.com/characte ... 1e83197cac
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 1538
Joined: Tue Dec 21, 2021 9:10 pm
Location: Britain (Previously known as Great Britain)
Contact:

Re: Comments on 0.99

Post by tperry2x »

I'll continue to experiment with my code above.
Thinking about the state of the engine, and all the errors I'm finding in the IDE.

If organising chess was left to the folks over at LC, they would have left those half-finished too, while they question "why do you want a game of chess?"
half-finished.png
half-finished.png (524.38 KiB) Viewed 940 times
User avatar
tperry2x
Posts: 1538
Joined: Tue Dec 21, 2021 9:10 pm
Location: Britain (Previously known as Great Britain)
Contact:

Re: Comments on 0.99

Post by tperry2x »

Well, it's not pretty, but seems to work.

Code: Select all

if the platform contains "mac" then set the bottom of stack "revmenubar" to the bottom of group "toolbar" of stack "revmenubar" + the height of group "revmenubar" of stack "revmenubar" /2 +6
Can you test on anything higher than 10.15 please.
catalina-pos.png
catalina-pos.png (44.95 KiB) Viewed 936 times
mavericks-pos.png
mavericks-pos.png (34.89 KiB) Viewed 936 times
I might be barking up the wrong tree, (or just barking).
I see 'over there', they think the window titlebar height is always the same, which we know it isn't between MacOS versions.
We aren't using scalefactors either, so that's irrelevant.

As you know, and I see you've tried to make plainly clear to that lot, this is calculating the varying heights of the menubar due to differences in the OS. All they are doing is getting the height of the menubar and adding 28 to it - they are assuming that the window titlebar does not change height, which is incorrect.

using "item 2 of the working screenrect" is only effectively measuring the height of the mac menubar, and you can see it varies very slightly between Mavericks and Catalina (1px taller)
menubar-comparison.png
menubar-comparison.png (25.01 KiB) Viewed 921 times
Here's the output to show this (top one is linux, where it always measures it as 0 logically enough)
Middle is Mavericks,
Bottom pic is Catalina.
Screenshot_2024-01-20_20-30-04.png
Screenshot_2024-01-20_20-30-04.png (37.94 KiB) Viewed 921 times
That's great if you want the height of the menubar, but what we are actually after is the height of the menubar & height of the window titlebar combined, as you've rightly explained over there, and they've missed the point.

(In fact, if I wanted the height of the menubar, I'd probably do this:)

Code: Select all

put line (the screen of stack "revMenubar") of the working screenRects
You could chuck them a copy of the screenshot we discussed previously, to show how the window titlebars on MacOS have changed height over time.
https://www.openxtalk.org/forum/viewtop ... 5392#p5392

I might just use these heights as a best guess scenario, although they might not be pixel-perfect accuracy - and that's what I'm after positioning-wise on the revMenubar.

I'll keep on trying. (I'm very trying). :D
User avatar
tperry2x
Posts: 1538
Joined: Tue Dec 21, 2021 9:10 pm
Location: Britain (Previously known as Great Britain)
Contact:

Re: Comments on 0.99

Post by tperry2x »

Weird idea.
This will move the stack down repeatedly. Hold the mouse button down on the window to stop it moving when it reaches the position directly under the menubar. I'll then record a list of how large the menubar and titlebar for MacOS 11, MacOS 12, MacOS 13, and MacOS 14 is.

Does that sound like a working alternative approach?
Screen Shot 2024-01-20 at 14.30.06.png
Screen Shot 2024-01-20 at 14.30.06.png (51.28 KiB) Viewed 894 times
I'll then record these values:
Mac OS 10.9 Mavericks = 44px
Mac OS 10.10 > 10.15 = 45px
Mac OS 11 Big Sur = 52px
Mac OS 12 Monterey = ?
Mac OS 13 Ventura = ?
Mac OS 14 Sonoma = ?

edit 1: can confirm big sur is 52 px (Richmond did tell me this in all honesty)
big-sur-top.png
big-sur-top.png (28.96 KiB) Viewed 780 times
Attachments
window-pos-test.oxtstack
(12.44 KiB) Downloaded 66 times
Post Reply

Who is online

Users browsing this forum: No registered users and 25 guests