SelectAll in Table is ERROR

General TRichView support forum. Please post your questions here
kisshexuxia
Posts: 29
Joined: Mon May 07, 2012 2:36 am

Post by kisshexuxia »

Sergey Tkachenko wrote:By default, all actions works with the focused editor. So all buttons and menus in inactive forms work with the editor on the active form.

I assume that you have TRVAControlPanel on the form, with DefaultControl property assigned. In the new version of RichViewActions, the first created RVAControlPanel becomes default, so in this case all actions will work with the first created editor.

I suggest making the following changes:
1) Create only one copy of srvActionsResource (in the code you send to me, you create a new copy TTest_OCX.ActiveFormCreate each time; change the code to create srvActionsResource only if it equals to nil)
2) Do not place TRVAControlPanel on TTest_OCX. Place it on this datamodule instead. Do not assign RVAControlPanel.DefaultControl.
3) Remove ActionList from the datamodule and insert it in TTest_OCX form instead (cut to the Clipboard and paste).
4) Change the code in TTest_OCX.ActiveFormCreate to:

Code: Select all

  for i := 0 to ComponentCount-1 do begin
      if Components[i] is TsrvAction then
        TsrvAction(Components[i]).Control := srv
      else if Components[i] is TrvAction then
        TrvAction(Components[i]).Control := srv;
      if Components[i] is TAction then
        TAction(Components[i]).OnExecute := DoActionsExecute;
5) Change the timer code:

Code: Select all

  for i := 0 to ComponentCount-1 do
     if Components[i] is TAction then
       TAction(Components[i]).UpdateTarget(GetRVAControlFor(TAction(Components[i])));

thanks i modif the code on
3) Remove ActionList from the datamodule and insert it in TTest_OCX form instead (cut to the Clipboard and paste).
if i cut ActionList to TTest_OCX it will show class TsrvActionExport not found
but i copy ActionList to TTest_OCX it'ok
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Did you solve the problems?
kisshexuxia
Posts: 29
Joined: Mon May 07, 2012 2:36 am

Post by kisshexuxia »

Sergey Tkachenko wrote:Did you solve the problems?
it still error
i copy ActionList 1 to TTest_OCX don't cut it,it's ok
cut it will be show class TsrvActionExport not found
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Please send me your application, I'll fix it.
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

It looks like some bug happened when you deleted actions from the datamodule: a reference to rvActionExport1 was not deleted from dfm file.
I called "View as text" in the context menu for this datamodule, and removed this reference manually.

Changed files were sent to you.
kisshexuxia
Posts: 29
Joined: Mon May 07, 2012 2:36 am

Post by kisshexuxia »

Sergey Tkachenko wrote:It looks like some bug happened when you deleted actions from the datamodule: a reference to rvActionExport1 was not deleted from dfm file.
I called "View as text" in the context menu for this datamodule, and removed this reference manually.

Changed files were sent to you.
Thanks,it's OK
I remove code rvActionExport1 where in datamodule
Post Reply