Jump to content

Tommi Prami

  • Content Count

  • Joined

  • Last visited

  • Days Won


Tommi Prami last won the day on February 12

Tommi Prami had the most liked content!

Community Reputation

51 Excellent

Technical Information

  • Delphi-Version
    Delphi 10.2 Tokyo

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Exactly. And also removing withs are quite pain by hand. More complicated it is. Nested with clauses are pure evil. Even ones that seems trivial are pain to remove sometimes. -Tee-
  2. Sometimes removing withs, especially nested ones, are really tricky. Easy to mess up. Just got bit by this other day. IDE/Compiler/LSP must know which is which, so it would get first pass way faster than doing it manually. https://quality.embarcadero.com/browse/RSP-18953?filter=-2 On a side note thee has not been too much love towards refactoring features in IDE. Hope it would get more and ones we have to get better. -Tee-
  3. Tommi Prami

    How to kick TDataset to filter record(s)

    That is discussion of another time,. That code Above was satisfactory for my needs. But maybe helpful for some other tough. Or different use case. Thanks for your suggestion. -Tee-
  4. Tommi Prami

    How to kick TDataset to filter record(s)

    Sure that works, but I think that filters whole dataset, which I did not want. -Tee-
  5. Tommi Prami

    How to kick TDataset to filter record(s)

    I do not present the problem at there. That was my Quick and dirty solution to the problem -.Tee.-
  6. Tommi Prami

    How to kick TDataset to filter record(s)

    Hmmm... No wonder... 🙂 Dataset have emails, I load filtered emails on startup to the TSringList. Andf use OnFilerRecord (Etc event of dataset to filter those out). I need also to filtr out rows from dataset on runtime, and I need to kick the TDataset that Hey Dude, Filter current work right now. And code above more than less filled my need. Using GotoBookMark(). -Tee-
  7. Tommi Prami

    How to kick TDataset to filter record(s)

    Problem was that I Have filtered dataset, but the Filtering criteria or filtered rows criteria is changed separate from data on dataset.. I have something like: function KickDatasetFilterRecord(const ADataSet: TDataSet): TBookmark; var LBookmark: TBookmark; begin LBookmark := ADataSet.GetBookmark; try if not ADataSet.Eof then ADataSet.Next else ADataSet.Prior; Result := ADataSet.GetBookmark; finally if ADataSet.BookmarkValid(LBookmark) then ADataSet.GotoBookmark(LBookmark); end; end; procedure Foo(const AEmail: string); begin FFilteredEmails.Add(AEmail) ; // Filter current wor now. Dataset.GotoBookmark(KickDatasetFilterRecord(Dataset)); end;
  8. Tommi Prami

    How to kick TDataset to filter record(s)

    One way seems to use GotoBookmark.
  9. Hello, Is there a way to tell TDataset that now would be preferred time to do some filtering of records? Current record or all. -Tee-
  10. Added "BitShifter and write 3 bytes at the time" to buffer code provided by @Anders Melander I would have guessed that this would have speeded things up a bit. But no 😄 -Tee-
  11. Tommi Prami

    TBCEditor text editor component

    Some claim it is rebranded SynEdit, which it is not. Author said right away that Show me where there is SynEdit code, and I'll change it. No one presented anything (Meaningful at least) TBCEditor works fundamentally differently (Or made differently) than SynEdit.
  12. Tommi Prami

    TBCEditor text editor component

    TBCEditor was made by my coworker. Saying "violation the SynEdit license" might be bit overstatement, as I remembered someone found couple of trivial pieces, when Author said show me the code and I'll rewrite, nobody did nothing so... It was ground up rewrite more than less from Scratch. Spend couple of years coding it every day basically. This weird dude who ripped TBCEditor off was extremely rude, so Author just took it off of public. Editor (or it's descendant) is in Text Editor Pro, which is very good text editor tool. And yes, totally abandoned and left in state that would need lot of work from dedicated people to fix for sure.
  13. This seems interesting Random number generator algorithm, don't have any authority to actually prove it tough. https://www.pcg-random.org/ There is some Delphi implementation at https://github.com/LUXOPHIA/LUX IT is way too complex if you only need one algorithm. Also one 32 bit version at https://github.com/mpodvin/PCG32-Random. Dunno how it is going to compare with https://bitbucket.org/egrange/dwscript/src/master/Source/dwsRandom.pas if someone knows, I would be happy to learn. -Tee-
  14. Problem (to me) is that I've seen 10x speedup without using that much ScanLine, And would be nice to abple to reproduce that scenario. Some one also made simple test app and saw that ScanLines too significant time, alone, without other code.
  15. Fair point. Said in some point that this is 3rd part library, very small part of it, tough more than less obsolete and we started to fix it our self's, But some portion we have no control of it, like TBitmap (Would be total rewrite of huge library)