Going fullscreen doesn't trigger resizeStack

If you find an issue in LiveCode but are having difficulty pinning down a reliable recipe or want to sanity-check your findings with others, this is the place.

Please have one thread per issue, and try to summarize the issue concisely in the thread title so others can find related issues here.

Moderator: Klaus

stam
Posts: 3069
Joined: Sun Jun 04, 2006 9:39 pm

Re: Going fullscreen doesn't trigger resizeStack

Post by stam » Thu Feb 10, 2022 9:14 am

Hi Bernd,
*** edit ***

Thanks Bernd that did work after all!
At first i misread your code and put 'if mouse is down' instead of 'if mouse is not down'

Out of curiosity I also tried 'wait xx milliseconds with messages' but that didn't work - only your recommendation works.
Is there a sane reason for this? Or is it a bug?

Stam
Last edited by stam on Thu Feb 10, 2022 9:31 am, edited 1 time in total.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10094
Joined: Fri Feb 19, 2010 10:17 am

Re: Going fullscreen doesn't trigger resizeStack

Post by richmond62 » Thu Feb 10, 2022 9:27 am

Over "here" on MacOS 12.3 beta 2 . . .

-
SShot 2022-02-10 at 10.25.23.png
-
SShot 2022-02-10 at 10.25.51.png
SShot 2022-02-10 at 10.25.51.png (11.69 KiB) Viewed 2501 times
-
Is the fontSize meant to get SMALLER as the field gets bigger?

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4171
Joined: Sun Jan 07, 2007 9:12 pm

Re: Going fullscreen doesn't trigger resizeStack

Post by bn » Thu Feb 10, 2022 9:29 am

stam wrote:
Thu Feb 10, 2022 9:14 am
Hi Bernd,

thank you for the suggestion, but no, that does nothing.
In truth, I didn't really expect it to, as dragging the borders (i.e. mouseStillDown) has always worked fine.
It's only when i click on the OS's button to make the window full screen that this fails...

Does the attached stack work for you then? If so, what OS are you on?

Grateful for any other suggestions!
Stam
Your original stack did not work for me when clicking on the OS's button.

However the attached stack does work for me for all use cases I tested: clicking the OS's button, double-clicking on the title bar of the stack and manual resizing.

I am using MacOS 12.2 (Monterey)

Kind regards
Bernd
Attachments
dynamicTextResizeInTime.livecode.zip
(3 KiB) Downloaded 43 times

stam
Posts: 3069
Joined: Sun Jun 04, 2006 9:39 pm

Re: Going fullscreen doesn't trigger resizeStack

Post by stam » Thu Feb 10, 2022 9:33 am

gosh you guys are quick

I edited my post above as i realised i mistyped your advice. Actually following your advice does work.

The question is - is this expected behaviour or a bug?

stam
Posts: 3069
Joined: Sun Jun 04, 2006 9:39 pm

Re: Going fullscreen doesn't trigger resizeStack

Post by stam » Thu Feb 10, 2022 9:35 am

richmond62 wrote:
Thu Feb 10, 2022 9:27 am
Is the fontSize meant to get SMALLER as the field gets bigger?
No Richmond, the opposite.
Not quite sure what use case there would be for making the text smaller as the field gets bigger in size!!

Try the stack shared above (dynamicTextResize.livecode)
Stam

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4171
Joined: Sun Jan 07, 2007 9:12 pm

Re: Going fullscreen doesn't trigger resizeStack

Post by bn » Thu Feb 10, 2022 9:42 am

stam wrote:
Thu Feb 10, 2022 9:33 am
gosh you guys are quick

I edited my post above as i realised i mistyped your advice. Actually following your advice does work.

The question is - is this expected behaviour or a bug?
I vote for expected behavior.
The rationale being that when I click the OS's green button I get two resizeStack messages. One intermediate and one final.
However the resizeStack handler sends the "dynamicTextResize" before it passes the resizeStack message. Passing the resizeStack message triggers the Geometry Manager. That leads me to conclude that the size of the field is not yet adjusted to the final size and the dynamicTextResize handler reacts to its current (not yet adjusted) size. Sending in time lets you get "behind" the Geometry Manager.

Kind regards
Bernd

stam
Posts: 3069
Joined: Sun Jun 04, 2006 9:39 pm

Re: Going fullscreen doesn't trigger resizeStack

Post by stam » Thu Feb 10, 2022 9:56 am

bn wrote:
Thu Feb 10, 2022 9:42 am
I vote for expected behavior.
...
However the resizeStack handler sends the "dynamicTextResize" before it passes the resizeStack message.
...
Thanks Bernd - the slight inconsistency with that (as i perceive it) is the other way of resizing the stack without the mouse being down.

If i double-click the titlebar the window will enlarge to fill the screen and again if the titlebar is double-clicked it will return to it's previous size.

The the older resizeStack handler this worked fine -- does that tally with your views above?

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10094
Joined: Fri Feb 19, 2010 10:17 am

Re: Going fullscreen doesn't trigger resizeStack

Post by richmond62 » Thu Feb 10, 2022 10:14 am

However the resizeStack handler sends the "dynamicTextResize" before it passes the resizeStack message.
Well, erm, yes: with your stack Stam, on resizing the stack so it got larger the text got bigger
and then 'popped back' to a smaller size.
gosh you guys are quick
Not "that" quick as teaching teenagers English right now.

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4171
Joined: Sun Jan 07, 2007 9:12 pm

Re: Going fullscreen doesn't trigger resizeStack

Post by bn » Thu Feb 10, 2022 10:15 am

stam wrote:
Thu Feb 10, 2022 9:56 am

Thanks Bernd - the slight inconsistency with that (as i perceive it) is the other way of resizing the stack without the mouse being down.

If i double-click the titlebar the window will enlarge to fill the screen and again if the titlebar is double-clicked it will return to it's previous size.

The the older resizeStack handler this worked fine -- does that tally with your views above?
If you click the titlebar you get a flurry (5 to 6) resizeStack messages, however clicking the OS's green button you only get two resizeStack messages, the first one the original width/height the second the final width/height. That fits with my views above.
What I can not explain is that manual resizing of the stack fails if I use "in time".

Kind regards
Bernd

PS The story you describe has a cliff-hanger, waiting for the sequel... (You might want to change distolic to diastolic though) :wink:

stam
Posts: 3069
Joined: Sun Jun 04, 2006 9:39 pm

Re: Going fullscreen doesn't trigger resizeStack

Post by stam » Thu Feb 10, 2022 10:23 am

bn wrote:
Thu Feb 10, 2022 10:15 am
PS The story you describe has a cliff-hanger, waiting for the sequel... (You might want to change distolic to diastolic though) :wink:
The text is quoted as is from the referral received... i'll pass that on to my colleagues lol ;)
I guess this is how we as doctors have moved from illegible handwriting to illegible typewriting :D :D :D

stam
Posts: 3069
Joined: Sun Jun 04, 2006 9:39 pm

Re: Going fullscreen doesn't trigger resizeStack

Post by stam » Thu Feb 10, 2022 4:10 pm

bn wrote:
Thu Feb 10, 2022 9:42 am
I vote for expected behavior.
Hi Bernd,

I get what you're saying but from the user's point of view this still seems inconsistent - so while it's 'explainable' i probably wouldn't consider this intended behaviour - from the user's point of view, if you resize the stack (no matter how it's resized) the resizeStack handler should respond consistently...

Thank you so much for figuring out the workaround though!!
Stam

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10094
Joined: Fri Feb 19, 2010 10:17 am

Re: Going fullscreen doesn't trigger resizeStack

Post by richmond62 » Thu Feb 10, 2022 4:30 pm

user's point of view this still seems inconsistent
Err . . . I don't look forward to explaining that to an 11 year old.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7390
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Going fullscreen doesn't trigger resizeStack

Post by jacque » Thu Feb 10, 2022 7:07 pm

stam wrote:
Thu Feb 10, 2022 10:23 am
I guess this is how we as doctors have moved from illegible handwriting to illegible typewriting :D :D :D
My husband says that you can't graduate from med school if they can still read your handwriting.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4171
Joined: Sun Jan 07, 2007 9:12 pm

Re: Going fullscreen doesn't trigger resizeStack

Post by bn » Thu Feb 10, 2022 7:15 pm

stam wrote:
Thu Feb 10, 2022 4:10 pm

Hi Bernd,
I get what you're saying but from the user's point of view this still seems inconsistent - so while it's 'explainable' i probably wouldn't consider this intended behaviour - from the user's point of view, if you resize the stack (no matter how it's resized) the resizeStack handler should respond consistently...

Thank you so much for figuring out the workaround though!!
Stam
Please note that the resizeStack handler does exactly what you would expect. It is the Geometry Manager that changes the dimensions of the field _after_ you adjust the textSize for the field. Hence the problems.

And I think that Richmond would find a way of explaining that to an 11 year old. "You can not get the cookies unless you open the box first" maybe?

Kind regards
Bernd

stam
Posts: 3069
Joined: Sun Jun 04, 2006 9:39 pm

Re: Going fullscreen doesn't trigger resizeStack

Post by stam » Thu Feb 10, 2022 7:47 pm

bn wrote:
Thu Feb 10, 2022 7:15 pm
Please note that the resizeStack handler does exactly what you would expect. It is the Geometry Manager that changes the dimensions of the field _after_ you adjust the textSize for the field. Hence the problems.
Dear Bernd,
I'll have to respectfully disagree - i can only 'expect' this if i know this is happening.
I understand your explanations - but nowhere in the documentation is this mentioned (and it should be if indeed this is the desired - not expected - behaviour, so this is at the very least a documentation bug).

It is inconsistent in my view (as an intermediate user, very far from as experienced as you!) - dragging the stack border works, double clicking the title bar works but clicking the full screen button doesn't.

The argument that the GM changes the field size after i change the text size doesn't really stand on it's own - if that was the case, it wouldn't work when manually resizing the stack or double-clicking the titlebar. It may be related to how many messages are sent - but again that would have required inspired guesswork on my part and wouldn't have been able to figure it out without input from this great forum...

This is a specific issue with going full screen (at least on mac) - i'll keep this in mind going forward, but really this should be at least commented on in the resizeStack documentation (as far as i can see, it's not and neither is there any mention of this in the GM related documentation...).

Anyway, thank you once again for your invaluable help,
Stam

Post Reply