Hello SilverEagle,
we've tested your button, and everything works as expected for us.
If we click "A", state is set to ON without showing a message
If we click "B", state is set to OFF without showing a message
If we click "C", the state TOGGLES and a message is displayed.
Some notes that may help to find the error:
- don't be confused about the message shown. It is NOT updated if you use directly. If you want a message in this case, use
- make sure NOT to use a target when using the onclick handler (unless you REALLY know what you are doing) - eg. the command <button target="stopAfterEachTrack" onclick="player.stopAfterEachTrack=true;"> will always set the state to false (as the target is exectuted after onclick)!
Best regards,
Your Silverjuke-Team
Problem with Player.stopAfterEachTrack
-
- Posts: 713
- Joined: 30. Sep 08, 14:00
- Location: Netherlands [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
-
- Posts: 713
- Joined: 30. Sep 08, 14:00
- Location: Netherlands [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
- Service-Team
- Posts: 2448
- Joined: 7. Dec 04, 04:48
- Location: Germany [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
-
- Posts: 713
- Joined: 30. Sep 08, 14:00
- Location: Netherlands [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: Problem with Player.stopAfterEachTrack
Hi Team,
Sorry, does not work the same here...
Could you try the attached "skin"?
The upper two buttons are my first post, the lower three buttons are my second post. Lets call then A-E top down.
As in first forum post:
When I click A it toggles.
When I click B nothing happens.
As in second forum post:
When I click C or D nothing happens.
When I click E it toggles (together with B).
When I click E and then C or D (depending on state which one), it toggles and after the playlist message disappears it toggles back.
Can you reproduce this behaviour?
Bye,
SilverEagle
PS: Sometimes (definitely _not_ always) I REALLY know what I'm doing now. See the repeat button trick in Shiruba/100
Sorry, does not work the same here...
Could you try the attached "skin"?
The upper two buttons are my first post, the lower three buttons are my second post. Lets call then A-E top down.
As in first forum post:
When I click A it toggles.
When I click B nothing happens.
As in second forum post:
When I click C or D nothing happens.
When I click E it toggles (together with B).
When I click E and then C or D (depending on state which one), it toggles and after the playlist message disappears it toggles back.
Can you reproduce this behaviour?
Bye,
SilverEagle
PS: Sometimes (definitely _not_ always) I REALLY know what I'm doing now. See the repeat button trick in Shiruba/100

- Attachments
-
- buttontest.sjs
- (5.66 KiB) Downloaded 415 times
- Service-Team
- Posts: 2448
- Joined: 7. Dec 04, 04:48
- Location: Germany [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: Problem with Player.stopAfterEachTrack
We have tested your skin, and everything works as expected ... maybe you expect the wrong things?
If "stopAfterEachTrack" is ON, the little icon in the playlist blinks between "stop" (a square) and "play" (a triangle). Does it blink for you? Does it blick if you choose the item from the context menu? What happens if you enter the commands directly in the console window? Finally: Maybe there are other scripts running? You can check this in the console window startup messages.
Just some more tips that may help you - so far - best regards,
Your Silverjuke-Team
PS: We know, normally you know what you are doing, so please forgive us our stupid questions
If "stopAfterEachTrack" is ON, the little icon in the playlist blinks between "stop" (a square) and "play" (a triangle). Does it blink for you? Does it blick if you choose the item from the context menu? What happens if you enter the commands directly in the console window? Finally: Maybe there are other scripts running? You can check this in the console window startup messages.
Just some more tips that may help you - so far - best regards,
Your Silverjuke-Team
PS: We know, normally you know what you are doing, so please forgive us our stupid questions

-
- Posts: 713
- Joined: 30. Sep 08, 14:00
- Location: Netherlands [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: Problem with Player.stopAfterEachTrack
Hi Team,
Phew. After some sleep and thanks to your questions I finally pinpointed the bug: the only thing which is wrong is that the stopaftereachtrack button does not follow its internal state.
Create a two-state button for both removeafterplayed and stopaftereachtrack. Use the console to set them false/true. The removeafter button will change visually to match the state, the stopaftereachttrack does not.
I only ran into this with the stopaftereachttrack target, I think all other targets are OK.
(And to save you some debugging: program.refreshWindows(1) or (3) correctly updates the button, so it is probably just not redrawn after its property has been changed.)
Bye,
SilverEagle
Phew. After some sleep and thanks to your questions I finally pinpointed the bug: the only thing which is wrong is that the stopaftereachtrack button does not follow its internal state.
Create a two-state button for both removeafterplayed and stopaftereachtrack. Use the console to set them false/true. The removeafter button will change visually to match the state, the stopaftereachttrack does not.
I only ran into this with the stopaftereachttrack target, I think all other targets are OK.
(And to save you some debugging: program.refreshWindows(1) or (3) correctly updates the button, so it is probably just not redrawn after its property has been changed.)
Bye,
SilverEagle
- Service-Team
- Posts: 2448
- Joined: 7. Dec 04, 04:48
- Location: Germany [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable