Jump to content

dummzeuch

Members
  • Content Count

    2857
  • Joined

  • Last visited

  • Days Won

    101

Everything posted by dummzeuch

  1. dummzeuch

    The state of GExperts Support for Delphi 11

    There is a now an installer for version 1.3.19 Alpha of GExperts for Delphi 11.
  2. dummzeuch

    The state of GExperts Support for Delphi 11

    I'm making progress with the dockable forms. The custom drawn listboxes in both, the Editor Bookmarks and the Grep Results form should now be drawn correctly on high DPI and low DPI monitors. Other dockable forms will probably be broken now while they looked OK before. This also fixed some issues for non DPI aware versions of GExperts. Also I think the drawing errors for comboboxes should now be fixed. One major headache that's left are the icons on toolbars. They get lost when moving a form between two monitors with different DPI. No idea yet, how to fix this.
  3. The following method is supposed to find the first entry that has a FReader.Data.Time <> 0 and return this Time and the associated MeasurementTime. If it doesn't find an entry, it raises an EMyException. FReader is an object to access records like in an array or a file of record, Seek(Idx) selects the record at the Idx'th position. Which implementation do you think is easier to understand? procedure TBla.SearchValidEntry(out _UtcValid, _TimeByUtc: TMeasurementTime); var i: Integer; Utc: TMeasurementTime; IsValid: Boolean; begin IsValid := False; for i := 0 to FReader.Count - 1 do begin FReader.Seek(i); Utc := FReader.Data.Time; if Utc.IsZero then begin Continue; end else begin _UtcValid := Utc; _TimeByUtc := FReader.MeasurementTime(i); IsValid := True; Break; end; end; if not IsValid then begin raise EMyException.CreateFmt(_('%s has no valid times'), [FReader.DataFilename]); end; end; vs. procedure TBla.SearchValidEntry(out _UtcValid, _TimeByUtc: TMeasurementTime); var i: Integer; Utc: TMeasurementTime; begin for i := 0 to FReader.Count - 1 do begin FReader.Seek(i); Utc := FReader.Data.Time; if not Utc.IsZero then begin _UtcValid := Utc; _TimeByUtc := FReader.MeasurementTime(i); Exit; end; end; raise EMyException.CreateFmt(_('%s has no valid entry'), [FReader.DataFilename]); end; I realize that both use "Anty-Patterns", the first Break and Continue in the for loop, the second an Exit in the for loop. Could the implementation be improved?
  4. Not sure I understand what you mean here. Which pointer are you talking about? And why do you think it's being reset? Depending on how the reader is implemented Seek would read a record from a file (already with a buffered stream) or from an internal data structure. In this particular case it just accesses data already read into an array. It is serious in this case. The data in that file (and those associated with it) would be unusable and processing it should be stopped.
  5. That name is based on the Seek function for a file of record. Usually the reader (we have many of these for various file types) is a thin wrapper around a file of record. Depending on the file type that "thinness" varies though.
  6. dummzeuch

    D11 - A bridge too far.. :-(

    Why should they? There apparently are enough people who pay the full price for the privilege of becoming beta testers. And I have to include myself in that. (OK, it's not my own money. I wouldn't pay for this.)
  7. I think "shouting" would be a better word for what you mean. But I agree. My Comment usually looks like this: if bla then Exit; //==> Not quite as "loud" but at least a bit more visible than a simple "Exit"; Of course, given structural highlighting this is not quite as important nowadays as it was on the olden days.
  8. I for one prefer "Egyptian begin/end". And I like the name. 😉
  9. dummzeuch

    D11 - A bridge too far.. :-(

    Who says that they weren't? You left out the important second part of my sentence: "... and should have been fixed before the release "
  10. dummzeuch

    D11 - A bridge too far.. :-(

    Many of the still existing problems should have been found during the beta tests and should have been fixed before the release. The current state of D11 should be considered public beta, not ready for production, but they charge for it (quite a lot). It's a hen and egg problem really: E.g. The VCL designer is not usable in the current state (IMHO), so why should one use it? But if nobody uses it, the bugs will not be found, reported and fixed.
  11. In general, you are right. In that case I would have called the function TryGetFirstValidEntry or something similar. In this particular case it is an error if there is no valid entry. This method was only added because the first entry did not have a valid time which caused an error elsewhere. We added a search for the first valid entry because of that. If there is none, some manual action is required. Thinking about this: The method should probably be called GetFirstValidEntry rather than SearchValidEntry. Break and Continue are considered special cases of Goto by some (and I tend to agree because they usually decrease readability).
  12. Good Point. In that case I'd would have two methods: a function TryXxxx which returns a boolean a proceuder Xxxx which calls TryXxxx and raises an exception if that returns false
  13. OK, how much are you going to pay for such a filter then? 😉
  14. dummzeuch

    Reinstalling Delphi 10.4 after PC Crashed

    I'd go with CloneZilla for image backups. There is no GUI but it's simple to use, once you understood how it works.
  15. dummzeuch

    Reinstalling Delphi 10.4 after PC Crashed

    It's a common misconception that all software development should and can be done in virtual machines.
  16. dummzeuch

    The state of GExperts Support for Delphi 11

    fixed too (same fix as for the Expert Manager) The reason was that I tried to avoid flicker when adjusting for DPI changes which had the side effect of prematurely showing that form during construction.
  17. dummzeuch

    The state of GExperts Support for Delphi 11

    I only tried Delphi 11 before committing the changes. Thanks for letting me know. That is one of the dialogs I didn't test (obviously). But this is a rather odd error. I'll check that.
  18. dummzeuch

    The state of GExperts Support for Delphi 11

    I think I now got most of the modal dialogs show correctly in highDPI. There will probably be some glitches as I haven't had time to test them all yet.
  19. dummzeuch

    Persistent GrepSearch Results?

    No, I don't, I haven't memorized all features of GExperts. And I wasn't asking you.
  20. dummzeuch

    Persistent GrepSearch Results?

    There generally are two possibilities (I don't know which applies and I don't have the time to look it up): 1. It's a missing feature: In this case, file a feature request. 2. It's a bug: Then you have two options: 2.1 Find the bug and fix it 2.2 File a bug report and wait for somebody else to fix it.
  21. I must have screwed something lately, because nearly every time I close the IDE (any version of it) I get an access violation. The only reason I can think of is that I made a change to GExperts that causes it. Does anybody else, who recently compiled GExperts from sources, experience the same problem?
  22. dummzeuch

    Access violations when closing the IDE

    My guess would be: CnWizards
  23. dummzeuch

    Delphi Package Manager - choices?

    It's not as bad as it sounds. I have one version of each component package installed in the IDE and that's used at design time regardless of which version of the sources are compiled into the project. When I make any changes to the controls I keep an eye on the dfm files for properties that might not be compatible with the active version of the controls and revert them when committing to source control, but given the mature state of the components that's very rarely the case. Source code and dcus of 3rd party libraries is not in the IDE's search paths but only in those of the project. The source code itself is always an svn:external to the project sources, so it's in a subdirectory of the project and all entries in the search path are relative to the project. We always compile from sources, including 3rd party sources, and don't use packages. I have several installations of the IDEs on different computers, but that's for debugging purposes only (due to specialized hardware these programs need to access) not to keep different versions of the controls. We develop with Delphi 2007, XE2 and now 10.2. XE2 projects are slowly being upgraded to 10.2. Some 2007 projects need to stay with that version until we finally phase out the last Windows XP machines (planned for this winter), then these too will be moved to 10.2. I blogged about this several years ago (when life was still a bit simpler, but the general principles still apply http://dummzeuch.de/delphi/subversion/english.html
×