Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 04/01/19 in all areas

  1. Just in time before April fools day 2019 there is the new GExperts release (it’s still 2019-03-30 so you are safe πŸ˜‰ ). Please be aware that I mostly work with Delphi 2007, so this version can be regarded as tested quite well, followed by Delphi XE2. The others are only known to compile and new features are usually tested superficially with all versions. This is particularly true for Delphi 6/7 and 2005/2006. If you want to help by testing new versions before I release them, please contact me [...] https://blog.dummzeuch.de/2019/03/30/gexperts-1-3-13-experimental-twm-2019-03-30-released/
  2. Aren't you meant to do work in a background thread?
  3. Stefan Glienke

    Initialize local variables at declaration

    https://quality.embarcadero.com/issues/?jql=text ~ "inline variable" and affectedVersion in ("10.3 Rio"%2C "10.3 Rio Release 1") and status not in (Resolved%2C Closed)
  4. Stefan Glienke

    Initialize local variables at declaration

    IDE tooling does not work properly and some of it completely stops, Also inline variables of a managed type are not always properly initialized. As much as I like this feature syntax wise - I would stay away from it for now 😞
  5. Stefan Glienke

    Initialize local variables at declaration

    This was implemented 10.3 via inline variables. It however is not possible to declare the variable in the old way plus initialize it - you have to declare it inline: procedure DoSomething; begin var MyVar: Integer = 23; // end; You can even omit the type there and it will automatically be Integer: procedure DoSomething; begin var MyVar = 23; // end; See http://blog.marcocantu.com/blog/2018-october-inline-variables-delphi.html
  6. Will have a look when I am back next week.
  7. I had to look them up myself, so it took a while but here they are, the changes, bugfixes and improvements between the GExperts 1.3.12 (released 2018-12-22) and 1.3.13 (released yesterday, 2019-03-30😞 https://blog.dummzeuch.de/2019/03/31/changes-between-gexperts-1-3-12-and-1-3-13/
  8. jbWishmaster

    Use graphics32 to draw rounded rectange with gradient + border

    try the following code, it works for me. procedure Draw_PannelFrame_Flat_Rounded(Dst : TBitmap32; R: TRect; Sides : TSides; Color : TColor32; PenStyle: TPenStyle; StrokeWidth : Single = 1; Radius : Integer = 6) ; var Points : TArrayOfFloatPoint; Dashes : TArrayOfFloat; FRect : TFloatRect; begin FRect:= FloatRect(R); case PenStyle of psSolid: begin Points:= Build_RoundRect(Radius, FRect, StrokeWidth * 1); PolyPolylineFS(Dst, PolyPolygon(Points), Color, True, StrokeWidth * 1, jsMiter, esSquare); end; psDash: begin // Dashes := MakeArrayOfFloat([10, 3, 3, 3, 3, 3]); Dashes := MakeArrayOfFloat([6, 2, 6, 2]); Points:= Build_RoundRect(Radius, FRect, StrokeWidth * 1); DashLineFS(Dst, Points, Dashes, Color, True, StrokeWidth * 1); end; psDot: begin Dashes := MakeArrayOfFloat([2, 2, 2, 2]); Points:= Build_RoundRect(Radius, FRect, StrokeWidth * 1); DashLineFS(Dst, Points, Dashes, Color, True, StrokeWidth * 1); end; psDashDot: begin Dashes := MakeArrayOfFloat([6, 2, 2, 2]); Points:= Build_RoundRect(Radius, FRect, StrokeWidth * 1); DashLineFS(Dst, Points, Dashes, Color, True, StrokeWidth * 1); end; psDashDotDot: begin Dashes := MakeArrayOfFloat([10, 2, 2, 2, 2, 2]); Points:= Build_RoundRect(Radius, FRect, StrokeWidth * 1); DashLineFS(Dst, Points, Dashes, Color, True, StrokeWidth * 1); end; psClear: ; psInsideFrame: begin Points:= Build_RoundRect(Radius, FRect, StrokeWidth * 1); PolyPolylineFS(Dst, PolyPolygon(Points), Color, True, StrokeWidth * 1); end; psUserStyle: ; psAlternate: ; end; end;
  9. There is a bit more to it than simply following a mantra - here is some more food for thought: https://www.thoughtworks.com/insights/blog/composition-vs-inheritance-how-choose
  10. It always depends on particular situation. Both composition and inheritance have their place. Sometimes you can use either, sometimes there is a clear distinction. Some tips that can help you decide. IS-A - inheritance - Sword IS-A Weapon so Sword should inherit Weapon HAS-A - composition or aggregation - Unit HAS-A Weapon so Unit can be composed with Weapon object With simple classes that satisfy IS-A condition plain inheritance will do. With more complex classes, you may want to use composition or delegate some behavior to other classes, especially if that behavior can be reused independently. Delegation - delegate behavior to another class when it is not an objects responsibility to implement behavior on its own Composition - when object is gone the composed objects are also gone - when Pizza is gone so are the ingredients Aggregation - class is used as a part of another class, but still exists outside that other class - when Unit dies Weapon still exists
  11. dummzeuch

    What to do with unsupported components?

    I think you found all options. There are no others. I would Kick the person who bought this component without source. (Who was / is an idiot, nobody did that even back when Delphi 7 was new.) Suggest not updating to Delphi 10.3 but 10.2 (which will be rejected) Go with the DLL solution.
  12. I have tested 10.3 and I found in old Android, UI can not updates even if it is a simple test APP, no AdMob in it. I new a project in 10.3, just a TForm with a TButton and a TLabel and a TMemo. There just has two line in Button1Click: Label1.Text := 'aaa'; Memo1.Lines.Add('bbbb'); This test APP can work fine in my mobile with Android 8. But, in mobile OPPO find 7 with Android 5, mobile XiaoMi with Android4.4, a Android PAD with Android 4.4(CPU is AllWinner A33, RAM is 1G bytes), it can install, but when I touch the Button1, nothing happened on the screen. In debug mode, I place a break point at the code, touch the Button1, I can see IDE stopped at the break point, after I press F9, it continues run. And I touch the Button1 again, I can see IDE stopped at the break point again, it proved that the code is running, but nothing happened on the screen. The same APP compiled with D10.2.1, it can works fine on all device I mentioned above. -------------------- Now, I installed 10.3.1 EC version, and this issue is OK.
Γ—