Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 11/20/18 in all areas

  1. See my latest blog post at http://blog.marcocantu.com/blog/2018-nov-vcl-permonitorv2_getsystemmetrics.html
  2. Fellow Delphi Developers! StyleControls VCL 4.18 just released! http://www.almdev.com In this version we continue to improve our solution to create UWP-like applications. Also we updated UWP MultiView demo template with VCL Styles and with custom adjustment (now you can see styled second UWP form and styled UWP form for messages). These demos show that you can create styled application, in which all forms will have system DWM shadow, with custom design or with VCL Styles!
  3. The Owner is not necessarily the form. Sometimes the owner is a TFrame descendant or may even be nil. Iterating the Parent until a TCustomForm is found is usually the way to get the required form instance. Perhaps iterating until Parent is nil is another valid approach. That would also cover the case where one form is parented into another one.
  4. Primož Gabrijelčič

    For..to..step in Delphi

    Today I was porting some legacy code and noticed a weird warning: Weird warning, I thought. Obviously the loop variable can be passed as a var parameter as the code compiles. Why a warning and not an error, then? Stefan later reminded me that warnings are quite extensively covered in the documentation. Indeed, the docs for W1015 clearly state: Ah! So they actually want to say “… FOR-Loop variable ‘i’ should not be …” Furthermore, this brings several interesting possibilities to the table. For example, we can finally write for..to..step loops in Delphi! program ForInStep; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils; procedure Step(var loop: integer; step: integer); begin loop := loop + step - 1; end; var i: integer; begin for i := 1 to 10 do begin Writeln(i); Step(i, 2); end; Readln; end. Indeed, this works! Danger, Will Robinson! To be clear, I do not recommend writing such code. If you get warning W1015, you should rewrite the code. Such code is hard to maintain and will eventually cause you big problems. I certainly did fix the original code although the method that was called from the for loop did not modify its var parameter. (It was declared var and not const because the method was written before const parameters were introduced to Delphi. Oh, the joys of legacy code!)
  5. FredS

    GetIt pkg mgr problems

    No idea, I've moved back to Berlin when it became clear using Tokyo was a waste of time.
  6. Der schöne Günther

    UWP-like Applications with custom design or with VCL Styles

    Do you have plans for incorporating the "real" thing as this would be possible with "XAML Islands" [1] [2] or will you stick with mimicking? [1] https://docs.microsoft.com/windows/uwp/xaml-platform/xaml-host-controls#uwp-xaml-hosting-api [2] https://github.com/Microsoft/Windows-appsample-Xaml-Hosting
  7. The joys of packages as a library author. Looks like commit ace9e54 only modified the 10.2 package. That commit removed the following files: MARS.Client.Messaging.Resource.pas MARS.Client.SubResource.JSON.pas MARS.Client.SubResource.pas MARS.Client.SubResource.Stream.pas Just remove them from the contains in the MARSClient.Core.dpk and you should be able to compile.
  8. You can checkout https://github.com/KodeZwerg/versionselector to see how different delphi versions work with registry. All legit stuff from early up to Tokyo 10.2.3 is supported.
  9. 1 point
    until
    https://conf.spring4d.com/
  10. One nice feature of the Delphi IDE that I keep forgetting are Component Templates. That means you drop and customize one or multiple components on a form and then give them a new name so you can easily create them again on a different form in a different program. https://blog.dummzeuch.de/2018/11/03/creating-component-templates-in-delphi/
×