Learning from across they way #12

All flavors welcome.
Forum rules
Be kind.
Post Reply
User avatar
richmond62
Posts: 4594
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Learning from across they way #12

Post by richmond62 »

This is freaky-bizarre:

https://forums.livecode.com/viewtopic.p ... 0&start=15

the effective visible
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 3049
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Learning from across they way #12

Post by tperry2x »

Effective visible works, but effective visibility doesn't.
Haven't tried stuff in nested groups yet.
vis1.png
vis1.png (30.31 KiB) Viewed 1536 times
Attachments
effective visibility.oxtstack
(4.39 KiB) Downloaded 38 times
User avatar
tperry2x
Posts: 3049
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Learning from across they way #12

Post by tperry2x »

Seems like you can GET the effective visible, but SET the effective visible produces a script error.
vis2.png
vis2.png (46.51 KiB) Viewed 1535 times
Attachments
effective visibility 2.oxtstack
(7.47 KiB) Downloaded 35 times
User avatar
tperry2x
Posts: 3049
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Learning from across they way #12

Post by tperry2x »

From dictionary:

The effective keyword can be used with the following inherited properties : * backgroundColor property * backgroundPattern property * backgroundPixel property * bottomColor property * bottomPattern property * bottomPixel property * focusColor property * focusPattern property * focusPixel property * foregroundColor property * foregroundPattern property * foregroundPixel property * hiliteColor property * hilitePattern property * hilitePixel property * topColor property * topPattern property * topPixel property * shadowColor property * shadowPattern property * shadowPixel property * textFont property * textHeight property * textSize property * textStyle property * filename of stack property * rectangle property * layerMode property *Note:* 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[mand].

So, you can only GET the effective [something], you can't SET the effective [something] the dictionary says.
However, "get the effective visible" is not mentioned in the dictionary, so while correcting this dictionary entry for typos (of which there are many) and formatting errors (of which there are many), it might well be worth adding in.

edit: dictionary entry corrected (text version), and formatting also sorted out. Will add this in v1.09 of OXT lite.
effective.png
effective.png (173.45 KiB) Viewed 1522 times
As well as adding "visible" to the list off things supported by "effective" (on the above screenshot), I also just added a second example:
added 2.png
added 2.png (31.5 KiB) Viewed 1517 times
User avatar
richmond62
Posts: 4594
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Learning from across they way #12

Post by richmond62 »

Code: Select all

set the ineffective something to false
Very badly documented, if at all, and in many cases counterintuitive.
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 3049
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Learning from across they way #12

Post by tperry2x »

It's very misleading, because you can do:

Code: Select all

set the effective flipflop of this stack to true
which the dictionary says you can't set the effective.

but then, you can use:

Code: Select all

answer the flipflop of this stack
(answers "true") -- all it's done is set a custom property on the stack.

The same as using:
set the flipflop of this stack to true. It's ignored the 'effective' part, and that should really throw an error.
User avatar
richmond62
Posts: 4594
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Learning from across they way #12

Post by richmond62 »

Some person has shown that they can be extremely inconsistent, and it reflected in their work.
-
Shoulder.jpeg
Shoulder.jpeg (155.67 KiB) Viewed 1515 times
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 3049
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Learning from across they way #12

Post by tperry2x »

Certainly makes you wonder how deep the rabbit hole goes...

So, as bn suggests, in that 'other place' - searching for 'visible' in the dictionary does mention the effective visible:
hmm2.png
hmm2.png (24.99 KiB) Viewed 1509 times
As I had the dictionary open anyway...
If you wanted to toggle visibility of the stack by using 'effective visible', you'd have to do:

Code: Select all

set the visible of stack "OpenXTalk Lite Dictionary" to (not the effective visible of stack "OpenXTalk Lite Dictionary")
Just doesn't seem very intuitive that you can't set the effective visible. But there you go.

A good way to find out is to try SET the effective [something] of btn "button" to "1"
If it's suddenly got a custom property listed under [something], then it's not a supported thing for the GET effective command. If it errors on you, I think there's a good chance you could switch it around and use it for GET. (if that makes sense?)

What I mean by that, is:

Code: Select all

set the effective topleft of btn "button" to 20,20
That works. But shouldn't. It's not mentioned in the dictionary!
Yet:

Code: Select all

get the effective topleft of btn "button"
returns nothing!! (not even an error)

Where's my rabbit emoji?
Image

This ALSO should not work, but guess what

Code: Select all

set the defaultfolder to "~/Desktop" set the effective filename of image "meh" to "rabbit.gif"
It does! -- the dictionary says you can't
The effective keyword [... blah blah...] However, it cannot be used [...] with the set command.
This would appear to be wrong.
User avatar
tperry2x
Posts: 3049
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Learning from across they way #12

Post by tperry2x »

The latest question from 'that other place' (if you are following along, popcorn in hand)
If I make four buttons on a new card, group two of them, and then hide the group, the effective visible of those two buttons remains "true". This is in 9.6.9. Has it really changed in 10?
Hmmm. Let's try it!
lets-try-it.png
lets-try-it.png (16.41 KiB) Viewed 1495 times
Works like I'd expect in 9.6.3 (9.7.0-dp1)
So, question is - did they mess this up somewhere in 9.6.9?
Attachments
lets try it.oxtstack
(1.86 KiB) Downloaded 34 times
User avatar
richmond62
Posts: 4594
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: Learning from across they way #12

Post by richmond62 »

did they mess this up somewhere in 9.6.9?
I have a feeling quite a lot was messed up.

Of course conspiracy theorists might claim that was to make people rush to adopt Create. 8-)
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 3049
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: Learning from across they way #12

Post by tperry2x »

Or they could always rush over here.
Do you want to tell them the bug does not seem present in 9.6.3 (or 9.7.0-dp1) ?
Might help narrow it down.
sorry, I tried but I'm not able to relate to your thinking.
:lol: I'm going to have to remember that one!
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests