Jump to content

Bill Meyer

Members
  • Content Count

    168
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by Bill Meyer

  1. But the formatter is of little use, if it can be confused by coding style. There are many things I don't do that others have done, and in some cases, I will use a formatter to clean things up, but most of the time, I am dealing with old code in source control, and my colleagues would be very unhappy to see files reformatted. ๐Ÿ˜‰
  2. Bill Meyer

    How to manage defined list values

    A dictionary is nice, but in older versions -- I work a lot in D2007 -- then I make use of enums and const arrays. Defining them can be tedious, but maintenance is simple, and associated code is clean and easy. One thing to note on defining const arrays in the private section of a class: In D2007, I have found that defining consts in the class breaks the Ctrl-Shift-Up/Dn navigation between interface and implementation on members below the const declaration. I therefore put const declarations in the implementation section of the unit.
  3. Bill Meyer

    FastMM Full Debug Mode and JCL problem

    That is something the Delphi Unit Dependency scanner will report. https://github.com/norgepaul/DUDS
  4. Just a small thing, but in the Dependency Analyzer window, the first panel in the status bar could be made somewhat wider. It is truncating the string slightly in my project where there are over 2800 units.
  5. What sort of standards? That word is almost as useless on Google. ๐Ÿ˜‰ But I can imagine all sorts of things I would seek to make standard within an application....
  6. Bill Meyer

    articles on testable forms

    Quite a few years ago, someone wrote a series of articles on how to design forms that were testable in code. I thought it was also a great demo of why you should avoid doing so, as the added complexity was impressive. At any event, I thought I knoew who the author was, and in what magazine they were published, but I seem to have been wrong. A great deal of time on google didn't help. If anyone here recalls the articles, the magazine, or the author. please let me know. Bill
  7. Bill Meyer

    Source Export question

    I routinely use Source Export to capture snippets I then insert into MS Word as formatted text. Right now, I am attempting to do the same with Affinity Publisher as the target, but the text after paste is plain, not formatted. If I paste to MS Word, then copy the same block from MS Word and paste to Affinity Publisher, I get the desired result. But obviously, at the expense of more steps in the workflow. Is there some tool I can use to look at the raw content from the clipboard item, so I can get some idea how the Source Export differs from what I copy from MS Word?
  8. Bill Meyer

    Source Export question

    These were recommended to me: http://www.freeclipboardviewer.com/ https://nirsoft.net/utils/inside_clipboard.html MS Word, copying to the clipboard, inserts all manner of stuff. The export from GExperts was 3K; from MS Word, 44K. And I have no idea which particular chunk of content may make the difference. ๐Ÿ˜ž For now, I can export as RTF, paste into an editor and save, then import that to Affinity Publisher.I just discovered that ClipMate, which I have used for years, offers an Application Profile report which suggests in its section on Publisher that the current possibilities are only TEXT and RTF. However, the RTF fragment from GExperts pastes as plain text. If I save it in Notepad, and then Edit, Place (Import) in Publisher, it comes in with formatting, as it should. I am collecting datapoints, but I can't claim to have gained any useful insight.
  9. Bill Meyer

    Reverse scrolling TEdt?

    That aspect you should be able to resolve easily enough with a TStringList as a buffer, and just iterate through the source stringlist from bottom to top, copying lines to the destination.
  10. Bill Meyer

    TFDMemtable does not save indexdefs definitions

    For reasons I have never understood, the TDataset and its descendants stream data, but not properties. In my own work, I have had to deal with this in connection with the field properties we wish to pass to reporting code. It is all very nice to have Alignment, DisplayFormat, and DisplayLabel, but rather annoying that there is no option to include them in streaming.
  11. Bill Meyer

    news about the beta of 10.3.4

    Not yet.....
  12. Bill Meyer

    Good practices with nested methods

    A point not yet mentioned is the use of nested methods in the course of refactoring. In legacy code, it is not uncommon to find huge routines which have been thoughtlessly coded, and often with useless naming. I have found it helpful to remove to nested methods the chunks of code which might better be placed in a private class, as Arnaud suggests. Making them methods of the class in which you are working often makes no sense because these routines may have no practical value out of the context in which they were found. In new design, their use is harder to justify, I think.
  13. Not obvious, to be sure. I am still cursing the new approach, which seems a good deal more complicated than necessary.
  14. Over the years, I have used several different report products, and none of them have been what I would consider excellent. I would be curious to hear from others about their experiences. The product I currently use focuses too much on static designs, and we tend to need dynamic construction, instead. My primary concerns would be: Product in active and continuing development Responsive customer support Well suited to dynamic report construction, use of subreports, good graphing, support for RTF, graphics Good documentation, meaning the basics are covered, but real depth on more complex operations At present, I am battling some defects which are a) very hard to reproduce consistently, and b) aggravated by breaking changes across versions. It's hard to clearly identify all the aspects I might call essential, but any of you who have built reports with embedded subreports, user options which affect layout, and dynamic construction are likely to recognize the challenges.
  15. Bill Meyer

    With's the deal with "With"?

    This subject came up yesterday at the office. I could not recall what topic it was in Knuth's magnum opus where he explains that although goto can always be avoided, there are rare cases in which its use brings performance benefits. Seems like a sorting discussion. Quicksort?
  16. Bill Meyer

    With's the deal with "With"?

    Oh, yes. you can pass 1..n units. Of course, what you may get, with name collisions -- which will not be reported -- is up for grabs. (Note that FixInsight now checks for with clauses which use more than one unit.)
  17. Bill Meyer

    With's the deal with "With"?

    The inherent dangers of 'with' are at their worst with such usage as: with UnitA, UnitB do.
  18. Bill Meyer

    Delphi and MVVM Framework

    And that's fine, but doesn't negate it being a bad fit for Delphi, does it?
  19. Bill Meyer

    Delphi and MVVM Framework

    Nor should we be surprised, as MVVM was evolved into by people working every day in C# and with XAML. This happened, I am told, as people simply found a comfortable approach in that environment, not because they sought to copy an idiom from another language.
  20. Bill Meyer

    Report components: good, bad, ugly

    Interesting. Had not heard of Rosinsky before.
  21. Bill Meyer

    Do we have a spam problem?

    And they are back. ๐Ÿ˜ž
  22. Bill Meyer

    On The Design Of Uses Clauses

    CnPack does a quite job of finding those which are not needed. Pascal Analyzer Lite does a good job identifying those which can be moved down to implementation. As the the frequency or magnitude of the process, it depends on what you are doing. In my case, a large legacy code base needs cleaning. That becomes tedious, and false positives are not "quite acceptable." After a hundred or so modules, however, it's easier to overlook them.
  23. Bill Meyer

    Running the IDE in a VM on Mac Book Pro?

    "Never" breaks down? Arguments are never won with hyperbole. Yes, there are people who claim Macs don't break down, but in my experience, those claims are pure fantasy, and will bear no scrutiny. As to laptops, I know of nothing which loses value more rapidly, regardless of brand. The investment value of a computer is a function of what you are able to do with it that earns value. Computers in general rabidly lose value, and lap[tops are the aggravated case of the class.
  24. Bill Meyer

    On The Design Of Uses Clauses

    I have had some correspondence with them. At present, the problem is that the project is huge, and some of these issues depend on third-party components, as well. One example I have already communicated to them is with respect to DevExpress components, where there are numerous units involved in various features, such as look and feel, which they identify as removable, but which are required. It is not a huge issue, and CnPack is similarly confused by DevExpress, so I generally remove them, and the file save puts some back in.
  25. Bill Meyer

    On The Design Of Uses Clauses

    I can attest that the Peganza Pascal Analyzer Lite Uses Report has been very helpful. Note, however, that it is by no means perfect. 1. It seems always to report falsely that a class helper unit is not needed. 2. It tends to suggest removing units which are actually needed. 3. It sometimes asserts a unit ref can be in implementation, when the IDE wants to replace it in interface. 4. Form inheritance complicates the issues. That said, it is the only tool I am aware of which provides assistance in finding which unit refs can be demoted to implementation. For removal of unused units, I prefer CnPack, which does a test compile, and works with the map file, I believe.
ร—