Hi,
Are there any limits on:-
1. the length of a VDJScript action?
2. the number of nested conditional branches?
I have the following action:
holding ? var "$S2" ? var "$S1" ? edit_comment : nothing : var "$S1" ? browsed_file_info : nothing : var "$S2" ? var "$S1" ? browser_folder : edit_search : var "$S1" ? browser_window "sidelist" ? browser_window "songs" : browser_window +1 : search
It nests 4 deep and is 327 bytes once the quotes are expanded. Neither of the search-related sub-actions work. All others do...
(There are 2 other buttons that set $S1 and $S2.)
Are there any limits on:-
1. the length of a VDJScript action?
2. the number of nested conditional branches?
I have the following action:
holding ? var "$S2" ? var "$S1" ? edit_comment : nothing : var "$S1" ? browsed_file_info : nothing : var "$S2" ? var "$S1" ? browser_folder : edit_search : var "$S1" ? browser_window "sidelist" ? browser_window "songs" : browser_window +1 : search
It nests 4 deep and is 327 bytes once the quotes are expanded. Neither of the search-related sub-actions work. All others do...
(There are 2 other buttons that set $S1 and $S2.)
Posted Mon 18 May 15 @ 9:31 pm
My longest has been 88K chars, So I don't think there's a limit other than ram.
Although I can't see a reason for your script not to work.
Although I can't see a reason for your script not to work.
Posted Tue 19 May 15 @ 2:24 am
duggyfresh wrote :
Hi,
Are there any limits on:-
1. the length of a VDJScript action?
2. the number of nested conditional branches?
I have the following action:
holding ? var "$S2" ? var "$S1" ? edit_comment : nothing : var "$S1" ? browsed_file_info : nothing : var "$S2" ? var "$S1" ? browser_folder : edit_search : var "$S1" ? browser_window "sidelist" ? browser_window "songs" : browser_window +1 : search
It nests 4 deep and is 327 bytes once the quotes are expanded. Neither of the search-related sub-actions work. All others do...
(There are 2 other buttons that set $S1 and $S2.)
Are there any limits on:-
1. the length of a VDJScript action?
2. the number of nested conditional branches?
I have the following action:
holding ? var "$S2" ? var "$S1" ? edit_comment : nothing : var "$S1" ? browsed_file_info : nothing : var "$S2" ? var "$S1" ? browser_folder : edit_search : var "$S1" ? browser_window "sidelist" ? browser_window "songs" : browser_window +1 : search
It nests 4 deep and is 327 bytes once the quotes are expanded. Neither of the search-related sub-actions work. All others do...
(There are 2 other buttons that set $S1 and $S2.)
Let's brake it down:
holding ?
----> var "$S2" ?
----> ----> var "$S1" ?
----> ----> ----> edit_comment
----> ----> :
----> ----> nothing
----> :
----> var "$S1" ?
----> ----> browsed_file_info
----> :
----> nothing
:
var "$S2" ?
----> var "$S1" ?
----> ----> browser_folder
----> :
----> edit_search
:
var "$S1" ?
----> browser_window "sidelist" ?
----> ----> browser_window "songs"
----> :
----> browser_window +1
:
search
Under which circumstances you expect the search actions to work ?
From your code, both $S1 and $S2 must be off in order to move the focus on the search box. (momentary push)
Also only $S2 must be on in order to "edit the search" (momentary push)
Your code works fine here as soon as you use
toggle "$S1" and toggle "$2" to set the variables
Posted Tue 19 May 15 @ 3:54 am
Thanks, locodog. 88k! Wow! :)
PhantomDeejay, thanks for the reply.
You are correct in your logical assumptions.
I have checked the variables are set by assigning them to LEDs and they light and extinguish at the correct times. I am using 'up ? set "$S1" 0 : set "$S1" 1' and 'up ? set "$S2" 0 : set "$S2" 1' to set the variables while pressed as I have found that the states of the variables can be inaccurate when using multiple buttons to just toggle the states. I don't believe there is any difference in the two methods otherwise.
I just don't understand why it fails here... :(
{Later...}
If I replace 'edit_search' with, for example, 'deck left load' it loads the deck so the logic must be correct. I thought it must be something wrong with 'edit_search' and 'search' but they both work correctly if I put them as the sole action in the button. Now I'm REALLY confused...
PhantomDeejay, thanks for the reply.
You are correct in your logical assumptions.
I have checked the variables are set by assigning them to LEDs and they light and extinguish at the correct times. I am using 'up ? set "$S1" 0 : set "$S1" 1' and 'up ? set "$S2" 0 : set "$S2" 1' to set the variables while pressed as I have found that the states of the variables can be inaccurate when using multiple buttons to just toggle the states. I don't believe there is any difference in the two methods otherwise.
I just don't understand why it fails here... :(
{Later...}
If I replace 'edit_search' with, for example, 'deck left load' it loads the deck so the logic must be correct. I thought it must be something wrong with 'edit_search' and 'search' but they both work correctly if I put them as the sole action in the button. Now I'm REALLY confused...
Posted Tue 19 May 15 @ 5:06 am
OK, I've simplified to try to eliminate things...
Even 'holding ? search : edit_search' fails! If I use 'holding' and then have either search term in the action, it fails.
I'm using v7.4.3 by the way.
Even 'holding ? search : edit_search' fails! If I use 'holding' and then have either search term in the action, it fails.
I'm using v7.4.3 by the way.
Posted Tue 19 May 15 @ 5:37 am
I think I've clarified the problem with trial and error...
'search' and 'edit_search' work as long as 'holding' is after them in the action script. As soon as 'holding' is used, any instance of a search action following it fails.
I think I can work around this without losing too much functionality. :)
I don't suppose it's worth reporting this as there's no more v7 bugfixes...
'search' and 'edit_search' work as long as 'holding' is after them in the action script. As soon as 'holding' is used, any instance of a search action following it fails.
I think I can work around this without losing too much functionality. :)
I don't suppose it's worth reporting this as there's no more v7 bugfixes...
Posted Tue 19 May 15 @ 7:45 am
You were trying this with Version 7 ?
Because I assumed version 8...
And in version 8 it works exactly as it is...
Because I assumed version 8...
And in version 8 it works exactly as it is...
Posted Tue 19 May 15 @ 10:36 am