Jump to content

Ian Branch

Members
  • Content Count

    1352
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by Ian Branch

  1. Ian Branch

    Issue with UsesCleaner..

    Yes.
  2. Ian Branch

    Issue with UsesCleaner..

    Hi Uwe, Cheers & Tks. Regards, Ian Update - Excellent!! Ran it over all my files. Really like what it does with the Uses. Thumbs Up. :-) Ian
  3. Ian Branch

    Issue with UsesCleaner..

    Thanks Uwe, There wasn't a UsesCleaner.cfg in the .zip, should there have been? Anyway, I have created one based on your example in the reference you gave. Regards, Ian
  4. Ian Branch

    Issue with UsesCleaner..

    Ahhh. Thank you. I has sorta deduced that it was a Uses order thing but didn't know why. I note that most of the units in my App have winapi.windows as the first uses entry. So. Given the procedure was expecting a TSearchRec type, and Sysutils is now after Windows, suggests that the units further down the uses list override the previous as it were. i.e. SysUtils.FindClose overrode Windows.FindClose. Something I never considered/realised. Regards & Tks. Ian
  5. Ian Branch

    TIdSNTP.SyncTime ??

    Hi Team, D10.4.1, Indy as comes with D10.4, 32 bit App. Tested on Win 10 & Win 2012 R2 server. I have the following code in my App in the form create procedure with IdSNTP in the uses.. var SNTPClient: TIdSNTP; begin // SNTPClient := TIdSNTP.Create(nil); try // SNTPClient.Host := 'time.windows.com'; // ShowMessage(DateTimeToStr(SNTPClient.DateTime)); // if SNTPClient.SyncTime then ShowMessage('Time sync worked.') else ShowMessage('Time Sync didnt work.'); // finally SNTPClient.Free; end; // When run, the initial showmessage shows the correct date/time but I get the "didn't work" message after the .SyncTime. I manually changed my PC clock out of sync and ran the routine again, it didn't adjust the clock. I seem to recall many moons ago that this did work, possibly with D10.3, I don't exactly recall. My original code was created in Nov'19. What have I missed please??? Regards & TIA, Ian
  6. Ian Branch

    TIdSNTP.SyncTime ??

    HI Kas, Thanks for that. I will give it a go. I'll try it on my PC first and if OK will set it up on the Clients. Regards, Ian
  7. Ian Branch

    TIdSNTP.SyncTime ??

    Ah Ha! Thanks Remy, appreciated. Is there an alternative? my goal is to embed it into an existing App for a Pacific Customer who is notorious for not maintaining his server & wkstn clocks time. :-( Regards, Ian
  8. Ian Branch

    SMTP Server -> Client

    So here's a thought. I use Eurekalog for exception tracking/logging/reporting. Eurekalog has various 'mail' capabilities built in as it needs to be able to send error reports to a multitude of different types of destinations. A by product of this is its ability to be used as an email sender in general. Rather than use an additional email suite to send reports from my Apps I use the built in Eurekalog email functions to send them. It doesn't need any external SSL module/DLL. I primarily use smtp client functionality but it can do smtp server as well as many other protocols. Caveat - Eurekalog does not officially promote this capability in Eurekalog and therefore it could change, but is unlikely to. Worth a look. P.S. Works with D5.
  9. Ian Branch

    Object created in a Try block???

    Hi Guys, Is there anything actually wrong with creating an object in a TRY block or is it just not good practice? Are there Pros & Cons? I ask because FixInsight flags it with a Warning. Regards & TIA, Ian
  10. Ian Branch

    Object created in a Try block???

    Hi Anders, I was using the second but without the Foo := nil; Adding the equivalent of Foo := nil; to my code eliminates the FI Warning. I think I will use the first method to avoid any complications. Regards & Tks again. Ian
  11. Ian Branch

    A component named DotNetForm already exists.????

    Hi Dave. Yes. Similar. I can work without saving project desktops for now but it will be nice to get it fixed. I have added my Vote for the issue. Ian
  12. Ian Branch

    A component named DotNetForm already exists.????

    Thanks Dave, That seems to have fixed it OK. There seems to be some corrupting interaction happening with Tools|Saving and Desktop|'Save project desktop when closing'. If I enable that checkbox, open a project, do nothing with the project, do a close all for the project then close Delphi, all good. If I enable that checkbox, open a project, do nothing with the project, and close Delphi without closing the project specifically, the original 'DotNetForm' issue returns. :-( Is it just me or is there a bug here? Regards, Ian
  13. Hi Team, Does anybody know if Alpha Controls supports LMD Tools? I use LMD fairly extensively and I won't invest in Alpha Controls if there is no support or only minimal for LMD. Regards & Tks, Ian
  14. Ian Branch

    Alpha Controls support for LMD Tools??

    Anders, Yes, thank you. I didn't see any value in signing up to the forum if I wasn't going to use it. It also seems you have to be a member, purchased AlphaControls, to be able to raise a query. I had looked at the Alpha Controls Community for any hints but they were few and far between and only mentioned LMD some time ago and then only one component. Markus, Thank you. I was sort of expecting that as I couldn't see any mention in the greyed out listing in the 'Lite' version. Regards & Tks to you both, Ian
  15. All, Latest svn of GExperts. I have opened a new thread on this one as the previous thread had an unrelated title referring to something else. This issue already registered with Thomas as Bug # 192. Before I start pulling D10.3.3 & D10.4 apart as it were I would ask if anybody else is seeing this when you open the Message Dialog? Unfortunately Thomas is unable to reproduce it which suggests it may be my environment. Regards, Ian
  16. Ian Branch

    Variation of FormatDateTime(

    Hi Team, Currently "FormatDateTime('dd:hh:mm:ss', EndDateTime - StartDateTime)" only allows 0-31 for the days. I am trying to subtract DateTimes that may be in the 100s to 200s of days apart and still want to represent the difference as just ddd:hh:mm:ss. i.e. 123:12:34:56 How can I do this please? Regards & TIA, Ian
  17. Ian Branch

    Variation of FormatDateTime(

    Hi Remy, OK. You talked me into it. 😉 Regards & tks, Ian
  18. Ian Branch

    Variation of FormatDateTime(

    Hi Remy, Intended or not, my equation produces exactly the same as yours. See attached screen shot. The columns are - Start, Finish Yours, Mine. I am quite willing to accept that my solution is more good luck than good management. 😉 Regards, Ian
  19. Ian Branch

    Variation of FormatDateTime(

    Lars, For some reason your post is not showing att. The code is used once only when the User logs out so time isn't really an issue but I take your point. If the code was used more often I would certainly optimise it as you suggest. The User's Administrator has the ability to generate ad-hoc reports, but is somewhat illiterate with SQL. By adding the Duration to the table he doesn't have to figure out how to create it. Regards, Ian
  20. Ian Branch

    Variation of FormatDateTime(

    Hi Team, Thank you for your inputs. Appreciated. I have implemented the following.. FieldByName('Duration').AsString := (IntToStr(DaysBetween(FieldByName('FinishDateTime').AsDateTime, FieldByName('StartDateTime').AsDateTime)) + ':' + FormatDateTime('hh:mm:ss', FieldByName('FinishDateTime').AsDateTime - FieldByName('StartDateTime').AsDateTime)).PadLeft(12, '0'); This works exactly as I need. Regards, Ian
  21. Ian Branch

    Registering GExperts after a build??

    Hi Team, Is it necessary to de/re register GExperts into Delphi after rebuilding the .dll from the source, or is it sufficient simply to rebuild? Regards, Ian
  22. Ian Branch

    Registering GExperts after a build??

    Thanks Thomas. Regards, Ian
  23. Hi Team, Given the relevant DataSource AutoEdit is False, and the only Navigator button option is Insert, and it isn't clicked, is there any generic key combination that could cause a dataset to go into edit/insert mode? I certainly haven't created one. Regards & TIA, Ian
  24. Ian Branch

    Key Combination to enter Edit or Insert mode??

    Hi Dany, Thanks for your input. Appreciated. Yes the table does have BLOBs, I will look into that aspect. I would be very disappointed if the User had clicked the edit button and it hadn't been captured. The issue doesn't seem to be endemic, just every now and then and certainly I haven't been able to reproduce it. I have put a couple of logging points in and re-published to the Customer to see if that produces any insight. Regards, Ian
  25. Ian Branch

    Key Combination to enter Edit or Insert mode??

    Sorry. To clarify, I am referring to standard DBEdit components.
×