Announcement

Collapse
No announcement yet.

Over-riding file compare using viewer for special type INI

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

  • Over-riding file compare using viewer for special type INI

    I have the optional viewers installed.

    On the file compare screen, I double click a file compare where the file type is INI. The ini viewer opens, as expected.

    Now wishing to see a straight text compare without the ini viewer's sorting, I right click, select "Open With", then "Text Compare".

    The INI viewer opens again. Not what I expected.

    I repeat the experiment, right click then "Open With" then "Hex Compare". The hex viewer opens, as expected.

    Am I doing this right, or is the right click menu link to Text Compare somehow going to the "figure out what the file types are and pick a viewer"?

    PS: The INI viewer also doesn't sort a file that begins with "[#0]" on line 1. It moves that line to AFTER the first group, just before the "[#1]" line which starts the second group.
    Last edited by jmthomas; 11-May-2015, 11:22 PM.

  • #2
    Thanks for the report. Which INI Viewer would you be using? A full screen screenshot might help. And could you send your current BCSupport.zip from the Help menu -> Support; Export, to support@scootersoftware.com?

    Please include a link back to this forum thread in the email for our reference.
    Aaron P Scooter Software

    Comment


    • #3
      INI compare problem where the sorting seems off...

      First, the ini compare problem where the sorting seems off...

      Note that the [#0] lines seem to have a leading character. It's not in the actual file displayed by Notepad; I filled the {code} tags using cut and paste from Notepad.

      But, Notepad wants to save the files in UTF-8. Does UTF-8 have a "hidden" lead-in character? If it's there, then the linked file should include it.



      (Note the attached files have ".txt" appended to their type so the BBS system will accept them.)

      c-usrfields.ini.txt (162 Bytes)
      Code:
      [#0]
      name=Album Artist
      value=ALBUMARTIST
      
      [#1]
      name=Composer
      value=COMPOSER
      
      [#2]
      name=Discnumber
      value=DISCNUMBER
      
      [#3]
      value=GENRE
      name=Genre
      z-usrfields.ini.txt (202 Bytes)
      Code:
      [#0]
      name=Album Artist
      value=ALBUMARTIST
      
      [#1]
      name=Composer
      value=COMPOSER
      multiline=
      
      [#2]
      name=Disc
      value=DISCNUMBER
      multiline=0
      
      [#3]
      value=SUBTITLE
      name=SubTitle
      multiline=0
      Attached Files

      Comment


      • #4
        If there is a leading UTF-8 character, might that also be confusing the right-click open with text viewer? Not good odds that's a problem, but I thought I'd mention it...

        I'm off to dig up a hex editor and see EXACTLY what's in those two files.

        Then I'll get the right-click situation documented and send you the settings file again. More news later!

        Comment


        • #5
          UTF-8 has a lead-in which confuses the INI sorter

          Got-cha! x'EFBBBF' right before the open bracket!

          Comment


          • #6
            More Alligators in the Swamp

            I was trying to export my settings to e-mail, and I got these two screens:

            bc4-export-settings-fail-1.png

            bc4-export-settings-fail-2.png

            After clicking "OK" to the two error windows, I'm left with the "Export Settings" window. "Finish" takes me around through the copy errors again, and the "Cancel" button (which is clickable/depresses) performs no action. Likewise, the "X" for close on the window is ignored. Had to kill the process.

            I'll send you the BCSettings.bcpkg which is 80 odd KB -- hope it has enough.

            The BC4 screen in the back ground is created by right click "Text Compare" on the usrfields.ini file pair.

            Attached Files

            Comment


            • #7
              Hello,

              Thanks. The main point of confusion is your installed INI Sorted File Format. File Formats associate with a specific viewer, in this case it is the Text Compare. This means either you:
              -Open INI files, we scan the File Formats list and find the first match (*.ini) and open in the associated viewer using that format.
              -Open the Text Compare first, and we'll scan the File Formats list for text formats only. If we find a match (which we would in this case) it would use that matching format.

              The icon of the format is a hint for which viewer type is used. The white paper is for the Text Compare.

              You can override the detected format after you are in the Text Compare on the Toolbar -> Formats button dropdown arrow. Or in the status bar of each pane where it says the format name "INI Sorted" in each pane, this can be selected and overridden. Or in the Session menu -> Session Settings, Format tab.

              And thanks for the report with the UTF-8 lead character causing issues for the sort conversion. The VBS conversion has some code to try and determine if the file is Unicode or ASCII, but does not specifically handle UTF-8.
              Aaron P Scooter Software

              Comment


              • #8
                Let's look at the Why

                I think that this is counter-intuitive operation.

                The right click "Open With" sub-menu presents a list of applications. This is also how Windows Explorer operates, and user have come to expect applications. The menu item identifies a program to be invoked to process the file.

                However, BC4 "Open With" mixes apples and oranges.

                Almost every menu entry will invoke a specific program: for example, the Table Compare, the Hex Compare, the Text Edit, the Associated Windows Application.

                But there is one rogue entry that invokes a "switcher". It probes the file type and invokes what ever it thinks best (all be it table driven). Relative to all the other entries, its behavior is a wild card. And the title doesn't warn that it behaves different than all other entries.

                This "based on file type" behavior should be explicitly identified in menu entry.

                In other words, yes it is an application, but its name is wrong. First, the name doesn't hint that it's a meta-switcher. Second, (and worse,) the name duplicates a function present since day one: straight text comparison.

                May I please suggest:


                1. Rename the menu entry from "Text Compare" to "Compare using File Format" and keep it at the top of the list of internal viewers.

                2. Restore a menu entry "Text Compare" which always invokes the old text compare, the one that would get invoked if the file type were not in the File Formats table.

                Thanks!
                Last edited by jmthomas; 12-May-2015, 06:05 PM. Reason: Grammer Girl works her magic

                Comment


                • #9
                  Hello,

                  Every Compare type actually behaves this way. We have Text formats, Data formats, Picture formats, Hex formats, etc for each Session type. Choosing the Data Compare will check for defined Data formats. The Text Compare will check for defined Text formats, etc.

                  I believe the main point of confusion is the difference between a Session type (viewer) and a format (rule). The Session types are large/different ways to view files, such as in a Table will cells/rows/columns (Data Compare) or as plain text (Text Compare) or as MP3 tags (MP3 Compare). The Formats are a subset to these viewers: rules that apply to specific extensions when you open a file in that viewer to narrow how it loads.

                  INI Sorted is a Text Compare Format. It opens the Text Compare, then determines your INI file should be processed and sorted in a specific way. This format is downloaded from our website, and differs from the default behavior, which does not perform the sorting.

                  It isn't an independent view, but rules that apply to INI files when viewed in the Text Compare. The trick is: you can have formats for the same extension in different viewers. You could view Excel files as converted text in the Text Compare, or as rows/columns in the Data Compare. Choosing the viewer (Text Compare or Data Compare) then lets you determine how you want to compare the Excel file.

                  The main Tools menu -> File Formats list lets you control which viewer a format uses automatically. If you have Excel in this list twice, one with the white paper Text icon and one with the gold Data icon, whichever is topmost in the list determines that it uses that viewer when you double click the files. But you can always open the other viewer first, and then it will use that viewer's format list. You have both INI Sorted and Registry Dumps in your formats list (both associated with *.ini), so whichever is topmost is executed automatically when you double click files. Once in a viewer, you can override the format and select any other formats for that viewer type in the Session Settings or toolbar. To switch to a different viewer type, you would use the Open With menu.
                  Aaron P Scooter Software

                  Comment


                  • #10
                    Hello,

                    We've also just updated the INI Sorted format, which should help with your UTF-8 files. You can download the newest version here:
                    http://www.scootersoftware.com/downl..._moreformatsv4
                    Aaron P Scooter Software

                    Comment


                    • #11
                      I hear you asking me go 3 sides around the barn just to get to a basic feature.

                      It's a real PITA to keep opening and closing File Formats and enabling/disabling the right combinations to get the viewer I want.


                      BC4 needs to stop being so fancy! It makes an very productive tool so much harder to use!

                      What's wrong with letting me choose a specific viewer from a right click menu???
                      Last edited by jmthomas; 13-May-2015, 02:03 PM.

                      Comment


                      • #12
                        Thank you

                        Aaron,

                        I realize it's your job to explain how BC works, and that oh so once in a blue moon a user actually bring a real live bug to your attention.

                        I spent many years with a major mainframe company. I did my time in customer support, both level 1 phone, level 2 ticket, level 3 change team, even teaching classes. I spent a long time a lead developer for a whole product -- UI, API, code, documentation, bug reports. I always worked closely with my support team, watching other developers hid behind the wall. I really appreciate that support is a totally different environment than development.

                        What I'm asking you to do for a minute is take off your support glasses. Don't think about instruction to use the product. Think about what a user wants the product to do.

                        Your explanations about how things work are very informative. And most times, that's the right answer for the situation. Teach the user what to do.

                        But this time, instead of adapting the user to the product, please think about what the user wants to do, and ask if the product could be better adapted to the user.

                        Keep up the good work! Your patience is wonderful!

                        Best Regards,
                        Jared
                        Last edited by jmthomas; 13-May-2015, 02:01 PM.

                        Comment


                        • #13
                          I tested the new Sorted INI viewer, and it handled the couple of UTF-8 files I gave it just fine.

                          Thanks for the quick fix!

                          Comment


                          • #14
                            Hi Jared,

                            Understood. I do think the current program may meet your needs, however. Going into File Formats and unchecking items should not be necessary; that's there for global disabling of formats (permanently without deleting them). Which two formats are you switching between? INI Sorted and Registry Dumps?

                            If so, the recommended method there is to use the Format toolbar button. The button itself if clicked will show the current format settings, which isn't what we want. What we want is the dropdown control right next to it, which lets you quickly swap between any format (INI Sorted to Registry Dump). Once selected, both panes refresh with the new format.

                            The other shortcut is in the status bar itself where it says the text "INI Sorted". This is also a button which allows you to override and switch formats. However, this only does one pane at a time. This allows you to override just one side, but the toolbar button allows you to quickly change both.

                            You can also switch formats in the Session Settings dialog, but that's a couple of extra clicks that aren't needed.

                            Adding something to the right-click menu would actually be a little slower, since the Open With dialog is a extra click deep compared to using the Toolbar dropdown control.

                            Also, to help with the conversation and our help documentation: please note that "viewer" is a specific terminology used for our broad compare types (Text Compare, Table Compare, Picture Compare). If you are trying to switch "viewers", this is in the right-click menu, but I think you are trying to switch Formats. If you can let me know exactly which formats you are disabling and enabling in the File Formats dialog, I can better understand what you are trying to switch between.
                            Attached Files
                            Aaron P Scooter Software

                            Comment


                            • #15
                              I think I know where you're going with this. Bottom line is that I'm smarter than BC when it comes to the contents of my files.


                              First, some names.

                              What I was calling a "viewer" is a program which displays two files side by side with formatting.

                              Back in the old days, there were only a couple of different ways to see files in a formatted layout. Without re-installing BC2 or even the original Beyond Compare to check the details, I believe there were only two or three different formatters, straight text and ASCII/hex dump. When you said "text" viewer, everyone knew you meant the one that broke up the file using delimiters like CR into "lines", and then tried to sync up/match up lines based on runs of similar characters. Of course, "character" didn't necessarily mean "printable character"...

                              Now BC has evolved the definition of "viewer" to no longer be a program, but a system of selecting formatting based on file type and who knows what else. Starting a "viewer" no longer starts a specific formatting program, as you have explained.

                              So what does one call the a specific formatting program now that there's couple of dozen? Is it right to say "Sorted INI viewer"? And what do you call the program most like the old one that just tried to find lines and match portions there of?

                              I can't say "text viewer" any more, since you have explained that viewer has changed meaning...


                              And on the subject of names...

                              The example screen in the previous post has "New Text Format (3)", "New Text Format (2)", "New Text Format (4), "New Text Format", and two versions of "Everything Else". My File Formats table has 4 entries for "Everything Else", none of which look different enough to say what makes each a different program, or the same program with different parameters, or what.

                              In short, there's a lot of confusion in the names, and it's sometimes hard to tell what you're going to get by looking at the name.

                              Perhaps a bit of cleanup and standardization is in order?


                              But here's my situation.

                              I'm looking at a folder compare, and I see two files. Since they are my files, (and I'm an experienced M$ user) I have a pretty good idea -- if not exact knowledge of -- what's in them. And, I know how I want to see them formatted.

                              Remember too that I haven't opened the viewer.

                              The fastest path from a folder compare is to right click and select something (copy, delete, compare, view). My problem is that BC4, in its infinite wisdom and evolved broad compare types technology, wants to chose the format to display. I don't have a choice. All I can do is tweak the File Format menu, or let some possibly unwanted format displayer start and then tell BC4 to choose a different format.

                              Do you see where I'm coming from?

                              Do you see why the right click menu would be (for me) better than the drop down formatting menu?


                              I strongly suspect that we aren't going to agree that the BC4 interface could use some tweaking in this area. Assuming you understand my frustrations, I'll live with the current limitations and and we can close this.
                              Last edited by jmthomas; 15-May-2015, 03:39 PM.

                              Comment

                              Working...
                              X