trichview.com

trichview.support




Re: about richview Multi threads


Return to index


Author

Message

Sergey Tkachenko

Posted: 11/18/2002 12:48:30


Actions (not only RichViewActions, but any TAction) cannot work on active

forms. All actions update their state in Application.OnIdle. But this event

is not generated for ActiveForms.

I tried to simulate this cycle on timer:


procedure TActiveFormX.Timer1Timer(Sender: TObject);

var i: Integer;

begin

  for i := 0 to ComponentCount-1 do

    if Components[i] is TrvAction then

      TrvAction(Components[i]).UpdateTarget(RichViewEdit1);

end;


State of actions was updated correctly, but sometimes the program crashed

when closing IE.

So, I am afraid, actions cannot be used in active forms.

You need to create user interface yourself, like in this demo:

http://www.trichview.com/support/files/redit.zip


But this does not save from problem in opening - opening - closing - opening

which you mentioned before.



>

> may be the richviewaction is not threadsafe.

> because if i use richviewaction in the activeform like this:

> procedure TAfxMainForm.rvActionCut1Execute(Sender: TObject);

> begin

>   rvActionCut1.ExecuteTarget(RichViewEdit1);

> end;

>

> then if i open many ie window, many functions is disabled except

> the last opened ie window, such as fontbold, italic, paracenter,

> right, justify, and copy, cut, paste.

>

>

> >May be I do not understand the problem.

> >I created a test page with two ActiveForms with RichViewEdits:

> >http://www.trichview.com/support/files/activetest/

> >

> >I cannot see any problem.

> >Compiled on D6.

> >

> >>

> >> i have use richview buil a ActiveX by delphi,it can run well in IE,but

> if

> >> use two or more the build edit in same page,only the last one can

normal

> >> edit word(if use only one build edit but use shortcut Ctrl+N open a new

> IE

> >> page,the build edit in first page can not normal edit word).i think

this

> >> is the problem of Multi threads, how can i use build edit from richview

> >normal

> >> for multi page in IE.

> >

> >

>





Powered by ABC Amber Outlook Express Converter