Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 07/15/22 in Posts

  1. No you don't. I understand why you used it but there are always better ways to solve a problem than using [weak]. Contrary to what the documentation states [weak] isn't named named after the type of reference. It's named after the design skills of people who choose to use it to manage references. 🙂
  2. Use full (absolute) path for JpgFileName and dest_path, such as F:\img etc.
  3. vfbb

    ANN: Skia4Delphi v3.4.0

    Skia.pas has a version: https://github.com/skia4delphi/skia4delphi/blob/d6feb7784c90623cef5b8948b12a5239eea2e4a0/Source/Skia.pas#L36 The latest version is 3.4.0. We will release a major version in few weeks.
  4. I think you would benefit from taking a break and acquiring some Delphi custom component development and debugging skills. Impatience to do something when you have not yet acquired the necessary skills and knowledge usually leads to frustration. The basics of component development and debugging have not changed much so even older books/guides are still useful. Ray Konopka wrote some early books on Delphi component development any which would be a good resource if you can get your hands on one.
  5. Dalija Prasnikar

    Custom Component : onDestroy delphi creates endless error messages

    Weak references are integral part of ARC as memory management system. Because ARC was not main memory management system in classic compiler and was just an "add on", most code didn't require them or could use pointers that are equivalent of unsafe attribute. Support for weak references in classic compiler was added only after they were added on mobile ARC compiler which requires weak references in order to have functional memory management system. Proper coding pattern for ARC memory management would indeed require using weak attribute in the similar circumstances (code) OP had. In other words, if we would rewrite RTL and VCL to follow ARC rules then the OP original code would be the correct one, and we would not need nor have TComponent notification system.
  6. Dalija Prasnikar

    Custom Component : onDestroy delphi creates endless error messages

    Weak attribute only works on interface references, not on object references. In your case, with TComponent reference, compiler just ignores weak attribute.
  7. Renaud GHIA

    Free Pascal Web Assembly Objects

    I confirm you that the webassembly target of freepascal begin to be very robust if you work with the main branch of FPC. All main features of pascal object are supported.Today the compatibility with delphi code is awesome and far superior than with pas2js (where compatibily was already awesome). I already have many delphi units that also compile under freepascal with webassembly target.
  8. Sherlock

    Scaley drawings

    Have you tried your code on Windows set to 150% or any other scale? You need to find out, what the DisplayMetrics are and react accordingly. I use something like this if TBehaviorServices.Current.SupportsBehaviorService(IDeviceBehavior, DeviceBehavior, Context) then begin DisplayMetrics := DeviceBehavior.GetDisplayMetrics(Context); Scale := DisplayMetrics.ScreenScale; ppi := DisplayMetrics.PixelsPerInch; end else ShowMessage('Help?!');
  9. Alexander Halser

    MacOS: How to remove ambiguous Developer ID certificates?

    Funny you say that, Sherlock! I did. And they answered. Do you want a bonmot? Apple responded: Uhm. Additional certificates?
  10. Make a cool demo using Skia4Delphi and Delphi 11.1 Alexandria, post it on GitHub, be the envy of all your friends, and maybe win a new M1 Mac Mini! Visit the official contest page: Skia4Delphi GUI Beauty Contest See also the latest Skia4Delphi webinar: Supercharge Your User Interface with Skia4Delphi - Webinar Replay - YouTube
  11. Remy Lebeau

    How to know how app was started

    On Android, there is a property in FMX (I can't find it right now) that contains the Intent that started the app if it was not already running. You can check that Intent at startup to see if your app was started because of a notification, a file open, etc, depending on how your app manifest is configured. If your app was already running when the Intent is sent, you can register with FMX's RTL to receive TMessageReceivedNotification messages, which will carry the Intent. I'm not sure of the equivalent for iOS, though I do notice that TPushRemoteNotificationMessage and TPushStartupNotificationMessage exist for it.
  12. Uwe Raabe

    DPI and Scaling Discussion

    In Delphi 11 there is an option to speed up VCL styled applications which is probably not commonly known, because it wasn't communicated much: Vcl.Themes.TStyleManager.UseParentPaintBuffers While the linked doc is pretty much useless, the common description gives some more insight: Styles Performance Improvements
×