L
Ludwig Wittgenstein
Hello, all.
I'm developing an application that has a listview of records
(pulled from the database) and a preview pane. Basically, when the
user clicks on a record in the listview the preview pane gets
populated with additional information about the record. Each record
also have a variable number of pictures. What I want to do is have
the application fetch the pictures from the database in a separate
thread. What is the best way to do this? I tried creating a Thread
object every time and invoke a method, however If I scroll really
fast in the listview the application crashes and I cannot debug it. Is
there a specific section that I should lock() when the thread is
started? Also how do i guarantee that the last record selected is that
one that will have the most recent started thread's data?
Thanks,
I'm developing an application that has a listview of records
(pulled from the database) and a preview pane. Basically, when the
user clicks on a record in the listview the preview pane gets
populated with additional information about the record. Each record
also have a variable number of pictures. What I want to do is have
the application fetch the pictures from the database in a separate
thread. What is the best way to do this? I tried creating a Thread
object every time and invoke a method, however If I scroll really
fast in the listview the application crashes and I cannot debug it. Is
there a specific section that I should lock() when the thread is
started? Also how do i guarantee that the last record selected is that
one that will have the most recent started thread's data?
Thanks,