Page 1 of 1

rvActions - confused with closing forms

Posted: Fri Jun 09, 2006 12:54 am
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.

Posted: Fri Jun 09, 2006 2:45 pm
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.

Posted: Mon Jun 12, 2006 11:19 pm
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...