Hello there! I find no clues about my question so I have to bother here for a proper answer. It would be great if you can kindly point out what's wrong I did.
My goal : making 2 buttons to toggle filter forward or backward. Here is my UI example:
My idea:
Set a list of all my subject. i. e:
default all_subject = ['subject1','subject2']
Set a screenvariable to count the number:
Screen Test():
default order = 0
fixed:
imagebutton 'left_arrow':
if order>0:
action (SetScreenVariable('order',order-1,enc.FilterBySubject(all_subject[order])))
text all_subject[order]
imagebutton 'right_arrow':
if order<len(all_subject):
action (SetScreenVariable('order',order+1),enc.FilterBySubject(all_subject[order]))
someting like that!
However, I find it doesn't work properly, or to say, it somehow not filter in the current order. Sometimes I click the next, but it stay the same, or even go back to previous subject. By the way, the order's value works well, but only the filter and the subject got wrong.
*Also, when I write some code like
Screen Test():
for i in range (0,len(all_subject)):
textbutton all_subject[i] action enc.FilterBySubject(all_subject[i])
if works well.
Maybe something goes wrong about the data refreshing? Or I wonder if there are anything wrong I did?
Hello there! I find no clues about my question so I have to bother here for a proper answer. It would be great if you can kindly point out what's wrong I did.
My goal : making 2 buttons to toggle filter forward or backward. Here is my UI example:
My idea: Set a list of all my subject. i. e:
default all_subject = ['subject1','subject2']
Set a screenvariable to count the number:
someting like that! However, I find it doesn't work properly, or to say, it somehow not filter in the current order. Sometimes I click the next, but it stay the same, or even go back to previous subject. By the way, the order's value works well, but only the filter and the subject got wrong.
*Also, when I write some code like
if works well.
Maybe something goes wrong about the data refreshing? Or I wonder if there are anything wrong I did?