Jump to content

ConstantGardener

Members
  • Content Count

    22
  • Joined

  • Last visited

Community Reputation

15 Good

About ConstantGardener

  • Birthday 10/14/1970

Technical Information

  • Delphi-Version
    Delphi 10.2 Tokyo

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. ConstantGardener

    Revisiting TThreadedQueue and TMonitor

    ... that was not my point. i think dmitry can handle something. ...some infos
  2. ConstantGardener

    Revisiting TThreadedQueue and TMonitor

    ....i think you should have a little faith in this "hobbyist".
  3. ConstantGardener

    Why is ShowMesssage blocking all visible forms?

    ...when u use TMS UI Pack try TAdvSmartMessageBox. Stay's on top of the owner form, blend's in and out smooth and so on.
  4. ConstantGardener

    Common code base for VCL and FMX control code

    I am far from being an expert, but is'nt this https://www.tmssoftware.com/site/fncpartners.asp a way to archive this?
  5. ConstantGardener

    Overload methods or use unique names?

    ...for this example you could work without the TTaskAction at all. For me the parameterlist determinate the action!
  6. ConstantGardener

    Delphi 10.3.3 has been released

    ....as SilverBlack says, but with the exception of Packages from GetIt (Codesite, Konopka Component's).
  7. ConstantGardener

    FireBird, TFDConnection and concurrency

    maybe this ... https://wiert.me/2019/10/03/how-to-properly-cleanup-shutdown-a-delphi-isapi-which-uses-threads-mathias-pannier-programmiert/
  8. ConstantGardener

    FireBird, TFDConnection and concurrency

    procedure CreatePooledConnection; var oParams: TStrings; begin oParams := TStringList.Create; try oParams.Add('Server='+FServerName); oParams.Add('Database='+FDatenbank); oParams.Add('User_Name='+FUsername); oParams.Add('Password='+FPassword); oParams.Add('Port='+FPort.ToString); oParams.Add('Pooled=True'); FDManager.AddConnectionDef(CONN_RAM_Pooled, 'MySQL', oParams); FDManager.Active:=True; finally oParams.Free; end; We use a "PooledConnection" for this! And then in the Thread you only use this Pooled Connection for connecting to the Database, but you must create a new TFDConnection in every thread. AConnection:=TFDConnection.Create(nil); try AConnection.ConnectionDefName:=CONN_RAM_Pooled; try AConnection.Connected:=true; .....
  9. ConstantGardener

    Webhook example

    What about a "heartbeat"-request to the server if no real request happens?
  10. ConstantGardener

    Rules for changing cursor to HourGlass and back

    unit uTempCursor; interface uses Vcl.Controls; type ITempCursor = interface(IInterface) ['{495ADE0F-EFBE-4A0E-BF37-F1ACCACCE03D}'] end; TTempCursor = class(TInterfacedObject, ITempCursor) strict private FCursor: TCursor; public constructor Create(const ACursor: TCursor); destructor Destroy; override; class function SetTempCursor(const ACursor: TCursor = crHourGlass): ITempCursor; end; implementation uses Vcl.Forms; { TTempCursor } constructor TTempCursor.Create(const ACursor: TCursor); begin inherited Create(); FCursor := Screen.Cursor; Screen.Cursor := ACursor; end; destructor TTempCursor.Destroy; begin if Assigned(Screen) then Screen.Cursor := FCursor; inherited Destroy(); end; class function TTempCursor.SetTempCursor(const ACursor: TCursor = crHourGlass): ITempCursor; begin Result := TTempCursor.Create(ACursor); end; end. ...using somthing like this for years (the original idea is from Jeroen Pluimer's i think). Use the SetTempCursor-Function in your code, and when the interface get out of scope, the corsur changes back to the old cursor. uses uTempCursor; procedure LongRun; begin SetTempCursor; // the default is crHourGlass // do the long running stuff end;
  11. ConstantGardener

    RAD server console Ext JS UI why not written in Delphi?

    ...it is dogfooding anyway! It‘s written in JavaScript and Sencha ExJs, one of the latest aquisations of emba.
  12. ConstantGardener

    Running UnitTests for Mobile Devices

    ...and thanks to Stefan for TestInsight!
  13. ConstantGardener

    Is it really good practice to create Forms only as needed? Always?

    ... in addition to David's comment. If you have plenty of forms, all created at the begin, your Startup-Time is looooong!
  14. ConstantGardener

    How to create common CreateForm method?

    TMYForm.execute; Or if TMYFORM.Execute then begin doSomething; end;
×