Page 1 of 3 123 LastLast
Results 1 to 10 of 22
  1. #1
    Join Date
    Feb 2010
    Posts
    47

    Default 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 at 09:22 PM.

  2. #2
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,623

    Default

    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

  3. #3
    Join Date
    Feb 2010
    Posts
    47

    Default 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 Images Attached Images
    Attached Files Attached Files

  4. #4
    Join Date
    Feb 2010
    Posts
    47

    Default

    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!

  5. #5
    Join Date
    Feb 2010
    Posts
    47

    Default UTF-8 has a lead-in which confuses the INI sorter

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


  6. #6
    Join Date
    Feb 2010
    Posts
    47

    Default 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 Images Attached Images

  7. #7
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,623

    Default

    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

  8. #8
    Join Date
    Feb 2010
    Posts
    47

    Default 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 at 04:05 PM. Reason: Grammer Girl works her magic

  9. #9
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,623

    Default

    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

  10. #10
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,623

    Default

    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

Posting Permissions

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