Using TRichView in intraweb.

General TRichView support forum. Please post your questions here
Post Reply
shinug
Posts: 7
Joined: Thu Dec 15, 2005 11:12 am

Using TRichView in intraweb.

Post by shinug »

Hi,

We have a win client having rich text capabilities.
We want to have a web version of our software.

In web we want to convert the rvf to html and show.
To implement this we have done following steps
1. Create a dummy richview
2. Load the rvf data
3. Call richview.SaveToHtmlStream.

But there is one problem.
TRichview do not allow to do any operation without parent as TForm.

Since TForm is not thread safe it is creating problem in multi-threaded
environment. We time to time get error while creating a form with richview in it. "Canvas does not allow drawing".

Is there a way to convert rvt to html and html to rvf without creating TForm?

Thanks in advance.
Shinu
Sergey Tkachenko
Site Admin
Posts: 17288
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Currently - no, TRichView must have a parent (this limitation will be removed in one of next updates).
But does really creating a form (without showing it) cause problems?
shinug
Posts: 7
Joined: Thu Dec 15, 2005 11:12 am

Post by shinug »

Creating a form in a thread sometimes raises exception.
Stack is given below.
Many VCL components are not thread safe.

Is there a way to convert RVF to HTML and vice a versa without
creating a Richview?
Can i create TRVEditRVData and do the conversion?

Thanks.
Shinu

madExcept version : 2.7g
exception class : EInvalidOperation
exception message : Canvas does not allow drawing.

thread $65c (TInThreadWithTask):
0045cdd9 WebClient.exe Graphics 2449 TCanvas.RequiredState
0045c9b4 WebClient.exe Graphics 2315 TCanvas.TextExtent
0045ca31 WebClient.exe Graphics 2328 TCanvas.TextHeight
0048d5d2 WebClient.exe Forms 2739 TCustomForm.GetTextHeight
0048d2af WebClient.exe Forms 2676 TCustomForm.ReadState
00452ae7 WebClient.exe Classes 6434 TReader.ReadRootComponent
0044fb47 WebClient.exe Classes 4886 TStream.ReadComponent
0044ace0 WebClient.exe Classes 2447 InternalReadComponentRes
0044aeb4 WebClient.exe Classes 2504 InitComponent
0044af46 WebClient.exe Classes 2518 InitInheritedComponent
0048cad3 WebClient.exe Forms 2509 TCustomForm.Create
0086eeda WebClient.exe ulibTextTypeConversion 134 CreateRichViewForm
0086fd02 WebClient.exe ulibTextTypeConversion 982 GetHtmlTextWithCSS
00946213 WebClient.exe uclWebRichTextWrapper 160 TnsWebRichTextWrapper.Create


main thread ($5d0):
77e13569 user32.dll WaitMessage
0049679b WebClient.exe Forms 7023 TApplication.Idle
00495c6a WebClient.exe Forms 6715 TApplication.HandleMessage
00495ef6 WebClient.exe Forms 6799 TApplication.Run
00a9cfba WebClient.exe WebClient 115 initialization
Post Reply