Window decorations and the effective rect issue

Scott Rossi scott at tactilemedia.com
Wed Sep 9 14:47:45 EDT 2015


Thanks Paul, good to know.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX/UI Design




On 9/9/15, 11:43 AM, "Paul Dupuis" <paul at researchware.com> wrote:

>Scott,
>
>See the dictionary entry for "rectangle". There is a specific note that,
>as of LC6, the effective rect of a stack includes its decorations and
>window borders and is also settable. IMHO it was one of the best new
>features of LC6+. What I did nto realize, but discovered this week was
>that you can also get and set the effective topLeft, top, height, width,
>left, bottom, etc. etc, of a stack and the value will factor in the
>window decorations and borders. It is really handy!
>
>set the height of stack "X" to tSomevalue -- based on its contents i.e.
>it's inside dimensions
>get the effective height of stack "X" -- will now tell you the resulting
>outside dimensions after adjusting for the inside change!
>OR Vice Versa
>set the effective height of stack "X" to tSomevalue -- set the stack's
>outside height
>get the height of stack "X" -- will now tell you the resulting inside
>height you have to work with!
>
>
>On 9/9/2015 2:19 PM, Scott Rossi wrote:
>> Dumb comment/question on my part: I always thought the effective keyword
>> was for reading only -- didn't think it was settable.  From the docs:
>>
>> The effective keyword is implemented internally as a property and
>>appears
>> in the propertyNames. However, it cannot be used as a prop in an
>> expression, nor with the set com.
>>
>>
>> (Guessing that last word was supposed to be "command").
>>
>> Is there something that says explicitly you can set the "effective"
>> property of anything?
>>
>> Regards,
>>
>> Scott Rossi
>> Creative Director
>> Tactile Media, UX/UI Design
>>
>>
>>
>>
>> On 9/9/15, 11:11 AM, "Paul Dupuis" <paul at researchware.com> wrote:
>>
>>> I have an application (main stack + many substacks + several external
>>> stacks) that is ancient (originally built in HyperCard, ported to
>>> Supercard, ported to Metacard, and on up to LiveCode 6.7.6.
>>>
>>> I was working on redoing some of the legacy screen layout code today -
>>> taking advantage of 'the working screenrect' (working didn't exist way
>>> back when) and 'the effective rect' of a stack (effective wasn't
>>> available either)
>>> A multi-window layout should now be as easy as get the working
>>> screenrect and divide it up and set the effective rect of the stacks
>>> (windows) to the divided up values. No more fudge factors for varying
>>>OS
>>> window borders and title bars and such. Yea!
>>>
>>> However, I have run into a puzzler. Under Windows 8 (and Win 7) when I
>>> set the effective rect of a stack to 0,0,x,y or set the effective
>>> topLeft of a stack to 0,0, that stack is NOT taking into account the
>>> wider window borders of Windows 7 and 8 and is positioning the stack
>>> with part of its borders off screen - it is like the stack thinks it's
>>> window borders were the thinner ones back under Windows 2000 or XP!
>>>
>>> This only occur with old stacks in the application - i.e. stacks
>>> originally migrated from HyperCard > SuperCard > Metacard >Revolution.
>>> If I create a new "Untitled 1" substack in the old legacy mainstack and
>>> set it's effective topLeft to 0,0, it renders exactly as expected.
>>>
>>> I tried cloning (as in "clone stack <name>" one of the legacy stacks
>>>and
>>> it also thinks it has thinner window borders that it really does.
>>>
>>> All these stacks have been saved from LC676 in the latest stack format
>>> (the were previously in LC464). I created a new test mainstak and
>>> substack in LC676 and the effective keyword works exactly as expected
>>> with stacks. I also created an identical test stack under LC464 (the
>>> oldest version I have) and the tried that under LC676 and it works
>>> exactly as expected.
>>>
>>> I just appears to be really ancient stacks that have been
>>> imported/migrated rather than any new stacks. Has anyone seen anything
>>> like this?
>>>
>>> I'd rather not have to recreate each of these legacy stack by creating
>>>a
>>> new "Untitled" stack and populating all the objects, scripts,
>>> properties, etc, to fix this issue.
>>>
>>> Paul Dupuis
>>> Researchware
>>>
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>>subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>
>_______________________________________________
>use-livecode mailing list
>use-livecode at lists.runrev.com
>Please visit this url to subscribe, unsubscribe and manage your
>subscription preferences:
>http://lists.runrev.com/mailman/listinfo/use-livecode






More information about the use-livecode mailing list