Jump to content

Lars Fosdal

Administrators
  • Content Count

    3565
  • Joined

  • Last visited

  • Days Won

    120

Everything posted by Lars Fosdal

  1. Lars Fosdal

    RAD Studio 11 Alexandria is now available

    For subscription users, both the web installer and the iso is available on https://my.embarcadero.com. The details on what is new: https://www.embarcadero.com/products/rad-studio/whats-new-in-11-alexandria Note that not all GetIt components have been updated for Alexandria yet. Also - at the point of writing - the docwiki is down for the update. It can be installed in parallell with 10.4.x or older, but remember not to mix your versions. Forms modified in 11 may then break for 10.4.
  2. Both. I have scratchpad documents for work-in-progress designs and other notes. My Greenshot (screenshot clipper) also automatically copies screenshots there - so that I can make any number of screenshots in a row without having to think about storing them as I "shoot". It does mean that I have to go in and clear that folder from time to time 😄 So, why not a just the local copy? Well, sometimes I need to access this while on my phone (a question arises, an idea pops up, etc when I'm not near my work computer).
  3. I also use Google Drive as a scratch pad for various purposes. Autosave and versioning rules!
  4. Code, scripts, configurations, schemas, graphics, etc in git Any kind of Office 365 Docs in Teams/SharePoint (where they also are versioned) System documentation in Confluence and Ardoq. Executables are archived and placed in staging folders on the file server by the build server.
  5. Lars Fosdal

    Maximum static memory

    In that case, use index arrays and reorder the indexes instead of shuffling values.
  6. Lars Fosdal

    Maximum static memory

    Are you using arrays of records? How large records? Are you shuffling whole records when sorting? If so, why not have an array of pointers to records, and shuffle the pointers instead of the actual data?
  7. Then twiddle thumbs until Delphi 12...
  8. Is there a tidy way to avoid this conundrum?
  9. Lars Fosdal

    TPopupMenu with group headers

    Perhaps post a suggestion on https://quality.embarcadero.com ?
  10. Lars Fosdal

    TPopupMenu with group headers

    Good point.
  11. BTW: What is the setting of this one? https://docwiki.embarcadero.com/RADStudio/Sydney/en/Server_Class_LifeCycle
  12. I'd try to find the classes that handles DB connectivity and see where in the codepath you are when the connection is dropped. Somewhere in that callstack there must be a logical explanation. Otherwise, add a watchdog connection that keeps things alive? Brute force, I know... but...
  13. Surely there must be some sort of mechanism that governs the lifetime of a DS session?
  14. Lars Fosdal

    TPopupMenu with group headers

    Nice idea, @chkaufmann and nglthach. I had to change it around a little to get it to work, as I instantiate the menu items at runtime. Since I don't assign an OnClick handler, I don't need to disable the entry. I mucked around with colors for a while. Currently using Bold White on DarkGrey which works "ok" for both light and dark themes. type TMenuItemGroup = class(TMenuItem) protected procedure DoAdvancedDrawItem(Sender: TObject; ACanvas: TCanvas; ARect: TRect; State: TOwnerDrawState); public constructor Create(AOwner: TComponent); override; end; constructor TMenuItemGroup.Create(AOwner: TComponent); begin Inherited; OnAdvancedDrawItem := DoAdvancedDrawItem; end; procedure TMenuItemGroup.DoAdvancedDrawItem(Sender: TObject; ACanvas: TCanvas; ARect: TRect; State: TOwnerDrawState); begin ACanvas.Brush.Color := TColors.Darkgrey; // TColors.SysHighlight; // TColors.Darkblue; ACanvas.FillRect(ARect); ACanvas.Font.Color := TColors.White; // TColors.SysHighlightText; // TColors.White; ACanvas.Font.Style := [fsBold]; ACanvas.TextRect(ARect, ARect.Left + 3, ARect.Top + 3, StripHotkey(Caption)); end;
  15. It may be because the datasnap server tears down the connection when nobody is using it. It may be configurable. What is the setting of Server.KeepAlive ?
  16. https://firebase.google.com/docs/reference/rest/database
  17. I wish the "class abstract" declaration would have prevented .Create instantiation.
  18. https://cloud.google.com/datastore/pricing
  19. Lars Fosdal

    Console Manager for the Delphi IDE

    I prefer my PS shells to be native. There is so much functionality that can be lost otherwise.
  20. Is this a known issue? If you assign an anonymous function to a property, there is no warning if the result of the function is not defined. Normally, a function where Result is not set will yield a warning. program anon_method_func_result; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils; type TConvertFunc<T> = reference to function(const invalue: string; out outvalue: T): Boolean; TValue<T> = class private FConverter: TConvertFunc<T>; public property Converter: TConvertFunc<T> read FConverter write FConverter; constructor Create; end; constructor TValue<T>.Create; begin FConverter := function(const inValue: string; out outvalue: T): Boolean begin outvalue := Default(T); // Would have expected a warning here // since Result is never set end; end; begin try try var V := TValue<Integer>.Create; V.Free; except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; finally {$ifdef Debug} Write('Press Enter: '); Readln; {$endif} end; end.
  21. It exists to balance out my inherent sense of imminent doom.
  22. Lars Fosdal

    Open PDF File

    If a user has modified the behaviour or installed an app that causes the "open" verb to behave differently than the default behaviour - that is a user problem, IMO. If you want to open a .pdf file, "open" is the way to go.
  23. Lars Fosdal

    FinTech anyone?

    I prefer regulation over learning that my debt has increased 500% the last week.
  24. Lars Fosdal

    Get Parent process Current directory

    If the parent process runs at a higher security level than your own, you will have a hard time gleaning info from the process without elevating your own process. Since CreateProcess explicitly can specify a different working directory than the current (i.e. the parent) - there is no bullet-proof way of knowing the actual working directory of the parent process.
×