Page 2 of 2

Posted: Tue Oct 21, 2008 2:04 pm
by Andy
Please do not forget to solve the problem with pagebreak.
You tell me asap and I wait...


Andy

Posted: Tue Oct 21, 2008 2:09 pm
by Sergey Tkachenko
Ilya is working on this problem (and a couple other bug reports).
As soon as it will be ready, I'll upload a fix.

Posted: Mon Nov 24, 2008 1:33 pm
by wanderer
I have a problem with repainting of changed pictures in our version (1.9.42) of TRichView.

Here is the situation.
There are several threads that download web images and then update items in RVData (items receive temporary images until then).
When image is downloaded and saved to disk I use exactly the way you described to update it (SetPictureInfo, then Reformat). But there are no changes on RichView's canvas...

I just want to check with you whether such issue exists in that version of RichView or the problem is somewhere in our code...


UPD: Thought the "site" field from profile should be visible in forums - I'm one of the TimeMaker developers.

Posted: Mon Nov 24, 2008 3:13 pm
by Sergey Tkachenko
Do you call SetPictureInfo and Reformat in the context of the main process (using Synchronize)?

Posted: Mon Nov 24, 2008 3:25 pm
by wanderer
It is protected by TMultiReadExclusiveWriteSynchronizer, that code is in write exclusive section.

Posted: Mon Nov 24, 2008 4:06 pm
by Sergey Tkachenko
I never used TMultiReadExclusiveWriteSynchronizer, but I am aftaid it's not enough. All methods for repainting (as well as methods for changing trichview content) should be executed in context of the main process, using Synchronize.

Posted: Tue Dec 02, 2008 10:21 am
by wanderer
It have to be enough, it is a "specialized" critical section which allows multi-threaded read access to memory but write is exclusive to the calling thread, to say so. Even VCL help lists critical section or this synchronizer as an alternative to using Synchronize method.

I tried to use Synchronize in case there may be some glitch in VCL itself but no - same effect.

Posted: Tue Dec 02, 2008 3:39 pm
by Sergey Tkachenko
I remember I created a demo with threaded downloading of images.
http://trichview.com/resources/html/rvh ... hreads.zip
May be it will be useful for you.