the effective width of a stack?

Paul Dupuis paul at researchware.com
Wed Aug 17 17:52:08 EDT 2022


On 8/17/2022 1:38 PM, Paul Dupuis via use-livecode wrote:
> I can across some old code where I an referring to
>
> if (the effective width of stack X > someValue) then
>
> This code produces no errors and works. However, I was just trying to 
> look up 'effective width' to see exactly what it was doing in the 
> Livecode 9.6.8 Dictionary and struck out!
>
> Under the 'effective' entry in the 9.6.8 Dictionary, 'width' is not 
> listed as an inherited property that 'effective' can be used with. 
> Under 'width' it is not listed. If I look at the entry to the 'stack' 
> object, I find 'width' but that just takes me to the entry for 'width'
>
> Am I imagining something, OR is there such a thing as 'effective 
> width' and if so, where the heck is it documented?
>
> PS. I thought the width of a stack (or window) vs the effective width 
> was teh difference between the inner dimensions of the stack (the card 
> size) and the size  of the stack with borders and titlebar (outer 
> dimensions). I forget which is which and, again, can not find it 
> documented! Also, I thought that contrary to the Dictionary entry to 
> the 'effective' keyword, you could SET the 'effective width' of a 
> stack/window to change the size of the outer dimensions(?)
>
> I'd appreciate any pointers to where effective width or effective 
> height of a stack is documented.

So testing shows that (in LC 9.6.8 at any rate) the following STACK 
properties can use the effective keyword:
height
width
rect (or rectangle)
left
right
top
bottom
topLeft
topRight
bottomLeft
bottomRight

and, indeed, the different between the property and the effective 
property is the property (inside dimensions) and effective property 
(outside dimensions)

The "effective" keyword is ONLY documented with the rect/rectangle 
property in the Dictionary and not for any other dimensional properties, 
even though they work as expected (well except for Window 10: 
https://quality.livecode.com/show_bug.cgi?id=16305)

It also appears (from testing) that you can set the effective rect (as 
documented in the rect Dictionary entry) and set the effective width or 
the effective height (not documented in the Dictionary). I have not yet 
tried setting the "effective" form of the remaining dimensional 
properties (top, left, topLeft, etc.)




More information about the use-livecode mailing list