Jump to content

Alexander Elagin

  • Content Count

  • Joined

  • Last visited

  • Days Won


Alexander Elagin last won the day on September 11

Alexander Elagin had the most liked content!

Community Reputation

47 Excellent

1 Follower

About Alexander Elagin

  • Birthday September 20

Technical Information

  • Delphi-Version
    Delphi 10.1 Berlin

Recent Profile Visitors

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

  1. Alexander Elagin

    Call to create a form to return a value?

    That's because the form must have a field or property of this type (like Customer: TCustomer), otherwise there is no place to copy the data from. Alternatively, if the form already has all the necessary data, you can manually fill the resulting record: .... if Result then begin Value.name := F.SomeNameField; Value.age := F.SomeAgeField; end; ....
  2. Alexander Elagin

    Call to create a form to return a value?

    It should have been class function Execute(out Value: TCustomer): Boolean; and TCustomer declared before the form, then everything would work.
  3. Alexander Elagin

    Call to create a form to return a value?

    Glad that it worked. Btw, now there is no need to have the FormClose handler with Action := caFree - the form will be freed by the calling class function (note the F.Free call), so you can remove this method too.
  4. Alexander Elagin

    Call to create a form to return a value?

    Please check the controls in TCurrentCustJobsForm. The OK button (or whichever control is closing the form) must have ModalResult property set to mrOk or mrYes.
  5. Alexander Elagin

    Call to create a form to return a value?

    type TCurrentCustJobsForm = class(TForm) .... public class function Execute(out Value: Integer): Boolean; end; ...... class function TCurrentCustJobsForm.Execute(out Value: Integer): Boolean; var F: TCurrentCustJobsForm; begin F := TCurrentCustJobsForm.Create(nil); try Result := IsPositiveResult(F.ShowModal); if Result then Value:= F.SomeFieldOrPropertyOrEtc; finally F.Free; end; ...... if TCurrentCustJobsForm.Execute(iRecord) then (* Value selected and valid *) else (* user closed the form without selecting anything *)
  6. Alexander Elagin

    Rules for changing cursor to HourGlass and back

    Today one cannot write two simple methods and be happy. There must be classes, interfaces, factories, patterns etc - that's the serious approach . Have you seen the FizzBuzz Enterprise Edition ?
  7. Alexander Elagin

    Rules for changing cursor to HourGlass and back

    I usually use a simple class with a counter and two methods, like BeginWait and EndWait. The first one increments the counter and sets the cursor to crHourglass if the counter was 0, the second one decrements the counter if it is positive and reverts the cursor back to crDefault when the counter is 0. Of course, with the obligatory try..finally to make sure that each BeginWait has a matching EndWait and with critical sections if multithreaded.
  8. Alexander Elagin

    Recommendations on visual design

    I'd use the DevExpress controls anyway, nothing can beat them in the VCL design. Just a single dxLayoutControl with manually added custom groups and maybe a few cxPageControls placed into it if necessary (and ActionList+dxBarManager+cxStatusBar etc for the toolbars) can easily handle this layout, and the latest versions are significally faster than the initial releases of the said control. The design phase may look tedious but once everything is ready and locked where necessary there will be no problems in maintaining/extending/modifying the UI.
  9. Alexander Elagin

    news about the beta of 10.3.4

    I think it has to be XE and then XE Makes as much sense as the current silly naming convention.
  10. Alexander Elagin

    Firebird Encryption options

    Devart has a Secure Bridge suite of components to protect a database connection (https://www.devart.com/sbridge/). I have not used it but maybe you could have a look if it suits your needs. I'd rather replace a direct client-server solution with a 3-tier one, thus totally isolating the database from network access.
  11. The IDE functionality in 10.3 is fundamentally broken. Don't try to find logic in its look or behaviour...
  12. Alexander Elagin

    Shortcut clashes

    OK, understood. I think that these shortcuts, Ctrl-Alt-C (copy entity) and Ctrl-Alt-V (paste entity) were initailly selected as logical extensions to common Ctrl-C and Ctrl-V, but the IDE has better use for them.
  13. Alexander Elagin

    Shortcut clashes

    There is another valuable shortcut (Ctrl-Alt-V) which is used by IDE to open the Event log window, but MMX re-registers it for some action I always have to reconfigure back.
  14. Alexander Elagin

    Best practices for system migration?

    No, VMware workstation stores all files for one virtual machine (vmx, vmxf, vmdk, nvram) in a single directory which you can freely move around. The next time you open this machine it will simply ask if it was copied or moved (to update uuid if necessary).
  15. Alexander Elagin

    EmptyString constant

    ... unless the string is a ShortString, which was the default and only string type in Turbo Pascal days ;-). Yes, I am that old. Then having predefined constants for the empty string and pointer made sense. Since the introduction of AnsiString/UnicodeString, all these constants became useless and are kept in the RTL due to sentimental reasons, I think. And the IsNullOrEmpty is a C#ism which does not belong to the Pascal world and makes no sense at all.