Jump to content

Mike Torrettinni

  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Mike Torrettinni

  1. I'm not sure how to even ask this, so let me try explain: I noticed that even if you cast variable as parameter, it works - the value is returned (I was sure casting will just pass a value): function FillStrings(aStrings: TStringList): boolean; begin aStrings.Add('a'); aStrings.Add('b'); end; ... FillStrings(TStringlist(Memo1.Lines)); This works, and this doesn't: FillStrings(Memo1.Lines); So I was trying to see if CPU debug window will show anything how the Lines were casted. Of course not. So, is it possible to see how compiler saves info about the parameters, to see what information it has on parameter when casting and when not?
  2. Mike Torrettinni

    Is it possible to see how compiler defines parameters?

    Thanks, I do have correct version as you pointed out, but this was a test if it works. casting with AS fails, but this one worked and just wanted to try to figure out why. Was testing what is good general option for lists and with TStrings works pretty well: procedure TForm1.FormCreate(Sender: TObject); var vStrings: TStringList; begin vStrings := TStringList.Create; try if FillStrings(vStrings) then Label1.Caption := vStrings.DelimitedText; finally vStrings.Free; end; FillStrings(Memo1.Lines); FillStrings(ListBox1.Items); end; Then I set a test with TStringList as parameter and of course Memo and ListBox were failing. Thanks, I didn't know how this info is called. Perhaps it would be useful if IDE had optional debug window with VTM data, like CPU window. (Reading this I assume it's possible https://hallvards.blogspot.com/2006/03/hack-8-explicit-vmt-calls.html)
  3. Mike Torrettinni

    SynEdit just got a major uplift

    Thank for pointing this out! I was looking into why so sluggish on my text files (108 MB file size, 1Mio lines), but in release mode is still pretty fast. 🙂
  4. Mike Torrettinni

    [DCC Warning] W1013 Constant 0 converted to NIL

    I noticed this a few days ago, when by mistake assigned 0 to array: var arr: array of integer; begin arr := 0; end. It gives the same W1013 warning.
  5. Mike Torrettinni

    2022 StackOverflow dev survey - salary results

    Interesting. I know for a few eastern European countries do have these 13th+ salaries as bonuses, if company does well. I guess the more west you go, the less bonus is really a bonus. I know UK doesn't have 13th month pay.
  6. Mike Torrettinni

    2022 StackOverflow dev survey - salary results

    That's very common in US, it's a big country and you can't expect Silicon Valley to have same salaries as some other states. And in this Covid era, I see $60K to be acceptable offer for beginners positions, or a part-time job, if full remote. Unlikely the bonuses are included in reported as a yearly salary, since it varies from year to year and also usually you don't know you get it until you actually do. I'm sure you probably know Austria has quite common the 13th and 14th month bonus (and 15th! in rare cases). Such bonuses are quite common in European companies doing well. In US, when companies are doing well, you get free coffee and donuts and team building days. A 35% increase in salary in 1 year... yeah right 🙂
  7. Mike Torrettinni

    Delphi 11.1 - a month later

    Pretty impressed by Delphi 11.1! Upgraded most of my projects from 10.2 and finally I can say that this is version stable enough to move from 10.2. Versions 10.3 and 10.4 were just not ready. A few observations: - IDE crashes a lot less (perhaps only 2 crash & close so far) - still occasional F2084 Internal Error, but at least it doesn't close IDE and you can just compile again (10.2 would crash and close most of the time on these errors) - The LSP works pretty good, there's constant delay, but is worth waiting because it works correctly most of the time - I was hoping the IDE would be slightly faster, but there is a constant slight delay (I assume LSP is kicking in) - ctlr+click works better, almost always - faster handling big main form (open, close) - commenting lines works without a glitch (10.2: sometimes when I want to comment a line, as soon as I press CTRL+/ the cursor jumps up and down and it comments the first line in the unit. very annoying) - 64bit compiler compiles faster and always (10.2 would crash often) - error insight is improved and more accurate - Structure view improved, faster and less jittery (10.2 would occasionally hang for a bit on large form) - compiler hints improved, more are shown right from the start so you can sort them out (10.2 would suddenly surprise you with a few more that were not shown before) - I like the new Options window, the size persists, especially Library window - context option to close units: Close - All to the right, is pretty nice, too! They did break one thing (well, it was broken in 10.3 already, still not fixed), but is not a deal breaker (at this point): - Debug Watch list evaluator is broken for some simple cases ( https://en.delphipraxis.net/topic/6751-simple-debugger-bug-in-111/ ) Embarcadero did a good job with D11.1!
  8. Mike Torrettinni


    Nice, thanks!
  9. Mike Torrettinni

    Delphi 11.1 - a month later

    I noticed this error most of the time in only 1 unit and I finally was able to refactor it (it was using a lot of other units). No more of this error since then! 🙂
  10. Mike Torrettinni


    I have a few overloads for YY conversion, mostly used to convert from imported text files: function GetYYFromDate(const aDate: TDate): integer; overload; begin // 01/01/2019 -> 19 Result := FormatDateTime('yy', aDate).ToInteger; end; function GetYYFromDate(const aDate: TDateTime): integer; overload; begin // 01/01/2019 01:01:01 -> 19 Result := FormatDateTime('yy', aDate).ToInteger; end; function GetYYFromDate(const aDate: string): integer; overload; begin // '01/01/2019' -> 19 Result := Copy(aDate, Length(aDate) - 2, Length(aDate)).ToInteger; end; function GetYYFromYear(const aYear: string): integer; overload; begin // '2019' -> 19 Result := Copy(aYear, Length(aYear) - 2, Length(aYear)).ToInteger; end; function GetYYFromYear(const aYear: integer): integer; overload; begin // 2019 -> 19 Result := aYear mod 100; end;
  11. Mike Torrettinni

    Bookmarks dead?

    Very good news! I'm glad our little 'positive' nudge helped achieve this goal!
  12. Mike Torrettinni


    Each TabSheet has a TabVisible property, if you set it to False it will hide that tab. To hide/show a TabSheet there is Visible property. I see that linked documentation in 1 post up is working now. Still wanted to point out the 2 similarly named properties, they could choose better naming.
  13. Mike Torrettinni

    Delphi 11.1 - a month later

    I didn't know this. I see that they did improve High DPI in 11 (https://blogs.embarcadero.com/new-in-rad-studio-11-high-dpi-ide-and-form-designing/) I will have to re-check. Last time I ran my projects on 4K monitor and various scalings, it looked good, not perfect, but usable.
  14. I suggest showing code that you have here or attach files here (.pas not .zip). I doubt anybody will download a zip file from external source.
  15. Mike Torrettinni

    Delphi 11.1 - a month later

    I lowered my expectations what they can/will deliver, so I think that's why I'm surprised of the D11.1 quality. So far, I'm not touching any High DPI stuff, yet. But I would probably get to the same conclusion as you, not mature enough yet.
  16. If you search this forum, you will see this kind of questions never get any answer here, but you will probably get a response within minutes if you post this as project on freelancer and set your minimum budget.
  17. Mike Torrettinni

    Delphi 11.1 - a month later

    1 more observation: in 10.2, when ctrl+click worked, it worked even if code in other part of the project didn't compile. 11.1 needs compiler to not fail and ctrl+click works. Example: working on UnitA and try to compile and it fails.. perhaps a type is missing or used incorrectly. Open UnitB and check some info, use ctrl+click to jump around. In 10.2 the ctrl+click will work in UnitB. In 11.1 the Ctrl+click will not work anywhere, it stops working for the whole project, because the last compile failed. It starts working as soon as compile is successful.
  18. Mike Torrettinni

    Simple debugger bug in 11.1

    Delphi 11.1, no patch 1 installed, yet. Can someone confirm they get same/similar debugger bug in this example code: uses System.StrUtils; procedure TForm1.Button2Click(Sender: TObject); var vPos1, vPos2: Integer; vLine, s: string; begin vLine :='testingcompiler'; vPos1 := 5; vPos2 := 7; s := MidStr(vLine, vPos1 + 1, vPos2 - vPos1 - 1); <-- Park cursor here and copp MidStr call to debugger end; Run and park on MidStr() call and copy the expression to debugger. I get an error F2084 Internal error... instead of 'n' in watch value: I really hope is just my copy and perhaps reinstall or patch 1 solves this. No problems with this code in 10.2.3
  19. Mike Torrettinni

    Simple debugger bug in 11.1

    OK, it makes sense. Well, at least the workaround is simple: don't give debugger any tough math to do.
  20. Mike Torrettinni

    Simple debugger bug in 11.1

    Hm, quite disappointing, but maybe this is very rarely used the way I use MidStr, or perhaps MidStr is on the way to be deprecated and they don't want to waste time on it.
  21. Mike Torrettinni

    Survey of Delphi Versions in use??

    If you decide to go ahead with the survey, try to give us more options, for example I use D2006 every few years for a few weeks. So, when I use it, I use it 75%-100% of the time, the rest is split between D10.2 and now D11. D11 is the only one that I compile for 64bit, and Linux. Perhaps you can frame the purpose of the survey, like if you are you planning to develop something and sell to Delphi developers, in that case I would select D11 as the only version I would be interested in any new component/tool to use with.
  22. Mike Torrettinni

    Bookmarks dead?

    It seems very likely this is the case. You would think David would remember all past projects acquired by bigger companies with promises of 'gold' and in reality they got used for marketing, then pushed aside and lost in space, in very short time.
  23. Did you try this component? I would be interested if it has faster implementation of search and highlight - faster than current TRichEdit.
  24. OK, fixed too 🙂
  25. The link has some facebook details... if you wanna remove it.