resizeStack msg behaves opposite to dictionary

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
Ed_Ray
Posts: 83
Joined: Sun Jun 19, 2016 12:18 am

resizeStack msg behaves opposite to dictionary

Post by Ed_Ray » Tue Apr 11, 2017 10:30 am

I guess this would be in line to the moveStack message behavior discussed in post "Detect the END of a stack move not that it’s moving" with the following exceptions.

All the dictionaries from LC ver 7 all the way up to the last ver 9 dictionary clearly state:
"The resizeStack message is sent AFTER the resizing is FINISHED. This means that you CANNOT prevent a stack's size from being changed by TRAPPING this message".

Unfortunately other than a few win 7 cases, all other ver of win, mac and linux send the message DURING the resizing NOT at the end of the resizing function.

So can we assume this a dictionary goof and if so, we would need to do something similar to what we did with the moveStack issue in order to execute functionality at the end of the resizing right?

I ran into this too recently since my "resizeStack" functionality related to the moveStack issue also executes functionality at the end of the resizing not during the function.

One last question. If in fact the behavior of the resizeStack message coincides with the moveStack message in that it sends the message DURING the functionality NOT at the end then does this means for both cases (moveStack and Resizestack messages) that one can now prevent a move or a resizing by TRAPPING the messages?

Thanks

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: resizeStack msg behaves opposite to dictionary

Post by FourthWorld » Tue Apr 11, 2017 2:16 pm

If you see that the message is sent continuously and the Dictionary says it isn't, the Dictionary is using an older definition and should be updated. Please file a bug report on that.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Ed_Ray
Posts: 83
Joined: Sun Jun 19, 2016 12:18 am

Re: resizeStack msg behaves opposite to dictionary

Post by Ed_Ray » Tue Apr 18, 2017 8:56 am

Thanks for the reply.
I will file this one and a couple more I have into bug reports this week.

Regarding my last question:
"If in fact the behavior of the resizeStack message coincides with the moveStack message in that it sends the message DURING the functionality NOT at the end then does this means for both cases (moveStack and Resizestack messages) that one can now prevent a move or a resizing by TRAPPING the messages?"

Is the answer affirmative on the message trapping?
Can you provide an example of trapping one of these messages in a manner that would be considered an efficient way of doing this?

Thanks.

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

Re: resizeStack msg behaves opposite to dictionary

Post by jacque » Wed Apr 19, 2017 5:01 am

You can't trap resizeStack to stop the change in size, the message is just a response to an OS event. The same is true for moveStack, the message is a notification and not a command under script control.

It used to be we could set the liveResizing property (at least in OS X) to control whether continuous messages were sent, or only one at the end. OS X stopped supporting that and the property was deprecated since no OS supports the option any more. The dictionary entry for resizeStack was apparently not updated when the property was deprecated, so it's a documentation bug.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply