Jump to content

dummzeuch

Members
  • Content Count

    2855
  • Joined

  • Last visited

  • Days Won

    101

Everything posted by dummzeuch

  1. After trying to get anything useful out of chatGPT and wasting a lot of time to fix all the errors in the answer(s) I got, I am all for banning it from SO. I'm not sure it will work though. The dilution of web search results with plausible but wrong content generated by AI has already started and we will see a lot more of it. Of course there was already a lot of garbage on the web to start with, but now it has become much easier (-> cheaper) to produce it.
  2. dummzeuch

    App plugins

    Alternatively there are quite a few other scripting engines, like the one included in Fastreport (Pascal, Basic, C, if I remember correctly) or DWScript (formerly known as Delphi Web Script, but definitely not restricted to Web usage). Extending a program by such an engine mostly means to provide an interface for these scripts to access the programs data and optionally the UI. It can be quite challenging to determine what to expose and in which way.
  3. dummzeuch

    File Search

    You should specify the complete path to exclude: C:\Windows Not just Windows
  4. dummzeuch

    File Search

    This command also searches all subdirectories and only later applies a filter removing all entries that start with c:\Windows\. The function @programmerdelphi2k gave you is actually more efficient because it doesn't descend into the windows directory at all.
  5. dummzeuch

    File Search

    I think the word you're looking for is "skip". But yes that's exactly how to implement this.
  6. dummzeuch

    Delphi Debugging Help

    What exactly is it you are struggling with? Basically, you enable the debug options in the compiler options dialog, build and start your program from the IDE with F9. That's about it.
  7. dummzeuch

    Delphi Debugging Help

    If he qualifies for using it. An old, legal Delphi 7 license can still be used for anything, including professional programming. The CE license is very limited in what it allows.
  8. dummzeuch

    Optimization On or Off ?

    None of configurations create a map file by default.
  9. dummzeuch

    Use case or if else ?

    Unfortunately that would allow for yet another possible problem: What if two or more of these strings were identical? In that case multiple different DecodeExportXxx calls would be made: if aMessageType = 'EXPREG' then DecodeExportReg(vDoc, aCdn, aRequestCorrelation, aMessageText); if aMessageType = 'EXPREG' then // <== typo here DecodeExportAcc(vDoc, aCdn, aRequestCorrelation, aMessageText); When using "else if", in theory the compiler could create a warning in that case because the second if for that string could never be executed. But I doubt that the Delphi compiler actually is that good at analysing the code. if aMessageType = 'EXPREG' then begin DecodeExportReg(vDoc, aCdn, aRequestCorrelation, aMessageText); end else if aMessageType = 'EXPREG' then begin DecodeExportAcc(vDoc, aCdn, aRequestCorrelation, aMessageText); // <== possible compiler warning here end;
  10. I would like to have a set of some objects of the same class e.g. TEdit. Of course TEdit is not an ordinal type, so set of TEdit won't work. Is there some (generics?) container type that lets me Add Object instances to it, ignoring duplicates Check if an object instance is in the list Or even better lets me enumerate over all the object instances in the list So I can do something link this: var EditSet = TSet<TEdit>; ed: TEdit; begin EditSet.Add(Edit1); EditSet.Add(Edit1) EditSet.Add(Edit2); EditSet.Add(Edit4); if EditSet.Contains(Edit1) then Edit1.Text := 'Was in set'); if EditSet.Contains(Edit3) then Edit3.Text := 'Was in set'); // or even better: for ed in EditSet do ed.Text := 'Was in set'; end; I'd prefer using something ready made from the RTL, if it exists.
  11. dummzeuch

    Use case or if else ?

    I'm not sure how efficient the implementation of IndexStr is. Assuming it's a linear search, the case statement is worse on two accounts: 1. It more difficult to read and understand. 2. It's a bit less efficient. On top of that this implementation is error prone. If somebody inserts a new string rather than appending it to the array the indices in the case statement will all have to be corrected. It has only one advantage: It's less to type. And of course, it looks cleaner. Some kind of sorted list or hash table storing the strings and an enum value would be more efficient and less error prone (edit: in short: a dictionary). Of course that list must be initialized before it can be used, preferably only once. People who are used to languages that support case statements with strings will of course laugh at that code anyway.
  12. dummzeuch

    File Search

    @robertjohns please don't crosspost
  13. dummzeuch

    File Search

    'mytext.txt' is a file mask. A file mask does not need to contain wild cards.
  14. dummzeuch

    set of object instances

    This was about a set with at most 20 different entries, so performance would most likely not have been an issue (when I asked the question, it was only 5). I have solved the actual problem differently by now. A set is still involved, but not a set of object instances but simply a classical set of an enum.
  15. dummzeuch

    set of object instances

    What happens, when I add the same object twice? In a set, the duplicate will be discarded, but in a list?
  16. dummzeuch

    Hiring process...

    For medical devices/software it's not just ISO 9001 (which applies to my current job too) but the even worse standards of the American Food and Drugs Administration (FDA). I spent about 90% of my time producing paper, so our customers had to pay 10 times more.
  17. dummzeuch

    Hiring process...

    Interesting. I would never ever work again for a company involved with medical devices or software. The pseudo QM requirements (not really improving quality but generating lots of paper) drove me crazy.
  18. dummzeuch

    Hiring process...

    It's "English", not "english". Just saying ... Apart from that I agree 100% and I could add some more, but I can't really be bothered.
  19. dummzeuch

    ini file not writtable

    OK, so where do you create and assign Settings in that code? That must be done before using it.
  20. dummzeuch

    ini file not writtable

    It is not be necessary to free Settings before creating it. That change cannot have solved your problem, it's something else that you also changed.
  21. If you say so, it must be right.
  22. dummzeuch

    ini file not writtable

    How is Settings declared and how instantiated? Some code would give us a lot more information to help you.
  23. Rest assured that people and companies in Europe are fully aware of that topic. And even more: Due to some American laws even servers that are hosted in the EU but are owned by American companies or even companies owned by American companies may be questionable. In theory that means that cloud services from Amazon, Microsoft, Google etc. are a no go for European companies. The reality unfortunately is very different, as even governments, universities and schools use these services, because lobbying has so far prevented that the laws are being applied.
  24. dummzeuch

    GExperts Favorites as WP-Plugin

    I just applied your patch in revision #4028
×