rvActions - confused with closing forms

General TRichView support forum. Please post your questions here
Post Reply
derPENGUIN
Posts: 4
Joined: Mon Jun 05, 2006 2:25 am

rvActions - confused with closing forms

Post by derPENGUIN »

I'm really sorry about my stupid questions. May be, that is not the right board for that, but nobody else knows the actions source like here...
I created a frame app, with auth etc, inside of that I start the atm nearly unchanged "unit3" example with frmModuleText.show. Yes, I copied all elements to my form and adjusted all actions. So far it works. really fine Now I have on that form a button (setup) with frmSetup.show, it simply opens a new form for some db related settings. When I close this setup form (with form.close, form.hide or form.visible:=false) I get the message "Save changes to...", but the main app is not closed. Sure, I only shut up the setup form. My newbie like question is now, how to avoid that? I dont need that question at this position.

Much thanks.

And sorry for my villainous english.
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

This question is asked in the form's OnCloseQuery event.
In Unit3, it is processed as:

Code: Select all

procedure TForm3.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
  CanClose := rvActionsResource.rvActionSave1.CanCloseDoc(RichViewEdit1);
end;
TrvActionSave1.CanCloseDoc asks this question if the document was modified.
derPENGUIN
Posts: 4
Joined: Mon Jun 05, 2006 2:25 am

Post by derPENGUIN »

hm, no, that dos not solve the problem. i commented out that line - no changes. I've set a breakpoint to that line, my program dos not stop in this event, but some save question appears. I really dont know, where it comes from.

I would put online the my complete code for replication, but its difficult, because there is much db stuff to install...
Post Reply