Jump to content

Attila Kovacs

Members
  • Content Count

    1977
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by Attila Kovacs

  1. Attila Kovacs

    Any advice when to use FileExists?

    I've never mention any catch and re-raise.
  2. Attila Kovacs

    Any advice when to use FileExists?

    Throw them an exception. Then they (your callers) will start checking by themselves and throwing an exception to its callers etc.. at the end you will have a solid app.
  3. Attila Kovacs

    Any advice when to use FileExists?

    completely superfluous, then for each File in MainPath do if the file can disappear between these two lines if FileExists(File) then it could also disappear between these two lines If _IsFileValidForParsing(File) then (then you decide to create the file, it could be there again) etc.. FileExists and co. are a total nonsense, then it's returning a momentary state. Put a try except around any IO and handle the last os error if apply.
  4. Attila Kovacs

    Design Packages list is not resizable

    There is a bigger problem with this form, you can't select and copy the path on the bottom. Both could be done from an expert, and would be the preferred way, before someone redesigns the whole thing. (No, it's a Label with the path <o>)
  5. Attila Kovacs

    Delphi compiler need to be opensourced

    Tangentially on topic: is it possible to exclude this particular thread from the Activity feed? (I mean me for myself, is there any setting for that)
  6. Attila Kovacs

    Slow PgUp in TVirtualStringTree

    No. Memory will be remapped from X in Y length. Now, that you are scrolling backwards, it remaps every time a X-rowcount+Y chunk. Maybe you could read something from X-Y+rowcount but how would you know that the memory will be mapped and what Y is. But as I said I have no experience with this. Maybe somebody has some other thoughts on it too.
  7. Attila Kovacs

    Slow PgUp in TVirtualStringTree

    In the first case VT nodes are getting its memories after the TestArray, and they will be swapped.
  8. Attila Kovacs

    Slow PgUp in TVirtualStringTree

    Yup. App takes over 200MB RAM and windows starts swapping, you can see the Page Faults in the task manager. Also thats why backwards is slower. I have no clue how can one influence that, never had a problem like that.
  9. Attila Kovacs

    Slow PgUp in TVirtualStringTree

    Just tried the exact same demo with 7.2.1 and 1million root nodes, it's fast as lightning in both directions.
  10. Attila Kovacs

    Issue with code-editor toolbars

    @Yaron Check "Always show designer items" under Environment Options / Tool Palette, and voila
  11. Attila Kovacs

    Issue with code-editor toolbars

    Isn't that, that you can pull out any toolbar to undocked state, close it and save desktop settings?
  12. Attila Kovacs

    Slow PgUp in TVirtualStringTree

    I can't exactly remember but I can see in my sources that I'm caching (also calculating myself, only once) the Nodeheight's and returning it in VSTMeasureItem event for VT. This would not make any sense if it wasn't too slow for me too, back to the days. Can't remember.
  13. Attila Kovacs

    Decorating read-only controls

    @Der schöne Günther Indeed. And also funny. But does not apply then styles are overriding every design time decorations except I'm implementing one custom hook for every different control types.
  14. Attila Kovacs

    HELP: Decoding of data stored in array of char - RFID tag's

    Don't do that.
  15. Attila Kovacs

    TJson - Strip TDateTime property where value is 0?

    Too bad you can't register a converter for simple types.
  16. Attila Kovacs

    TJson - Strip TDateTime property where value is 0?

    Kinda. Convert it first with ObjectToJsonObject then remove the time 0 pairs then generate the string. Or create a json wrapper for TDateClass where HasDate and NoDate are strings. In this case you have to take care of the Date-Format. btw. "1899-12-30T00:00:00.000Z" is a valid date. 🙂
  17. Attila Kovacs

    Named pipe failure, multithreading and asynchronous I/O

    I can't recompile it on w7 but the exes are working just fine in a w7 VM for me.
  18. Attila Kovacs

    Named pipe failure, multithreading and asynchronous I/O

    I'm pretty sure. Win10
  19. Hi, how can I declare a TArray<IFoo> where the elements are weak referenced?
  20. Attila Kovacs

    How to create a weak array?

    @Stefan Glienke thanks.
  21. Attila Kovacs

    Named pipe failure, multithreading and asynchronous I/O

    It works fine on Berlin U2. Edit: 10.3 CE too.
  22. Attila Kovacs

    preventing my program from stealing the focus

    The simplest way, without having to reimplement a couple of things from the original CMShowingChanged is leaving the form on wsMinimized and then calling a SW_SHOWNOACTIVATE: private procedure CMShowingChanged(var Message: TMessage); message CM_SHOWINGCHANGED; procedure TForm3.CMShowingChanged(var Message: TMessage); begin inherited; ShowWindow(Handle, SW_SHOWNOACTIVATE); end; This will also result a "restore" animation, if enabled.
  23. Attila Kovacs

    preventing my program from stealing the focus

    I'd try to override the "show" process and call showwindow with SW_SHOWNOACTIVATE. Maybe there is already something in VCL.
  24. Attila Kovacs

    A directory translate

    @limelect ok, sorry but I'm not operating with explorer at all. I'm using Far Manager. btw. you could lookup libraries/pictures from the mentioned list and fire the same location in a new explorer window without knowing its real location.
×