Jump to content

FredS

Members
  • Content Count

    408
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by FredS


  1. 1 hour ago, Stefan Glienke said:

    then look for Assert.something calls

    Good idea but here is what happened:

    1. Was unable to generate the Internal Error this morning
    2. The Project Group also contains some components so I right clicked and ran 'Install'
    3. After that a 'Build' generated the Error
    4. Commented out all 'Assert.'
    5. After a bit of tweaking all compiled
    6. Was not able to reproduce the Error by running 'Install' again
    7. Uncommented chunks of 'Assert.' until I could generate the Error
    8. But commenting those back in still generated the Error after running 'Install'

    As I have postulated for years, the compiler appears to get confused about which directory its in or something else internally goes haywire.
    The degree of which appears to get better or worse with each release..

     

    Just to be clear; 'Install' is executed via the context menu so the active project does NOT change in the Project Group. Certainly rhymes with the 'I did a few things and it broke' we see a lot..

     


  2. 1 hour ago, Rudy Velthuis said:

    Look for code that does this

     

    Right, its 163k lines of code that compile fine unless I switch to the DUnitX Build Configuration which is full of generics and anonymous methods and my implementation uses a ton of directives..

     

    There is no logic, you can't comment out some fixtures and get it to work consistently but you can simply comment out any random line and compile twice to bypass it. Compiling in Rio seems to work, of course that has other issues..

     


  3. 1 hour ago, dummzeuch said:

    I am apparently too stupid to work with git

    "GIT - the stupid content tracker"

     

    In GitHub click 'Fork' on the jvcl repo, use that repo for your local feed.
    Push your changes to that repo, then use GitHub 'Pull Request'.

     

    In the end it works out to be a better system, you have a copy of the code you are using in GitHub, regardless of jvcl integrating it or not.
    When jvcl is updated you can use GitHub to see any changes before deciding to update your Fork.

     

    One of the recent 'TortoiseGit' versions has a create Pull Request URL now, but I haven't used it.

     


  4. 6 hours ago, advwang said:

    testoptions.optionset

    You didn't actually expect that feature to work did you?

    RSP-17558 but there could be many more reports if anything where ever done about them. Comes down to managing option sets with Notepad else don't be surprised when things go FUBAR.


  5. 1 hour ago, Ian Branch said:

    You wouldn't have any in-line variable declarations in your source would you?

     

    No, I was going to add what you posted to test but since I use MMX I hardly use that Nav Bar.

    In a large unit it already failed without in-line variables..


  6. 12 minutes ago, Martin Sedgewick said:

    Added: StyleUtils.inc performance optimizations for faster UI rendering (D10.3)

    A little early to be sure but it appears to have solved my painting problem:

     

    Thanks Emba.. err.. Andy..

     

     

    • Like 1

  7. 1 hour ago, Ian Branch said:

    Hi Fred,

    In fact, I have, I was just looking for the 'Official' sanctioned one. 🙂

    Regards,

    Ian

    By that you mean the same code but it clobbers any previous version and doesn't install correctly?

     

    'Getit' is a form of 'torture', if I could get 'CodeSite' without it I would never run that thing..

     


  8. 46 minutes ago, Mike Torrettinni said:

    this combination of type and cons

    Yes and best readability.

     

    That said I've moved all to Attributes now:

    [EnumNames('TestEnumAttribute', 'Hello, World')]
    TTestEnumeration = (First, Second);

    and to retrieve it:

    Enum<TTestEnumeration>.EnumName('TestEnumAttribute', TTestEnumeration.First) --> 'Hello'

    Usually I document where I find this stuff but that seems to have gone missing a quick search didn't bring up any of that but this instead:

    https://gist.github.com/ortuagustin/6342894207caa0f71a5d23475670281d

     

    It sure saves writing a matrix for each Enum you need in human readable form.

     

     


  9. 1 hour ago, Ian Branch said:

    process to deploy

    From: https://andy.jgknet.de/blog/ide-tools/ide-fix-pack/

     

    fastdcc

    There are 2 ways to use fastdcc.

    1. Using fastdcc directly

    1. Extract the 7z file into your $(BDS)\bin directory.
    2. Start fastdcc32.exe as if it was dcc32.exe
      Start fastdcc64.exe as if it was dcc64.exe
      Start fastdccaarm.exe as if it was dccaarm.exe

    1. Replacing dcc32.exe by fastdcc32.exe (don’t do this if you want to be able to install future RAD Studio/Delphi/C++Builder updates)

    1. Extract the 7z file into your $(BDS)\bin directory.
    2. Rename dcc32.exe, dcc32.jdbg and dcc32.de/fr/jp to dcc32compiler.exe/jdbg/de/fr/jp.
    3. Rename dcc64.exe, dcc64.jdbg and dcc64.de/fr/jp to dcc64compiler.exe/jdbg/de/fr/jp.
    4. Rename fastdcc32.exe to dcc32.exe
    5. Rename fastdcc64.exe to dcc64.exe
    6. Rename fastdcc32Hook.dll to dcc32Hook.dll
      For XE3 or newer: Rename fastdcc32Hook.dllx to dcc32Hook.dllx (“x” is necessary for Delphi’s copy protection)
    7. Rename fastdcc64Hook.dll to dcc64Hook.dll
      For XE3 or newer: Rename fastdcc64Hook.dllx to dcc64Hook.dllx
    8. Start dcc32.exe/dcc64.exe or msbuild.
    • Like 1

  10.  

    13 minutes ago, Stefan Glienke said:

    it basically works as if you cut the string after startIndex

     

    Yeah, certainly made clear in the documentation </sarcasm>

    One would hope that when they copied a DotNet function they could at least copy the DotNet explanation:

    The search starts at a specified character position and proceeds backward toward the beginning of the string for the specified number of character positions.

    At this point the claim that it works as expected needs to come with new documentation.

    • Like 1

  11. 5 hours ago, Stefan Glienke said:

    The documentation is not precise enough

     

    True but it is the same as IndexOf, should I now file a bug report for IndexOf?

     

    StartIndex specifies the initial offset in this 0-based string where the search starts

    Because this does not compute:

    Assert(s.IndexOf('Hello', 38) = s.LastIndexOf('Hello', 38));
    

    I originally looked at the source and also took " startIndex - (Length(searchText) - 1)" into account but here is that math:

      //    0                 19                 38                  0-based
      s := 'Hello how are you, Hello how are you, Hello how are you';
      //                                    ^ 32                     Startindex - (Length('Hello')- 1), searched forward or backward?
    

    IMO at this point the claim that it works as expected needs to come with new documentation or a bug fix.

     


  12. 35 minutes ago, Ruslan said:

    After some system upgrade some packages where uninstalled from the system but still exists as installed GetIt.

    How to fix that? Tried to uninstall from GetIt but a error shows in and nothing in result.

    Just want to remove all missing packages and reinstall them back.

    From: stackoverflow

    Close the IDE, then delete the <whatnot> folder from $(BDSCatalogRepository)
    After that, you have to edit the registry and delete also the <whatnot> folder from:
    HKEY_CURRENT_USER\SOFTWARE\Embarcadero\BDS\<ProductVersion>.0\CatalogRepository\Elements

    • Thanks 1

  13. 10 hours ago, Cristian Peța said:

    s.LastIndexOf('Hello', 38) will search starting from 38 to the left. That means in this string 'Hello how are you, Hello how are you, H'.

    First occurrences is at 19 so it "Works As Expected". 

     

    I moved on in 2016, so what happens with this method is no longer for me only for those who spend hours searching for bugs they can't figure out.
    And I'm not looking for the 'First occurrence', that would be 'IndexOf', so either way the function fails.

    Returns the last index of the Value string in the current 0-based string.
    StartIndex specifies the offset in this 0-based string where the LastIndexOf method begins the search, and Count specifies the end offset where the search ends.
    There are six LastIndexOf overloaded methods, each one allowing you to specify various options in order to obtain the last index of the given string in this 0-based string.
    When the Value argument (Char or String), passed to LastIndexOf, is not found in the 0-based string, LastIndexOf function returns -1.

     

     

     

     


  14. 10 hours ago, Tommi Prami said:

    That issue is closed, is there duplicate, or why is that? Any idea? Issue states fixed in 10.2 if I understand...

     

    10 hours ago, Cristian Peța said:

    You haven't told what exactly is wrong and for me is working as expected.

    Sincerely I don't have an hour to lose to identify what's wrong. Specifically what should be expected?

    There is only one "Huh?" at "s.LastDelimiter('Hello')" but it returns 53 that is good. What's wrong?

     

    P.S. The truth is that Delphi's LastIndexOf is not documented and is working but not as implemented in other languages.

     

    I didn't want to hijack this thread for something I moved on from years ago, so really quickly:


    Berlin Help:  Returns the last index of the Value string in the current 0-based string.

      { TStringHelper.LastIndexOf returns wrong values } 
      //    0                 19                 38                  0-based
      s := 'Hello how are you, Hello how are you, Hello how are you';
      Assert(s.IndexOf('Hello', 38) = s.LastIndexOf('Hello', 38));

    As for the "Huh?" next to LastDelimiter, that was me not understanding how that worked.

     

×