ScriptButton.setZLevel not working?
-
The function for:
ScriptButton.setZLevel(String zLevel)
Does not appear to be working.
Here is a test snippet:
HiseSnippet 903.3ocsV01aaaCDlxwpXV6ErBr8ch7ImhhVY4jlZLTzT6D2YrlDi4rhs9kBZpyQDQhTPjJoFECX+j2efg1iRJwJId4EuU+ACc7tGdO2oGdTiyTbPqUYDGuilmBDmuwcxboIZPDSHIi1k37it8yMFkj9N5afSgX5Qf1P5OOko0PHwwYsWaC0oUSRwu+9k8YwLIGVrDg7VkfCuQjHLKVc7N+hHNdHKDNRjTK5M2YDWIGnhU4HsVy0mjx3mvNFNfYCqgK4mY5Hhyib47M6AOeVv19A8fsB2bZPGeVfeudaCrs74S6ArfYS49DmGrWnvnxlXXFPiaZeU37IQpyjkI3sBsXZLXM5PlfYtbYxfHQb33y6QZBwo43Ecr0J6X+f69hPwEquny88ENnKPTuo4z3lnTm6AkbpQolkT5gtS3YhTyBOV970tijFHaFCe2TmJkwRZ7ONtCTXDRySRXm.CyPiKPz9Y99Olh+swO448zm1kNsPUn8v2UZC8TVFsTmzg9B54aywfYfJIUIQi1qW4ecbGtJnfaATvx.08V.0c8RtpACJdiKDuFEMCeHSCTUVHjQaqUztTglhJbSDPmpPnITlLj1470LpzR3a3UUCOA2y2Ubbn85uJ9L1b8gxiTo1DVk65QzG0uUb4kyxkbi.2Xk7.kANT1dCuO50x6O8nW00rYK0msjyTwwP1RcaOLkcS.aKySlBYOF6jw4vEAhhmKqHevcSQxKeCTKPkbjTXNLEprGphCsJM6yWW+RpdEhJ40pXH9joPG+cU53xdJQfaRqpwQcHEzu9PFx8.dv+M3cWB7eaztLCydfrphvpLExLBayzYW3TbDX4wyVt6B5SPUUQIWoZwF9cnn+vhT9G6LegwA6blHzfSEcc9.ZFAhiiLVqgkU18HIA0Rxew9Bkjt0qDwcOIWeVGNkUElGyLWdzq8RoJGn5+Ry6ryzjZgYd8Kst573l+6pe+Zp+aQaeGo6CcGKL7nky2FKgunJ6KMeqtc6ac2a1LfaVP1ltC+8a7pr+enxupxMB4w6yLYBTq3dPdxD7KB3.xDoDh0VMQCqtqz12Za6LS.YXgwmveUN6Xscpb14bmjDFOS8dd44d6coeUwJHmjEeqQK28s1zkLrIAuZ+8b9k2pqALXUA1cUAt4pBbqUE3yVUfaup.e9sCz9kWuJGuIu73Dgr+38JFO63rmjgpwBkK4yf.aA.J
-
Oh yeah I remember coming across this buggy behaviour before. The current workaround is to use a timer, set all the z levels to default, then set them how you want them.
Make a bug report on github.
HiseSnippet 1006.3ocsV0saaaCElxNpa16GrBrcOQtxYnH0xxwIACCy0+jMi0j3MmUr0KVAsDkEWjHMHoRlwPA5y1dA5qxdCxNTRNRt0do0YUWXXdN7imuygme3XovipTBIxp9EKlSQVep8jEbcX+PBiiFM.Y8U18RzZAG+b7SoWQivWPUZTuEyIJE0GYYU86Ma0p1Nnzu+465QhHbOZgHD5YBlG8orXltP53t+HKJ5DhO8BVboc2t6HOAuuHRj.zppcSzbh2kjYzyHlsUwF8CDUHx5qsadPGJ8P2.eehqqemNcN9niaerCInYaxTmNG2tU6CaczgAHqGLzmoExIZhlpPV6zS3uXRn3ZdlAdFSwlFQMKbPS.KmI9DQjuwEMRQ8CYQ9iWFuTH3TFWD8plE89R6SY9rakWDE+hTE3BDkCfVUVkdUWgdNkoWyRzaMTxpDk1IiROzdhmjMWWnwvmOwdDWSkAD3dpLUx1KpxqqX2W.6fq2OlbI8DIr3VDM5zr4ivvO68M0q+3G6hmllgnpC2aJM9JhDmky3f+V7xiYFU2WDOWvgEM1MW+tvI7lfZcGfZsNPt2AH2cy3phpgD4nzDYs.Kg+HUTrP5Sk3FJA1EyTXHaWGRwSE.zXLg6icVJSKlmAeu50yYgFr8P9LFmtumjBWgl7Y44S+Cpmtgwr58AylJrOIJZJjM2HHg6oYBdi8p+W0pWKObX12ySqxZr6.Z.IIRa3ct5V+2pc2j50d7OI5ZxB047KDy2zYzCHZ9AnCYp8Ufum5EFm5k4NllHybsFG.oCKcKHZclPSOO0+fC3k0wuopff0pybIJEQQFqrF041ey.avShmRkOBxMhRn2tQnbX0ZL6MWiUtEfWVNUoMJ3i3L84yo7M0X.kmHB0iUyYE7OcZ03mmWMlEtQLnnqVdCVGTJkK21D8d.u08Ct6Zf+KiFPzDSakbOB7x4TolYBfVCnWAM0yZxTyd.UcIjej5x40dHqO5cvo+yBS9acWTr3rtWy70gEB98tgT1rvhIHu5m5xzz3kSJp8.D5lax862CJzpDEdE49RgaNXKnfa4n.6dRgWiZ82YCXeqYAvTHgeRDQu5nIy.7bEPszJyCL874JldQ4A7+uMu5ckhOzdLS6EtdNVYMbDxY+Pvw7o7el8vf.n4dAA2w9je8CyHczOKRzL9rSIZICxRrOKIdBbS6QAqy4zHSuLqJlLtr0MMqMQfITte5hafubkNl0V4JcVpDES7jhW3k0sv7NhONUBvId5atpYepYMdMsnhgm07BOuUOp2BXqsEn61Br81B7fsEXmsE3gaKvitaflWc9jD3ULYkMHzoiGl1T2xZHm.YfoYqn+EXeJTDC
-
@d-healey said in ScriptButton.setZLevel not working?:
Make a bug report on github.
Chuck it onto the pile!
-
@d-healey said in ScriptButton.setZLevel not working?:
Oh yeah I remember coming across this buggy behaviour before. The current workaround is to use a timer, set all the z levels to default, then set them how you want them.
Make a bug report on github.
HiseSnippet 1006.3ocsV0saaaCElxNpa16GrBrcOQtxYnH0xxwIACCy0+jMi0j3MmUr0KVAsDkEWjHMHoRlwPA5y1dA5qxdCxNTRNRt0do0YUWXXdN7imuygme3XovipTBIxp9EKlSQVep8jEbcX+PBiiFM.Y8U18RzZAG+b7SoWQivWPUZTuEyIJE0GYYU86Ma0p1Nnzu+465QhHbOZgHD5YBlG8orXltP53t+HKJ5DhO8BVboc2t6HOAuuHRj.zppcSzbh2kjYzyHlsUwF8CDUHx5qsadPGJ8P2.eehqqemNcN9niaerCInYaxTmNG2tU6CaczgAHqGLzmoExIZhlpPV6zS3uXRn3ZdlAdFSwlFQMKbPS.KmI9DQjuwEMRQ8CYQ9iWFuTH3TFWD8plE89R6SY9rakWDE+hTE3BDkCfVUVkdUWgdNkoWyRzaMTxpDk1IiROzdhmjMWWnwvmOwdDWSkAD3dpLUx1KpxqqX2W.6fq2OlbI8DIr3VDM5zr4ivvO68M0q+3G6hmllgnpC2aJM9JhDmky3f+V7xiYFU2WDOWvgEM1MW+tvI7lfZcGfZsNPt2AH2cy3phpgD4nzDYs.Kg+HUTrP5Sk3FJA1EyTXHaWGRwSE.zXLg6icVJSKlmAeu50yYgFr8P9LFmtumjBWgl7Y44S+Cpmtgwr58AylJrOIJZJjM2HHg6oYBdi8p+W0pWKObX12ySqxZr6.Z.IIRa3ct5V+2pc2j50d7OI5ZxB047KDy2zYzCHZ9AnCYp8Ufum5EFm5k4NllHybsFG.oCKcKHZclPSOO0+fC3k0wuopff0pybIJEQQFqrF041ey.avShmRkOBxMhRn2tQnbX0ZL6MWiUtEfWVNUoMJ3i3L84yo7M0X.kmHB0iUyYE7OcZ03mmWMlEtQLnnqVdCVGTJkK21D8d.u08Ct6Zf+KiFPzDSakbOB7x4TolYBfVCnWAM0yZxTyd.UcIjej5x40dHqO5cvo+yBS9acWTr3rtWy70gEB98tgT1rvhIHu5m5xzz3kSJp8.D5lax862CJzpDEdE49RgaNXKnfa4n.6dRgWiZ82YCXeqYAvTHgeRDQu5nIy.7bEPszJyCL874JldQ4A7+uMu5ckhOzdLS6EtdNVYMbDxY+Pvw7o7el8vf.n4dAA2w9je8CyHczOKRzL9rSIZICxRrOKIdBbS6QAqy4zHSuLqJlLtr0MMqMQfITte5hafubkNl0V4JcVpDES7jhW3k0sv7NhONUBvId5atpYepYMdMsnhgm07BOuUOp2BXqsEn61Br81B7fsEXmsE3gaKvitaflWc9jD3ULYkMHzoiGl1T2xZHm.YfoYqn+EXeJTDC
Thanks :)
I'm looking at your snippet but I don't quite understand,
What does the timer do here?
The code for setting the Z level to "default" and "front" are back to back, so there is no timer in between them?
t.setTimerCallback(function() { for (x in PanelsFront) x.setZLevel("Default"); PanelsFront[Knob1.getValue()].setZLevel("Front"); this.stopTimer(); });
-
@VirtualVirgin said in ScriptButton.setZLevel not working?:
The code for setting the Z level to "default" and "front" are back to back, so there is no timer in between them?
The timer just waits 50ms then sets them to default and then sets them as specified. Why it works I don't know.
-
I'm not setting the Z level from a UI component but just in the onInit in general.
Can I still put a timer on it? -
Also, I can't seem to ".getZLevel" from a component. Is there always a "get" for every "set"?
-
@VirtualVirgin said in ScriptButton.setZLevel not working?:
Can I still put a timer on it?
That's what I'm doing in the snippet.
@VirtualVirgin said in ScriptButton.setZLevel not working?:
Is there always a "get" for every "set"?
Not always, check the API browser.
-
@d-healey Well I got the black keys to the front using your timer trick, but something odd is going on...
The black keys are only on top in the Interface Designer view, and not in the Interface preview (so I am supposing that is how they would appear in a build?): -
@VirtualVirgin said in ScriptButton.setZLevel not working?:
so I am supposing that is how they would appear in a build?):
I would think so but I've never done anything like this so there's only one way to find out.