Ian Branch
Members-
Content Count
1352 -
Joined
-
Last visited
-
Days Won
3
Everything posted by Ian Branch
-
Hi Remy, Now hat's an interesting construct. IIUC, by using IdSMTP1 like that, when IdSMTP1 is Free'd it automatically frees IdSSLIOHandlerSocketOpenSSL1 & IdMessage1. Sneaky. Ian
-
Hi Team, For years, up to and including D10.4.1, I have been using the following in my App, and it has been running without issue via RDP on a Customer's Win 2012 R2 Server.. {Main Form code} procedure TMainForm.mnuRemovePartsClick(Sender: TObject); begin // TRemovePartsForm.Create(Self).ShowModal; // end; {code} and in RemovePartsForm I have this at Close.. {RemovePartsForm code} procedure TRemovePartsForm.FormClose(Sender: TObject; var Action: TCloseAction); begin dmS.DBC1.CloseDataSets; Action := caFree; end; {code} Closing RemovePartsForm takes me back to the Main Form. Rebuilding the App in D10.4.2, and running it on the Server, when the Close button is clicked and the form closes the App crashes to the OS effectively at the Action := caFree! 😞 It does not happen on my Dev Win 10 PC. I have a work around.. {Main Form code} procedure TMainForm.mnuRemovePartsClick(Sender: TObject); var RemovePartsForm: TRemovePartsForm; begin // RemovePartsForm := TRemovePartsForm.Create(Self); // try // RemovePartsForm.ShowModal; // finally RemovePartsForm.Free; end; // end; {code} and .... {RemovePartsForm code} procedure TRemovePartsForm.FormClose(Sender: TObject; var Action: TCloseAction); begin dmS.DBC1.CloseDataSets; end; {code} And it all works as it used to. Unless someone can enlighten me otherwise, I suspect an issue here.. Regards, Ian
-
Dalija - Noted. I have just finished doing just that. FrOsT.Brutal - Noted.
-
Ahh. Excellent. Thank you for the clarification.
-
Ahhhh Ha! Tks Francois. I have eliminated the caFree in the OnClose event. Regards, Ian
-
Yes, I started with the components on the form but removed them in favour of creating on the fly and just got into the '1' habit. 🙂 Having said that, I take your point. I feel a global search and replace coming on. 🙂 I guess the main thrust of the question in my mind is should I use '.Free' or 'FreeAndNil(' or doesn't it matter, with .Create(nil)?? Ian
-
Hi emailx45, The Login form is generic across 18 Apps. In this piece of code.. if TLogInForm.Execute('DBiUsers', BinToInt('1')) then begin // I am passing parameters to the Login form that will indicate the App Name and the permission(s) the User needs for the respective App based on their role in the organisation. Regards, Ian
-
Hi Emailx45, Message received. :-) So here's a scenario.. In the project file I have the following.... ... ... begin // Application.Initialize; // UseLatestCommonDialogs := True; // // 7 6 5 4 3 2 1 0 // 1 // Bits 0 -> 1 = 1 if TLogInForm.Execute('DBiUsers', BinToInt('1')) then begin // Application.Title := 'DBiUsers Utility for DBWorkflow'; Application.MainFormOnTaskbar := True; Application.CreateForm(TMainForm, MainForm); Application.Run; // end; end. In the Loginform OnClose event I have the following... .... ..... public { Public declarations } class function Execute(const sApplication: string; const iBits: SmallInt): Boolean; end; .... .... implementation uses UsersData; {$R *.dfm} class function TLogInForm.Execute(const sApplication: string; const iBits: SmallInt): Boolean; begin // sApp := sApplication; iBitsSet := iBits; // with TLogInForm.Create(nil) do try Result := ShowModal = mrOk; finally Free; end; // end; .... .... ... procedure TLogInForm.FormClose(Sender: TObject; var Action: TCloseAction); begin // DBC1.CloseDataSets; // DBC1.Close; DBSLogin.Close; DBE1.Close; // Action := caFree; // end; Based on your description, Free; in the Execute procedure should be FreeAndNil? And the Action := caFree; in the OnClose removed. I'm guessing yes to both. Regards, Ian
-
Yes. I put a message in before and after the Action line. Got both but it never back to the main form where I had another message.
-
All, Found it! It was caused by the Beta version of LMDs 2021 Tools. Eugene is now aware of it and has pointed to the 'switch' to turn it off, it will be taken care of in the release version of LMD Tools 2021. Thanks to all for your input, Ian
-
Hi Francois, The Server is a Win 2012 R2. My apologies, incomplete information. They have checked via RDP, on the Server PC itself, and on their Win7 & Win 10 workstations with the same result. Very frustrating. But, as I said, I can't make it happen here on my Win 10 Dev PC. I am giving up on it att until the update for 10.4.2 arrives and I will retry it then. I have spent two full days on it now and the Customer is rightly teed off. Restoring to 10.4.1 has placated him att. Ian
-
I have reverted back to 10.4.1, with the code reverted to pre 10.4.2. Same IDE Plug-ins, same libraries. All testing so far has not produced any crashes. Testing continues.
-
Hi Francois, It doesn't fail on my PC. Only when run via RDP at the Client's site on their Server. Just to totally verify, I am going back to 10.4.1 to test further. Ian
-
Good Question. I honestly don't recall. The first time I noticed it was when I started working on my Apps which was after I had loaded my usual Experts & libraries. So. I just de-installed all my Experts, issue persisted. I am now de-installing my libraries to see if any of them are the culprit. We shall see...
-
In my case it doesn't matter what the component, button, form, panel or grid, native or 3rd Party, they all do/show the issue for Boolean properties.
-
Hi Team, 1. This issue is happening all the time in D10.4.2. 2. This did not happen to me in D10.4.1 3. I changed my scaling to 100%, same issue. 4. I changed my resolution from the my normal 3840 x 2160 to 1920 x 1080 @ 100%, same issue. Ian
-
Hi Team, D10.4.2. Can somebody point me to a breakdown of the various setting for the DPI Awareness in the Delphi Manifest please? Settings for D10.4.1 should be OK/applicable. Regards & TIA,
-
Hi Francois, It is always like that unless I click on the Property, then it shows correctly. Ian
-
10.4.2 installer deletes all GetIt packages, but does NOT RE-INSTALL!
Ian Branch replied to David Schwartz's topic in General Help
ROFLMAO -
10.4.2 installer deletes all GetIt packages, but does NOT RE-INSTALL!
Ian Branch replied to David Schwartz's topic in General Help
Hi David, Did you use the ISO or Web install? If the Web, did you simply run the 10.4.2 install with 10.4.1 still installed or did you de-install 10.4.1 first. Reason for the questions...I have become a little confused as to what exactly needs to be done with what. -
Was that the Migration tool from 10.4.1??
-
Hi Team, D10.4.1. I have the following code or equivalent in several places in a Unit and other apps. // if not FilterID1.Execute then dlgResult := False; // FilterValue := Trim(FilterID1.Value); // if FilterID1.Value.IsEmpty then dlgResult := False else dlgResult := True; // if dlgResult then begin if not TryStrToInt(FilterValue, iJobNo) then begin MessageBeep(MB_ICONERROR); showmessage('An Invalid Job # has been entered!'); end else break end else ApplyFilter := false; I keep getting the following warning.. Pointing to the " if not FilterID1.Execute then dlgResult := False;" Yet dlgResult is clearly used in the "if dlgResult then" test. Is this a bug or a "known issue"? If not, how do I get rid of the annoying warning? Aside from turning all H2077 warnings off. Regards & TIA, Ian
-
"Value assigned to 'xxxxxxxx' never used" issue..
Ian Branch replied to Ian Branch's topic in General Help
Ahhhh. Thank you Remy. A little nuance I hadn't realised. 😞 Filed away for future reference. Your restructure of the code showed me that the was redundant. Regards & Thank you again for the assist. Ian -
GExperts 1.3.18 experimental twm 2021-02-21 released
Ian Branch replied to dummzeuch's topic in GExperts
Built fine here for D2007 & D10.4.1. -
Hi Team, D10.4.1, Indy as supplied with Delphi. I have the following code.. begin // IdSSLIOHandlerSocketOpenSSL1 := TIdSSLIOHandlerSocketOpenSSL.Create(self); // IO HANDLER SETTINGS // with IdSSLIOHandlerSocketOpenSSL1 do begin Destination := 'smtp-mail.outlook.com:587'; Host := 'smtp-mail.outlook.com'; MaxLineAction := maException; <<<<< Error here. Port := 587; SSLOptions.Method := sslvTLSv1; SSLOptions.Mode := sslmUnassigned; SSLOptions.VerifyMode := []; SSLOptions.VerifyDepth := 0; end; I am getting an Undeclared identifier error for maException. Is this a known issue? If so, is there a work around? Will it matter if I comment out the line?? Regards & TIA, Ian