Announcement

Collapse
No announcement yet.

Replace With: null

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Replace With: null

    How using Replacements do I replace with null?

    Given that when Replace With: is empty, BC won't let me close the dialog box.

    Thanks.

  • #2
    Originally posted by chrisjj View Post
    How using Replacements do I replace with null?
    By nature, Replacements in BC define how text on one side is to be matched with text on the other side. Since null is the absence of text, such a match cannot occur and the definition of such a replacement is not allowed.
    BC v4.0.7 build 19761

    Comment


    • #3
      > By nature, Replacements in BC define how text on one side is to be matched with text on the other side.

      By documentation:
      Replacements identify repetitive changes that should be considered unimportant.
      and this replacement by null is defiintely one such change.

      > Since null is the absence of text, such a match cannot occur

      Thanks, but since it does if I make the replacement manually, I don't see why it cannot when BC makes the replacement automatically.

      Comment


      • #4
        Text is considered unimportant if it has a matching element on the other side. Replacements performs a logical replacement of text on one side to match a specific value on the other side. As I mentioned above, replacing with a null does not satisfy the requirements of this design. If you want an element on one side to be unimportant, define a grammar element instead of a replacement and set the grammar element as unimportant.
        BC v4.0.7 build 19761

        Comment


        • #5
          > replacing with a null does not satisfy the requirements of this design.

          Here's hoping for a remedy to the fact this design cannot do automatically what the user can do manually.

          > If you want an element on one side to be unimportant, define a grammar element

          Not while that cannot be done without interfering with the file format for other sessions, thanks.

          Comment


          • #6
            As Michael said, replacements are designed to handle text changing from something to something else. We aren't gpoing to change that. If you want to ignore arbitrary text add it to the grammar and make it unimportant. That's currently harder than it needs to be, especially for one-off things like this, and we are planning on improving that.
            Zo P Scooter Software

            Comment


            • #7
              > replacements are designed to handle text changing from something to something else.

              This is such a case.

              > We aren't gpoing to change that.

              Please forward my request that this problem be fixed. Thanks.

              Comment


              • #8
                Hello Chris,

                This is the guide you want to use for defining text as unimportant if it is aligned to text or not:
                http://www.scootersoftware.com/suppo..._unimportantv3
                Aaron P Scooter Software

                Comment


                • #9
                  Originally posted by Aaron View Post
                  This is the guide you want to use for defining text as unimportant if it is aligned to text or not
                  Thanks, but I most certainly do not want to use that since by changing the File Format it interfers with other sessions.

                  Comment


                  • #10
                    I do expect us to add some sort of ad-hoc unimportance parsing, that doesn't interfere with the file format's grammar, but it won't be "Replace 'xxx' with ''". I also can't comment on whether it will be a session or file format setting. The current behavior is powerful, but too complicated for most use, and we are going to revisit how things are divided at some point.
                    Zo P Scooter Software

                    Comment


                    • #11
                      > I do expect us to add some sort of ad-hoc unimportance parsing

                      Good to hear, thanks.

                      > it won't be "Replace 'xxx' with ''".

                      I think this Replace anomaly needs addressing. There's nothing to justify it.

                      > he current behavior is powerful

                      Agreed, and I have no doubt it is extremely appreciated by those who need it. I wish you luck in reconciling the needs of both ends of the spectrum!

                      Comment


                      • #12
                        Hello Chirs,

                        How does it interfere with your other sessions? If you define the grammar definition, its importance is controlled per session. By default you can consider it Important, but for that specific session consider it Unimportant. Or vice versa.

                        Specific examples would help as test cases as we investigate changing this feature.
                        Aaron P Scooter Software

                        Comment


                        • #13
                          > How does it interfere with your other sessions?

                          It changes comparison results in saved sessions using the saem file format.

                          > If you define the grammar definition, its importance is controlled per session. By default you can consider it Important

                          By default BC /does/ consider it important. Hence the interference.

                          Or so I beleived, from the confusing results I experienced and the explanations of the cause given on this forum.

                          But do please tell me if I am wrong.

                          Comment


                          • #14
                            > Specific examples would help as test cases as we investigate changing this feature.

                            Here is one: http://img189.imageshack.us/img189/3113/picwi.png

                            Right == left except right's 30s\Loud\ is changed to null on left.

                            I would like the session Replacement Item to replace 30s\Loud\ with null. This case is lucky - I can workaround using \30s\Loud\ -> \.

                            BTW, nowhere AFAICT on the UI does Replacement Item indicate that it makes the target text unimportant (very nice that it does, BTW) rather than truly replaced. I think it should indicate.
                            Last edited by chrisjj; 14-Jun-2010, 12:21 PM.

                            Comment


                            • #15
                              Hello Chris,

                              For that example, first define a grammar element that matches "\30s\Loud\" and give it a unique name, like "30Loud directory" or "directory section".

                              Then, in the Home screen, go to Edit session defaults, select Text Compare, and uncheck "30Loud directory" in the Importance tab. This will mark it as unimportant for all future Text Compare sessions. If you have an already saved Text Compare session, or a Folder Compare that has specific child comparison settings set, then you may need to change it there as well. If you run into a problem with a specific session, please email us your Support package (Help menu -> Support; Export) and a pair of example files. Please include a link to this forum post as well.
                              Aaron P Scooter Software

                              Comment

                              Working...
                              X