Jump to content

Fr0sT.Brutal

Members
  • Content Count

    2268
  • Joined

  • Last visited

  • Days Won

    46

Everything posted by Fr0sT.Brutal

  1. I would argue on that. Several times I accidentally got my commits overridden and restored them undamaged with git reflog.
  2. Fr0sT.Brutal

    Is interposer class really best to customize TPanel.Paint?

    It's just a common practice. You can easily define a standalone class with such method if you want. But overriding and inheriting is more powerful solution. Everything depends on your needs
  3. Fr0sT.Brutal

    Is interposer class really best to customize TPanel.Paint?

    Well, it's somewhat an overhead. My solution was to assign an event handler like with any component: Panel1.OnPaint := Form1.Panel1Paint Thus you can have special paint for every of your panels Alternatively, if you prefer storing methods in the object itself, you can just use a flag and add the method: TPanel.Paint begin if DoCustomPaint then CustomPaint; end; Panel1.CustomPaint := True but then all panels will share the same painting method
  4. I added shortcuts to my file explorer with main commit/push/pull/log commands and rarely use context menu. What do you mean? I use SmartGit for SVN projects and find it quite awkward
  5. Fr0sT.Brutal

    Is interposer class really best to customize TPanel.Paint?

    This means all the visual component mess: separate package, installation, registration, replacing existing panels, bundling it with an app etc. TPanel = class(Vcl.ExtCtrls.TPanel) protected procedure Paint; override; public OnCustomPaint: TNotifyEvent; end; procedure TPanel.Paint; begin if Assigned(OnCustomPaint) then OnCustomPaint(Self) else inherited; end; I would do something alike
  6. I'd advice you to get rid of threads and try very-very simple case. Like Angus said, threads in ICS are pretty advanced thing
  7. I would check if your thread stuff is correct. With ICS you usually don't need threads. procedure TServerThread.ScDataAvailable(Sender: TObject; ErrCode: Word); begin if ErrCode = 0 then begin Socket := TwSocketClient(Sender); while (True) do begin BytesReceived := Socket.Receive(pBuffer, 32768); if BytesReceived <= 0 then Exit; end; end end This is wrong. I guess you've come from blocking socket world. ICS is async so you've to learn its completely different approach.
  8. Fr0sT.Brutal

    New annoying IDE malfunction

    I wasn't aware of it too; so at least one useful thing PP did for me. Though I haven't got the need for ignore list at all until he appeared...
  9. Fr0sT.Brutal

    TFtpClient: Very low speed on transfer data

    $10000 is harder to misspell 😉
  10. Fr0sT.Brutal

    enums with duplicate values

    Not tricky, they just have no RTTI 😄 Interesting ability, wasn't aware of it
  11. Fr0sT.Brutal

    When can Class.Create fail?

    ...and should never raise exception itself
  12. There's a strong opinion pro using parameters for the sake of testability. Some people even insist on using pure functions (those which do not use external variables at all) as much as possible. But everything depends on your needs and use cases. My opinion is to try with parameters; if you need to tie some values to an object, then use fields
  13. Fr0sT.Brutal

    Compiler capability defines and more

    Include files for checking compiler versions and capabilities. Useful for developers of libs/components that have to support multiple compilers. https://github.com/Fr0sT-Brutal/Delphi_Compilers Additionally, there are files for checking current compiler settings, some cross-compiler and cross-platform defines and cross-compiler declarations.
  14. Fr0sT.Brutal

    Compiler capability defines and more

    Likely it is. I looked at that file and got lost in these loooong nested defines so won't argue
  15. Fr0sT.Brutal

    Compiler capability defines and more

    I'm glad to help 🙂 Well, I've never used JEDI as is right because of its monsterosity. Moreover their basic define system has the critical weakness - it must be updated for every new compiler version; and it's DAMN long while I wanted short and universal solution. Caps are compiler capabilities... I don't remember why I called them so. SUPPORTS is longer but acceptable as well, agreed. You're right, that was previous, quite weak, sample. I already changed it to check for 64 and 32 bitness explicitly. Oh and there's another bug indeed - I used "X" letter in defines which means Intel arch. In fact, it was meant to be CPU32/64 (FPC-style) which are defined for Delphi in XPlatformCompat.inc file.
  16. I just thought that change would shed some light on what was done for OSX because symptoms seem similar
  17. Calling apps from server is OK. This is how CGI works.
  18. http://docwiki.embarcadero.com/RADStudio/XE8/en/What's_New_in_Delphi_and_C%2B%2BBuilder_XE8#Changes_in_LongInt_and_LongWord_Size_for_64-bit_iOS_Platforms
  19. Fr0sT.Brutal

    TFtpClient: Very low speed on transfer data

    Try to increase socket buffers
  20. Fr0sT.Brutal

    ICS v8.64 can't compile on Delphi 7

    Yep I've seen similar cases, mostly they're solved by conditional usage of AnsiStrings unit controlled by HAS_ANSISTRINGS define Yes, still not implemented. I plan to make additions in the near future upd Added 10.4 and some more defines for previous versions
  21. IMHO: 1. Think if a feature could be useful for others, if yes - suggest it to developer 2. Try to implement it by inheriting, class helpers, class hacks etc 3. If nothing helps, go the way of source modifying. But prepare to handle all updates manually. Luckily most of this work could be done with source control systems. I keep several personally needed changes to ISC, VTV, FastReport but where possible I use class helpers (VTV) or inheritance (ICS). Sometimes the following trick helps a lot: type class TSomeStdClassExt = class(TSomeStdClass) ... // some additional stuff end; class TSomeStdClass = TSomeStdClassExt; var someobj: TSomeStdClass; // will be of class TSomeStdClassExt actually It is especially useful for visual controls b/c you don't have to register new control, replace old ones with new ones and so on.
  22. Fr0sT.Brutal

    ICS v8.64 can't compile on Delphi 7

    Well, when you buy a license for some version, you get all previous ones so there's nothing complicated in having all required versions available. Anyway you can contribute to Jedi inc file or to my abovementioned repo to make info available for others.
  23. Fr0sT.Brutal

    ICS v8.64 can't compile on Delphi 7

    Most of these checks could be performed with IF DECLARED clause. Thanks to it very few features must be defined manually, just some language features or unit relocations. I maintain a repo with defines for main compiler features here so use the provided info freely or make PR's/issues to add something that is missing.
  24. Alas... I only played drums for half a year ten years ago so don't fit the requirements 😞
  25. Fr0sT.Brutal

    ICS v8.64 can't compile on Delphi 7

    IDK what things you mean. Backward compatibility is pretty strong in current versions as main changes happened in D2009..XE2. So newer versions require very little changes, especially if you don't use newest features (and you have to avoid them if you care about older versions)
×