Quantcast

Set Layer bug?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Set Layer bug?

prothero--- via use-livecode
Is this a bug or am I losing my mind?   Can anyone confirm?

Using LC 9.0.0 DP-6, set the layer of any object to anything and it always get’s set to the topmost layer.  To repeat, put three buttons on a card: “button1”, “button2” and “button3”.  The, put this in the stack script:

on mouseUp
  set the layer of the target to 2
  set the label of btn "button1" to the layer of btn "button1"
  set the label of btn "button2" to the layer of btn "button2"
  set the label of btn "button3" to the layer of btn "button3"
end mouseUp

You’ll see that any button you click, always get’s set to layer 3, even though you’ve set it to 2.

Thank you!
-Dan

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Set Layer bug?

prothero--- via use-livecode
Have you tried the relayer command? It has a number of useful options.

Terry...

On 29/03/2017 9:28 am, "use-livecode on behalf of Dan Friedman via use-livecode" <[hidden email] on behalf of [hidden email]> wrote:

    Is this a bug or am I losing my mind?   Can anyone confirm?
   
    Using LC 9.0.0 DP-6, set the layer of any object to anything and it always get’s set to the topmost layer.  To repeat, put three buttons on a card: “button1”, “button2” and “button3”.  The, put this in the stack script:
   
    on mouseUp
      set the layer of the target to 2
      set the label of btn "button1" to the layer of btn "button1"
      set the label of btn "button2" to the layer of btn "button2"
      set the label of btn "button3" to the layer of btn "button3"
    end mouseUp
   
    You’ll see that any button you click, always get’s set to layer 3, even though you’ve set it to 2.
   
    Thank you!
    -Dan
   
    _______________________________________________
    use-livecode mailing list
    [hidden email]
    Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
    http://lists.runrev.com/mailman/listinfo/use-livecode
   

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Set Layer bug?

prothero--- via use-livecode
In reply to this post by prothero--- via use-livecode
Hi Dan,

> Am 29.03.2017 um 00:28 schrieb Dan Friedman via use-livecode <[hidden email]>:
>
> Is this a bug or am I losing my mind?   Can anyone confirm?
>
> Using LC 9.0.0 DP-6, set the layer of any object to anything and it always get’s set to the topmost layer.  To repeat, put three buttons on a card: “button1”, “button2” and “button3”.  The, put this in the stack script:
>
> on mouseUp
>  set the layer of the target to 2
>  set the label of btn "button1" to the layer of btn "button1"
>  set the label of btn "button2" to the layer of btn "button2"
>  set the label of btn "button3" to the layer of btn "button3"
> end mouseUp
>
> You’ll see that any button you click, always get’s set to layer 3, even though you’ve set it to 2.

confirmed on macOS 10.12.4 with LC 9 dp6!
Works fine if you:
...
set the layer of the target to 3
...
or
...
set the layer of the target to 1
...
WTF?

> Thank you!
> -Dan

Best

Klaus

--
Klaus Major
http://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Set Layer bug?

prothero--- via use-livecode
In reply to this post by prothero--- via use-livecode
Dan Friedman wwrote:

 > Is this a bug or am I losing my mind?   Can anyone confirm?
 >
 > Using LC 9.0.0 DP-6, set the layer of any object to anything and it
 > always get’s set to the topmost layer.  To repeat, put three buttons
 > on a card: “button1”, “button2” and “button3”.  The, put this in the
 > stack script:
 >
 > on mouseUp
 >   set the layer of the target to 2
 >   set the label of btn "button1" to the layer of btn "button1"
 >   set the label of btn "button2" to the layer of btn "button2"
 >   set the label of btn "button3" to the layer of btn "button3"
 > end mouseUp
 >
 > You’ll see that any button you click, always get’s set to layer 3,
 > even though you’ve set it to 2.

Confirmed, and differs from the oldest version on my drive, 6.0, where
the result is what you'd expect.

I'd call it a bug.  Please post the report link so we can follow its
progress.

Thanks -

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Set Layer bug?

prothero--- via use-livecode
In reply to this post by prothero--- via use-livecode
Confirmed on win10  If you set target to 1, it works.  If you set it to > 1
it seems to always set it to the layer thats highest.  I tested with this
script.

on mouseup
set the layer of the target to 2

repeat with i = 1 to the number of buttons of this card
  set the label of button i to the layer of button i -- So that I can add
any number of buttons
end repeat

end mouseup

On Tue, Mar 28, 2017 at 4:40 PM, Klaus major-k via use-livecode <
[hidden email]> wrote:

> Hi Dan,
>
> > Am 29.03.2017 um 00:28 schrieb Dan Friedman via use-livecode <
> [hidden email]>:
> >
> > Is this a bug or am I losing my mind?   Can anyone confirm?
> >
> > Using LC 9.0.0 DP-6, set the layer of any object to anything and it
> always get’s set to the topmost layer.  To repeat, put three buttons on a
> card: “button1”, “button2” and “button3”.  The, put this in the stack
> script:
> >
> > on mouseUp
> >  set the layer of the target to 2
> >  set the label of btn "button1" to the layer of btn "button1"
> >  set the label of btn "button2" to the layer of btn "button2"
> >  set the label of btn "button3" to the layer of btn "button3"
> > end mouseUp
> >
> > You’ll see that any button you click, always get’s set to layer 3, even
> though you’ve set it to 2.
>
> confirmed on macOS 10.12.4 with LC 9 dp6!
> Works fine if you:
> ...
> set the layer of the target to 3
> ...
> or
> ...
> set the layer of the target to 1
> ...
> WTF?
>
> > Thank you!
> > -Dan
>
> Best
>
> Klaus
>
> --
> Klaus Major
> http://www.major-k.de
> [hidden email]
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Loading...