Is this a bug? (booleans and isRepeat/isLoop)

About usage, announcement and development of skins for VLC
reD_Fox
New Cone
New Cone
Posts: 4
Joined: 26 Feb 2011 04:31

Is this a bug? (booleans and isRepeat/isLoop)

Postby reD_Fox » 27 Feb 2011 13:17

Hello,

Maybe it's just me doing something stupid, but something seems funny here. I have two check-buttons, one to turn looping on and off, and the other to turn repeat on and off. I wanted these two to toggle so that when looping is enabled, the repeat button is greyed-out, and vise versa.

So I have
LoopButton:
- Condition: (playlist.isLoop) and (not playlist.isRepeat)
- Action (state 1): playlist.setLoop(true);playlist.setRepeat(false)
RepeatButton:
- Condition: (playlist.isRepeat) and (not playlist.isLoop)
- Action (state 1): playlist.setRepeat(true);playlist.setLoop(false)

Here's what happens: When I click on the LoopButton, looping is activated, but the RepeatButton is "activated" as well (yet the repeat functionality itself is not activated). After this, clicking on the RepeatButton does nothing to enable or disable the button state or the repeat functionality.
The really strange thing is that if I change the RepeatButton condition to:
false and (not playlist.isLoop)
(...which should always be false, no?)
then clicking on the LoopButton activates the RepeatButton!

I don't get it. Any help/ideas? Is this a bug?

Levi

Spyme
Blank Cone
Blank Cone
Posts: 60
Joined: 13 Jan 2009 16:59
VLC version: 1.1.7 Win32 / 1.2.0
Operating System: Win7 64

Re: Is this a bug? (booleans and isRepeat/isLoop)

Postby Spyme » 27 Feb 2011 17:44

Find out such behavior on my playlist loop control too. I doesn´t really remember if it´s the repeat or random control, but one of them seems buggy.
Try the Advantage.VLC:Sky Skin.

reD_Fox
New Cone
New Cone
Posts: 4
Joined: 26 Feb 2011 04:31

Re: Is this a bug? (booleans and isRepeat/isLoop)

Postby reD_Fox » 28 Feb 2011 06:41

Update: This may be for all states (not just isLoop/isRepeat)--I tested it with isRandom and got the same results. Regardless, this has got to be a bug. When "false and (not playlist.isLoop)" is returning 'true', something is broken.

EDIT: I created a bug report - http://trac.videolan.org/vlc/ticket/4529

Levi

erwan10
Developer
Developer
Posts: 415
Joined: 02 Nov 2008 23:16

Re: Is this a bug? (booleans and isRepeat/isLoop)

Postby erwan10 » 01 Mar 2011 14:39

There was indeed a bug with boolean composite variables (using 'and' or 'or'), that led the checkbox control into believing the state had toggled when it actually didn't

A patch has just being applied that should fix the problem (patch applied to both vlc1.1 and vlc1.2).
As usual, nightly builds available as soon as tomorrow for more testing, if you feel so.


Return to “Skins”

Who is online

Users browsing this forum: No registered users and 7 guests