Results 1 to 7 of 7

Thread: DFRefactor 3.1.0: IN -> Contains function broke Insert command

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2009
    Posts
    862

    Default DFRefactor 3.1.0: IN -> Contains function broke Insert command

    Hello,

    I have tried IN -> Contains function on our biggest project and it doesn't compile after that. Reason is that we have Insert command on it.

    Supose something like this:
    Code:
    string city
    
    move "Niagara, NY" to city
    insert " Falls" in city at 8
    It gets refactored to:
    Code:
    string city
    
    move "Niagara, NY" to city
    insert (city contains " Falls") at 8
    Regards.
    We are always in a continuous learning mode, and the more we know, the more we realise that we don't know anything.

  2. #2

    Default Re: DFRefactor 3.1.0: IN -> Contains function broke Insert command

    Hi Jose,

    Thanks for the report.
    AFAIK the "in" to "contains" refactor option has been disabled in the latest zip release.

    Logged as https://projects.vdf-guidance.com/issues/157 on your behalf.
    --
    Wil

  3. #3
    Join Date
    Oct 2014
    Location
    Heerlen, NL
    Posts
    222

    Default Re: DFRefactor 3.1.0: IN -> Contains function broke Insert command

    Hello Wil,

    This is some fine peace of software. That beeing said, the above problem also exists in comment lines.
    Like this, these lines:
    Code:
    // record to the end of the table. In both cases we take
    // all record in between, and also add the stepsize
    become:
    Code:
    // record to the end of the (both contains table.) cases we take
    // all (between, contains record) and also add the stepsize
    And this:
    Code:
    Procedure Shift_Record_IDs FOR DATADICTIONARY Integer iFile Integer iField ;
            Integer iIndex Integer iBaseRecord Integer iDelta Returns Integer
    Becomes:
    Code:
    Procedure Shift_Record_IDs For DATADICTIONARY Integer iFile Integer iField ;
        Integer iIndex Integer iBaseRecord Integer iDelta Integer
    Removing the Returns part of the procedure. I used the zip you posted to: https://support.dataaccess.com/Forum...eturn-keyword)

    Regards and thanks for all your work,

    Leon Raafs

  4. #4

    Default Re: DFRefactor 3.1.0: IN -> Contains function broke Insert command

    Hi,

    Leon I'm not quite following how you can get these issues with the code from the posted zip.
    Did you unzip it on top of the old code and forgot to recompile perhaps?

    re. IN to CONTAINS refactoring. This functionality was disabled after internal debate by both Nils and me.
    The refactoring was an experiment implemented via regex by Marco in order to see how it would work for us.
    While regular expressions are very very powerful and work in a lot of scenarios. We came to the conclusion that it wouldn't work as a solution for DfRefactor.
    Reasons being that a regex expression is hard to understand if you haven't used them in a while. So debugging and patching specific behavior takes too much of our time due to readability issues. We did not want to support it and as a result we had no choice but to disable it.
    However, we do recognize that it is a powerful option to have so we intend to bring it back, but in a different way. A solution that has more flexibility and that we intend to support.

    Basically by adding a search & replace dialog that supports regular expressions. Then this idea could still be used by power users.
    See also: https://projects.vdf-guidance.com/issues/142

    re. missing returns. I'm pretty sure I fixed that one

    PS: added your note about contains/in messing up comments to https://projects.vdf-guidance.com/issues/157
    --
    Wil
    Last edited by wila; 12-Jul-2019 at 04:03 AM.

  5. #5
    Join Date
    Oct 2014
    Location
    Heerlen, NL
    Posts
    222

    Default Re: DFRefactor 3.1.0: IN -> Contains function broke Insert command

    Will,

    I did forget to recompile, thanks for the reaction.

    Regards,

    Leon

  6. #6
    Join Date
    Feb 2009
    Posts
    862

    Default Re: DFRefactor 3.1.0: IN -> Contains function broke Insert command

    Thanks Wil,

    You are correct, I have downloaded DFRefactor 20190426 from your website and it is disabled.

    Regards.
    We are always in a continuous learning mode, and the more we know, the more we realise that we don't know anything.

  7. #7
    Join Date
    Feb 2009
    Location
    Goteborg, Sweden
    Posts
    3,189

    Default Re: DFRefactor 3.1.0: IN -> Contains function broke Insert command

    Thanks Jose for bringing this to my attention.

    The version on www.rdctools.com/downloads has now been updated/corrected.

    By mistake I had uploaded the wrong version (to an old one).

    P.S. Were you able to download the fix program for DUF I posted for you?
    Nils Svedmyr
    RDC Tools International
    www.rdctools.com

    "The problem with internet quotes is that you don't know if they are true."
    Abraham Lincoln

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •