I have a GUI/Tk which read the data structure in an array of array as
[“Question A”,“explanation for A”],
[“Question”,“explanation for B”],
[“Question C”,“explanation for C”],
[“question n”,“explanation for n”]
When I press “next_button”, the question will appear. If I press “next
button” again, the “explanation” part(second element of the nested
array" will show up.
The issue here is that sometimes the second element of each nested
array, for example, “explanation A”, is quite long, several lines or a
big paragraph. When I press “stop_button”, the script takes quite a
while to respond. What codes are used so that I can let the script to
respond my “stop_button” immediately? Should I or how could I tell ruby
to read the data or each element in a small chunk size instead of whole
element of each array?
Thanks for the comments.