UI Browser 4 4.0.0 Change Log

Continuing the discussion from UI Browser Documents:

UI Browser 3 3.0.0 (2017 - Swift 4, 5)
Change Log

Rewrite the UI Browser application from scratch in Swift using storyboards and container views, revise and modernize the user interface, refactor and update the class structure, and add new features.

2017-03-09 (3.0.0 build 1)

Create a new UIBrowser3 project and a new PFAssistiveFramework4 workspace, and add the project to the workspace. The PFAssistiveFramework4 project was created at the same time in a separate project located elsewhere and added to the workspace.

  • Started development on macOS Sierra 10.12.3, Xcode 8.2.1 and Swift version 3.0.2.
  • Created a new Xcode Cocoa Application project with Product Name “UIBrowser3”, Language Swift, Use Storyboards, Include Unit Tests and Include UI Tests, in PreForm Products/UI Browser/UI Browser 3 Code. [Now UI Browser 3 Code 3.0.0]
  • Created a new UIBrowser3 workspace and added the new PFAssistiveFramework4 and UIBrowser3 projects to it.
  • Left the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting at 1, despite the requirement of Technical Note TN2420: Version Numbers and Build Numbers that “For macOS apps, build numbers must monotonically increase even across different versions. In other words, for macOS apps you cannot use the same build numbers again in different release trains”, on the theory that UI Browser 3 in Swift is a new product.
  • Left the Info.plist CFBundleVersion (“Bundle version”) at 1.
  • Revised Info.plist by setting CFBundleShortVersionString (“Bundle versions string, short”) to “3.0.0” and NSHumanReadableCopyright (“Copyright (human-readable)”) to “Copyright © 2017 Bill Cheeseman. All rights reserved. Used by permission.”
  • Revised the AppDelegate.swift template heading by changing the copyright to “Copyright © 2017 Bill Cheeseman. All rights reserved. Used by permission.” and adding the line “Version 3.0.0”.
  • Revised the ViewController.swift template heading by changing the copyright to “Copyright © 2017 Bill Cheeseman. All rights reserved. Used by permission.” and adding the line “Version 3.0.0”.
  • Revised ViewController.swift viewDidLoad() by setting constant element to UIElement() and calling element.shoutOut() to log the name of element’s class.
  • Built and ran the UIBrowser3 workspace.
  • Saved a snapshot of build version 1.

2017-03-09 (3.0.0 build 2)

Create MainWindowController.swift as the main window’s delegate, implement its windowShouldClose(_:) delegate method to control the main window’s size on relaunch using the frameAutosaveName mechanism, rename the ViewController.swift template as MainViewController.swift, and set the initial Main.storyboard template’s settings.

  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 2.
  • Revised Info.plist by setting CFBundleVersion (“Bundle version”) to 2.
  • Changed the target’s General - Identity - Application Category to Developer Tools.
  • Created a new Cocoa Class file MainWindowController.swift as a subclass of NSWindowController with no XIB file.
  • Revised the MainWindowController.swift template heading by changing the copyright to “Copyright © 2017 Bill Cheeseman. All rights reserved. Used by permission.” and adding the line “Version 3.0.0”.
  • Revised MainWindowController.swift by implementing the NSWindowDelegate protocol’s windowShouldClose(_:) delegate method to terminate the application when the main window is closed even if auxiliary windows remain open, and added NSWindowDelegate to the class declaration.
  • Revised Main.storyboard by setting the Window Controller Scene’s Window Controller’s Class to MainWindowController (which changes its sidebar name to “Main Window Controller”), setting its Autosave name to “MainWindowAutosaveName”, and connecting its delegate outlet to Main Window Controller.
  • Revised the ViewController.swift template by changing its name to MainContentViewController.swift, changing its class declaration to MainContentViewController, and changing its heading by changing its name to MainContentViewController.
  • Revised Main.storyboard by setting the View Controller Scene’s View Controller’s Class to MainContentViewController (which changes its sidebar name to “Main Content View Controller”).
  • Confirmed through testing that the frameAutoSaveName mechanism is working both when the application is quit and when the main window is closed after resizing it.
  • Saved a snapshot of build version 2.

2017-03-10 (3.0.0 build 3)

Create skeleton classes for all of the view controllers needed for a basic working user interface in the main window; namely, the main content view, main split view, master split item view, master tab view and browser, outline and list tab item views, detail split item view, detail tab view, and attributes, actions and notifications tab item view controllers.

  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 3.
  • Revised Info.plist by setting CFBundleVersion (“Bundle version”) to 3.
  • Revised MainContentViewController.swift by overriding the NSSeguePerforming protocol’s prepare(for:sender:) method and declaring the detailSplitViewItem dynamic variable, in preparation for adding a binding to the push on/push off disclosure button to enable the user to collapse and reveal the detail split view item.
  • Created a new Cocoa Class file MainSplitViewController.swift as a subclass of NSSplitViewController with no XIB file.
  • Revised the MainSplitViewController.swift template heading by changing the copyright to “Copyright © 2017 Bill Cheeseman. All rights reserved. Used by permission.” and adding the line “Version 3.0.0”.
  • Revised MainSplitViewController.swift by overriding the NSSplitViewDelegate protocol’s splitView(_:additionalEffectiveRectOfDividerAt:) method, to make the divider thicker for easy grabbing.
  • Revised MainSplitViewController.swift by overriding viewDidLoad() to set the bottom (detail) split view item’s minimumThickness and maximumThickkness properties, but commented it out when implemented Main.storyboard constraints to accomplish the same thing.
  • Created a new Cocoa Class file MasterSplitItemViewController.swift as a subclass of NSViewController with no XIB file.
  • Revised the MasterSplitItemViewController.swift template heading by changing the copyright to “Copyright © 2017 Bill Cheeseman. All rights reserved. Used by permission.” and adding the line “Version 3.0.0”.
  • Revised MasterSplitItemViewController.swift by overriding the NSSeguePerforming protocol’s prepare(for:sender:) method and declaring the masterTabViewController dynamic variable, in preparation for adding a binding to the segmented control to enable the user to select a master pane tab view item.
  • Created a new Cocoa Class file MasterTabViewController.swift as a subclass of NSTabViewController with no XIB file.
  • Revised the MasterTabViewController.swift template heading by changing the copyright notice to “Copyright © 2017 Bill Cheeseman. All rights reserved. Used by permission.” and adding the line “Version 3.0.0”.
  • Revised MasterTabViewController.swift by overriding NSResponder’s restorableStateKeyPaths() method to enable restoration of the last selected master tab view item at relaunch.
  • Created three new Cocoa Class files named “BrowserTabItemViewController.swift”, “OutlineTabItemViewController.swift” and “ListTabItemViewController.swift” as subclasses of NSViewController with no XIB files.
  • Revised the BrowserTabItemViewController.swift, OutlineTabItemViewController.swift and ListTabItemViewController.swift template headings by changing the copyright to “Copyright © 2017 Bill Cheeseman. All rights reserved. Used by permission.” and adding the line “Version 3.0.0”.
  • Created a new Cocoa Class file DetailSplitItemViewController.swift as a subclass of NSViewController with no XIB file.
  • Revised the DetailSplitItemViewController.swift template heading by changing the copyright to “Copyright © 2017 Bill Cheeseman. All rights reserved. Used by permission.” and adding the line “Version 3.0.0”.
  • Created a new Cocoa Class file DetailTabViewController.swift as a subclass of NSTabViewController with no XIB file.
  • Revised the DetailTabViewController.swift template heading by setting the copyright notice to “Copyright © 2017 Bill Cheeseman. All rights reserved. Used by permission.” and adding the line “Version 3.0.0”.
  • Revised DetailTabViewController.swift by overriding NSResponder’s restorableStateKeyPaths() method to enable restoration of the last selected master tab view item at relaunch.
  • Created three new Cocoa Class files named “AttributesTabItemViewController.swift”, “ActionsTabItemViewController.swift” and “NotificationsTabItemViewController.swift” as subclasses of NSViewController with no XIB files.
  • Revised the AttributesTabItemViewController.swift, ActionsTabItemViewController.swift and NotificationsTabItemViewController.swift template headings by setting the copyright notice to “Copyright © 2017 Bill Cheeseman. All rights reserved. Used by permission.” and adding the line “Version 3.0.0”.
  • Confirmed through testing that the application builds and runs, but the new classes cannot be tested until Main.storyboard is revised to make use of them (in build 5).
  • Saved a snapshot of build version 3.

2017-03-10 (3.0.0 build 4)

Revise Main.storyboard by experimentally setting up the Application’s Main Menu in the Application Scene, and revise Info.plist and create an InfoPlist.strings file to set the displayed application name of the application menu as UI Browser even though the project and bundle name is UIBrowser3.

  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 4.
  • Revised Info.plist by setting CFBundleVersion (“Bundle version”) to 4.
  • Revised Main.storyboard by changing the names of the About, Hide, Quit and Help menu items to refer to “UI Browser” instead of “UIBrowser3” in the Application’s Main Menu in the Application Scene.
  • Revised Main.storyboard by adding and removing other menus and menu bar items, including several that will be named in code, in the Application’s Main Menu in the Application Scene.
  • Revised Info.plist by adding a CFBundleDisplayName (“Bundle display name”) item and setting it to 'UI Browser".
  • Created an InfoPlist.strings file with CFBundleName and CFBundleDisplayName items set to “UI Browser”, and CFBundleShortVersionString and NSHumanReadableCopyright items, for localization.
  • Confirmed through testing that the application menu is named UI Browser.
  • Saved a snapshot of build version 4.

2017-03-10 (3.0.0 build 5)

Revise Main.storyboard by adding views for all of the new view controllers to create a basic working user interface in the main window; namely, the main content view, main split view, master split item view, master tab view and browser, outline and list tab item views, detail split item view, detail tab view, and attributes, actions and notifications tab item views, as well as the main window’s buttons. Also revised attributes of the main window.

  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 5.
  • Revised Info.plist by setting CFBundleVersion (“Bundle version”) to 5.
  • Set up Main.storyboard for all view controllers created in build 3 by copying the old Main.storyboard file from the 2016 build of UI Browser 3. This has the effect of replacing the experimental changes made to the Main.storyboard’s Application’s Main Menu in the Application Scene in build 4 (they are identical). It also has the effect of adding all of the main window’s buttons (but outlets, actions and supporting methods will be added in later builds).
  • Revised Main.storyboard by setting Main Window’s Tabbing Mode to Disallowed to remove the Show Tab Bar menu item from the View menu and related menu items from the Window menu.
  • Revised Main.storyboard by setting Main Window’s Spaces to Can Join All Spaces, Expose to Managed and Cycling to Participates in Cycle.
  • Changed the copyright notices in all files by adding “2003-”.
  • Confirmed through testing that the split view items can be resized by dragging the divider, that the Main.storyboard constraints work correctly when the split view items and main window are resized, that the master and detail tab view items can all be shown by clicking the segment control or tabs, that the Show Tab Bar menu items were successfully hidden, and that the application handles Spaces and Expose changes appropriately. Two problems were found and left for future consideration: (1) Double-clicking the split view divider does not collapse the detail split pane, and (2) dragging the split view divider does not collapse the split view’s detail pane.
  • Saved a snapshot of build version 5.

##2017-03-11 (3.0.0 build 6)
Set up and populate the main window’s Target pop-up button’s menu and the main menu bar’s Target menu.

  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 6.
  • Revised Info.plist by setting CFBundleVersion (“Bundle version”) to 6.
  • Revised MainContentViewController.swift by adding the targetPopUpButton IBOutlet and confirmed that it is connected in Main.storyboard to the main window’s Target pop-up menu, in preparation for providing its content and setting it as the main window’s initialFirstResponder.
  • Revised MainContentViewController.swift by overriding its viewWillAppear() method to set the main window’s initialFirstResponder to targetPopUpButton.
  • Revised MainContentViewController.swift by implementing the NSMenuDelegate protocol’s menuNeedsUpdate(_:) delegate method to update the main window’s Target pop-up menu by calling AppDelegate’s updateTargetMenu(_:) and declaring that MainContentViewController conforms to the NSMenuDelegate protocol, and confirmed that the main window’s targetPopUpButton’s menu outlet is connected to its Menu and Menu’s delegate outlet is connected to MainContentViewController.
  • Revised AppDelegate.swift by declaring appDelegate as a type variable, and revised the applicationDidFinishLaunching(_:) template delegate method to set its value to self, to make the appDelegate available to any other window or view controller.
  • Revised AppDelegate.swift by declaring targetMenu as an IBOutlet for use in menuNeedsUpdate(_:), and confirmed that is is connected to the main menu bar’s Target menu in Main.storyboard.
  • Revised AppDelegate.swift by implementing the NSMenuDelegate protocol’s menuNeedsUpdate(_:) delegate method to update the main menu bar’s Target menu by calling AppDelegate’s updateTargetMenu(_:), declaring that AppDelegate conforms to the NSMenuDelegate protocol, and confirmed that the main menu bar’s Target menu item’s Target Menu’s delegate outlet is connected to AppDelegate.swift.
  • Revised MainContentViewController.swift by declaring controller as a type variable, and revised viewDidLoad() to set its value to self, to make the main content view controller available to any other window or view controller.
  • Created a new Swift File Defines.swift to hold constants to be used in AppDelegate’s updateTargetMenu(_:) method.
  • Revised the Defines.swift template heading by setting the copyright notice to “Copyright © 2003-2017 Bill Cheeseman. All rights reserved. Used by permission.”, adding the line “Version 3.0.0” and deleting the import Foundation statement.
  • Revised Defines.swift by defining (in the order they are called in updateTargetMenu(_:)) the constants CHOOSE_NO_TARGET_TITLE, CHOOSE_ANY_TARGET_TITLE, RUNNING_APP_KEY, RUNNING_APP_NAME_KEY, NO_TARGET_MENU_ITEM_TAG, DISPLAYS_BACKGROUND_APPS_DEFAULTS_KEY, and DISPLAYS_BACKGROUND_APPS_SEPARATELY_DEFAULTS_KEY.
  • Revised MainContentViewController.swift by adding stubs for the chooseNoTarget(_:), chooseAnyTarget(_:) and chooseRunningTarget(_:) action methods.
  • Revised MainContentViewController.swift by adding the selectedTarget instance variable.
  • Revised MainContentViewController.swift by adding computed instance property processTrusted to be used to enable and disable controls and setting it to true temporarily. (It should be set to PFUIElement.isProcessTrustedWithOptions(nil) once PFAssistiveFramework4 is written.)
  • Revised AppDelegate.swift by implementing updateTargetMenu(_:) to update the main menu bar’s Target menu or the main window’s Target pop-up button when the user opens it.
  • Confirmed that the main menu bar’s Target menu’s Auto Enables Items setting and the Target popup button’s menu’s Auto Enables Items setting in Main.storyboard are turned off so manual enabling of menu items will work.
  • Confirmed through testing that the main window’s Target pop-up button’s menu and the main menu bar’s Target menu are populated with its fixed menu items and the running application names and open when clicked.
  • Saved a snapshot of build version 6.

##2017-03-11 (3.0.0 build 7)
Add functionality to the main window’s Target pop-up button’s menu and the main menu bar’s Target menu.

  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 7.
  • Revised Info.plist by setting CFBundleVersion (“Bundle version”) to 7.
  • Revised MainWindowController.swift by adding updateWindowTitle(with:). to set the window title and the menu bar Window menu’s window menu item
  • Revised MainWindowController.swift’s windowDidLoad() by calling updateWindowTitle(with:) to set the window title and the menu bar Window menu’s window menu item to CHOOSE_NO_TARGET_TITLE at launch.
  • Revised MainContentViewController.swift’s viewDidLoad() to set the target popup button’s title at launch.
  • Revised MainWindowController.swift by declaring controller as a type variable, and revised windowDidLoad() to set its value to self, to make the main window controller available to any other window or view controller.
  • Revised Defines.swift by adding IS_FINISHED_LAUNCHING_CONTEXT_VALUE, IS_FINISHED_LAUNCHING_KEYPATH, IS_TERMINATED_CONTEXT_VALUE and IS_TERMINATED_KEYPATH.
  • Revised MainContentViewController.swift by adding the launchedTarget, isFinishedLaunchingContext and isTerminatedContext instance variables.
  • Revised MainContentViewController.swift by adding stubs for updateTarget(_:) and clearTarget() to update and clear global target application information, updateTargetDisplay() and clearTargetDisplay() to update and clear the display of information about the target application, and updateTargetPopUpButton() and clearTargetPopUpButton() to update the target popup button’s title, all after the user chooses a new target application.
  • Revised MainContentViewController.swift by adding the observeValue(forKeyPath:ofObject:change:context:) KVO observing method.
  • Confirmed through testing that the window title and the menu bar Window menu’s window menu item are correctly set to CHOOSE_NO_TARGET_TITLE at launch. The remaining functionality of the main window’s Target pop-up button’s menu and the main menu bar’s Target menu cannot be tested until the data model is created in build 9.
  • Saved a snapshot of build version 7.

##2017-03-12 (3.0.0 build 8)
Set up the main content view’s remaining controls.

  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 8.
  • Revised Info.plist by setting CFBundleVersion (“Bundle version”) to 8.
  • Revised MainContentViewController by adding IBOutlets activateButton and accessCheckbox and confirmed that they are connected in Main.storyboard.
  • Revised MainContentViewController.swift by adding validateControls().
  • Revised MainContentViewController.swift by adding class initialize() method to register user defaults values.
  • Revised Defines.swift by defining the constants CHOOSING_TARGET_ACTIVATES_APPLICATION_DEFAULTS_KEY and TERMINOLOGY_DEFAULTS_KEY.
  • Revised MainContentViewController.swift by adding deinit method to unregister KVO.
  • Revised MainContentViewController.swift by adding a stub for validateMenuItem(_:).
  • Revised MainContentViewController.swift by adding a stub for updateTarget(withTimer:).
  • Revised Defines.swift by defining the constants SELECT_ELEMENT_TIMER_INTERVAL and SELECT_ELEMENT_TIMER_DURATION.
  • Revised MainContentViewController.swift by adding sheetForApplicationFailedToLaunch and sheetForApplicationUIElementNotCreated(_:).
  • Confirmed through testing that the new methods and stub methods cause no problems. The remaining functionality of the main window’s Target pop-up button’s menu and the main menu bar’s Target menu cannot be tested until the data model is created in build 9.
  • Saved a snapshot of build version 8.

2017-03-12 (3.0.0 build 9)

Set up the data model and its display in the browser view.

  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 9.
  • Revised Info.plist by setting CFBundleVersion (“Bundle version”) to 9.
  • Created a new Cocoa Class file ElementDataSource.swift as a subclass of NSObject with no XIB file.
  • Revised the ElementDataSource.swift template heading by setting the copyright notice to “Copyright © 2003-2017 Bill Cheeseman. All rights reserved. Used by permission.”, adding the line “Version 3.0.0”
  • Revised ElementDataSource.swift by copying the entire contents of ElementDataSource.swift from the 2016 build of UI Browser 3, and making Swift 3 conversions requested by Xcode.
  • Revised MainContentViewController’s viewDidLoad() method by adding temporary code to test PFAssistiveFramework4 builds 3 and 4.
  • Moved development to macOS Sierra 10.12.4, Xcode 8.3 and Swift version 3.1.

2017-08-21 (3.0.0 build 10)

Prepare to convert to Swift 4.

  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 10.
  • Changed the project’s MACOSX_DEPLOYMENT_TARGET (“macOS Deployment Target”) build setting to 10.13.
  • Revised Info.plist by setting CFBundleVersion (“Bundle version”) to 10.
  • Moved development to macOS High Sierra 10.13.6 dev beta 7 and Xcode 9 beta 6.
  • Updated to recommended Xcode build settings.
  • Successfully built in Swift 3.2, with warnings.
  • Successfully ran in Swift 3.2.
  • Moved initial user defaults registration from MainContentViewController’s initialize() function to AppDelegate’s applicationWillFinishLaunching(_:) function in response to warning that initialize() is not guaranteed to run and will be deprecated in future.
  • Fixed remaining warnings in MainContentViewController’s viewDidLoad().
  • Added missing QSWShowDetailSplitItemTemplate image to Assets.xcassets.
  • Commented out test code in MainContentViewController’s viewDidLoad() to avoid crash.
  • Saved a snapshot of build version 10.

2017-08-23 (3.0.0 build 11)

Convert to Swift 4.

  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 11.
  • Changed the project’s macOS Deployment Target to 10.13.
  • Revised ElementDataSource’s updateDataSourceForElementAtLevel(_:forIndex:) function by casting currentItem[“element”] as! AccessibilityElement in order to get its AXChildren property without a warning.
  • Changed Xcode project format to Xcode 8.0-compatible.
  • Fixed “No such module ‘PFAssistiveFramework4 module’” compiler error by temporarily moving AccessibilityElement.swift from the PFAssistiveFramework4 project to the UIBrowser3 project, converting to the new build system (File > Workspace Settings), converting only the UIBrowser3 project, and turning off conversion of both test targets. But I was later able to convert the test targets one at a time separately, which required no change because they are empty.
  • Ran converter; it reported a few source changes needed, and made them.
  • Completed migration for @objc inference minimized by turning off deprecated @obj inference.
  • Changed Xcode project format to Xcode 8.0-compatible.
  • Moved AccessibilityElement.swift back to the PFAssistiveFramework4 project, and resumed using the UIBrowser3 workspace to develop, build and run UI Browser.
  • Successfully built and ran in Swift 4.
  • Saved a snapshot of build version 11.

2017-08-29 (3.0.0 build 12)

Revise flow of control for choosing and launching a target application.

  • Moved development to macOS High Sierra 10.13 dev beta 8.
  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 12.
  • Revised MainWindowController’s updateWindowTitle(with:) method.
  • Implemented MainContentViewController’s chooseRunningTarget(_:) method.
  • Renamed MainContentViewController’s selectedTarget property to currentTarget.
  • Created extension on MainTargetViewController in TargetMenuExtension.swift, and moved the chooseNoTarget(_:), chooseAnyTarget(_:), and chooseRunningTarget(_:) action methods into it from MainTargetViewController.swift, and moved the updateTargetMenu(_:) method into it from AppDelegate.swift.
  • Renamed MainContentViewController’s updateTarget(_:) method to updateApplication(for:), and broke most of its code out into new method updateApplicationData().
  • Renamed MainContentViewController’s updateTargetDisplay() method to updateApplicationDisplay().
  • Implemented MainContentViewController’s updateApplication(for:withTimer:) method, and moved it into observeValue(forKeyPath:of:change:context:) as a closure.
  • Added MainContentViewController’s validateChosenTarget(_:) method to consolidate KVO observer management and test whether a new target that has finished launching has made access available.
  • Added MainContentViewController’s menuDidClose(_:) NSMenuDelegate delegate method to update the Target pop-up button’s title if the user opened its menu and then dismissed it without choosing an item.
  • Revised the MainContentViewController’s sheetForApplicationFailedToLaunch(name:) and sheetForApplicationUIElementNotCreated(name:) methods.
  • Added TargetMenuExtension’s updateTargetPopUpButton() method to consolidate Target pop-up button title management.
  • Implemented TargetMenuExtension’s chooseNoTarget(_:) action method.
  • Successfully built and ran in Swift 4.
  • Saved a snapshot of build version 12.

2017-09-06 (3.0.0 build 13)

Clean up handling of No Target menu item.

  • Moved development to macOS High Sierra 10.13 dev beta 9.
  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 13.
  • Revised TargetMenuExtension’s chooseNoTarget(_:) action method to call updateApplication(for:) with a nil target parameter to clear UI Browser’s data and display.
  • Revised MainContentViewController’s updateApplication(for:) to handle the nil target passed in from the chooseNoTarget(_:) action method by clearing UI Browser’s data and display.
  • Revised MainWindowController’s updateWindowTitle(for:) to take an NSRunningApplication parameter.
  • Successfully built and ran in Swift 4.
  • Saved a snapshot of build version 13.

2017-09-8 (3.0.0 build 14)

Implement Swift 3 KVO (removed in build 16).

  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 14.
  • Revised Defines.h and MainContentViewController to remove the KVO value constants because KVO only uses the addresses.
  • Revised Defines.h to remove the KVO key constants, and revised MainContentViewController and TargetMenuExtensions to use the #keyPath() expression instead.
  • Revised MainContentViewController and TargetMenuExtensions to add the context: parameter to all removeObserver() calls.
  • Successfully built and ran in Swift 4.
  • Saved a snapshot of build version 14.

2017-09-8 (3.0.0 build 15)

Implement Swift 4 KVO.

  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 15.
  • Implemented Swift 4 KVO by adding observe() method calls in TargetMenuExtension’s chooseAnyTarget(_:) for the isFinishedLaunching key path and in MainContentViewController’s validateChosenTarget(_:) for the isTerminated key path, and moving the two context blocks in the observeValue(forKeyPath:of:change:context:) Swift 3 KVO observer method into the two observe() methods’ handler blocks.
  • Added tests for #available(macOS 10.13, *) to call the observe() Swift 4 KVO methods when UI Browser is running on macOS High Sierra 10.13 or newer, and to call the addObserver() and removeObserver() Swift 3 KVO methods otherwise.
  • Revised MainContentViewController’s validateChosenTarget() method and changed it to validateTarget().
  • Successfully built and ran in Swift 4.
  • Saved a snapshot of build version 15.

2017-09-10 (3.0.0 build 16)

Change deployment target to OS X Yosemite 10.10, and remove all Swift 3 KVO code.

  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 16.
  • Changed the project’s MACOSX_DEPLOYMENT_TARGET (“macOS Deployment Target”) build setting to 10.10.
  • Revised TargetMenuExtension’s chooseAnyTarget(_:) action method to use repeating timer block only if #available(OSX 10.12, *) and otherwise post an alert.
  • Removed all tests for if #available(OSX 10.13, *), which should have been tests for #if swift(>=4.0) to limit use of new Swift 4 KVO observer method to builds performed with Swift 4, and removed all of the Swift 3 branches and the observeValue(forKeyPath:of:change:context:) Swift 3 KVO observer method, because we will never again build under Swift 3.
  • Revised TargetMenuExtension’s UpdateTargetMenu(_:) to break running background applications array into separate arrays for LSUIElement and LSBackgroundApplication applications, in anticipation of altering the preferences settings to eliminate or separate handling of the latter.
  • Successfully built and ran in Swift 4.
  • Saved a snapshot of build version 16.

2017-09-12 (3.0.0 build 17)

Clean up Target menu handling.

  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 17.
  • Modified all type properties allowing outside references to self by renaming them “shared”.
  • Revised TargetMenuExtension’s chooseAnyTarget(_:) and chooseRunningTarget(_:) action methods to do nothing if the chosen target is already the current target.
  • Revised TargetMenuExtensions by adding Markup documentation.
  • Moved development to macOS High Sierra 10.13 GM Candidate 1 and Xcode 9 GM.
  • Renamed MainContentViewController’s validateTarget(_:) method to validate(_:), moved it to TargetMenuExtension, and revised it.
  • Changed all references to NSRunningApplication’s localizedName to NSFileManager’s displayName per Apple Technical Q&A QA1544, including in MainWindowController’s updateWindowTitle(for:)
  • Implemented MainContentViewController’s displayNameForTarget() method using code extracted from updatedWindowTitle(), and called the new method in several places to save space and maintain consistency.
  • Implemented MainContentViewController’s displayName(for:) method for more general use.
  • Revised MainWindowController’s updateWindowTitle() by removing its parameter for consistency and improving efficiency.
  • Revised MainContentViewController’s viewDidLoad() method by registering it to observe the willPopUpNotification notification instead of implementing the menuNeedsUpdate(_:slight_smile: delegate method.
  • Removed MainContentViewController’s designation as NSMenuDelegate and removed its menuNeedsUpdate(_:) and menuDidClose(_:) delegate methods because no longer needed.
  • Implemented MainContentViewController’s targetPopUpButtonWillPopUp(_:) notification method and moved the last block of updateTargetMenu(_:) into it, with modifications modeled on UI Browser 2 code.
  • Revised AppDelegate’s MenuNeedsUpdate(_:) delegate method and moved the last block of TargetMenuExtensions’s updateTargetMenu(_:) into it, with modifications modeled on UI Browser 2 code.
  • Successfully built and ran in Swift 4.
  • Saved a snapshot of build version 17.

2017-09-20 (3.0.0 build 18)

Complete Target menu handling.

  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 18.
  • Moved development to Xcode 9 final (build version unchanged from GM) and Swift 4.0 final.
  • Revised TargetMenuExtension’s chooseAnyTarget(_:) action method extensively.
  • Implemented TargetMenuExtension’s targetValidationTimer(_:) method so it could be scheduled in two places in chooseAnyTarget(_:).
  • Renamed launchedTarget property to launchingTarget.
  • Added typealias RunningInfo and used it throughout TargetMenuExtension.
  • Implemented TargetMenuExtension’s chooseSystemwideTarget(_:) action method and the isSystemwideTarget variable to identify when a nil currentTarget signifies that the systemwide target instead of no target is chosen, and revised methods throughout to use it.
  • Renamed validate(_:) method to validate(target:).
  • Completed markup documentation in TargetMenuExtension.
  • Successfully built and ran in Swift 4.
  • Saved a snapshot of build version 18.

2017-09-25 (3.0.0 build 19)

Start setting up ElementDataSource and BrowserTabItemViewController.

  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 19.
  • Moved development to macOS High Sierra 10.13.0 final.
  • Revised MainContentViewController’s updateApplicationData() and updateApplicationDisplay().
  • Revised MasterTabViewController by adding “shared” type property allowing outside references to self and revised viewDidLoad() to set it.
  • Revised MasterSplitItemViewController by adding “shared” type property allowing outside references to self and revised viewDidLoad() to set it.
  • Revised Defines.swift by adding MASTER_TAB_VIEW_ITEM_DEFAULTS_KEY and the MasterTabViewItemIndex enum.
  • Revised AppDelegate’s applicationWillFinishLaunching(_:) delegate method to set MASTER_TAB_VIEW_ITEM_DEFAULTS_KEY to MasterTabViewItemIndex.Browser.rawValue at first launch.
  • Revised MasterSplitItemViewController by adding updateDisplay() method to update the master split item’s display when the user chooses a new target.
  • Revised MainContentViewController’s updateApplicationDisplay() to call MasterSplitItemViewController’s updateDisplay() method when the user chooses a new target.
  • Revised BrowserTabItemViewController to implement NSBrowser datasource item-based protocol, and declared it to conform to NSBrowserDelegate.
  • Successfully built in Swift 4, but it won’t yet successfully display the contents of the browser view.
  • Saved a snapshot of build version 19.

2017-10-10 (3.0.0 build 20)

Complete ElementDataSource and BrowserTabItemViewController for an application target.

  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 20.
  • Revise ElementDataSource by changing all uses of type AnyObject to Any to conform to Swift 3 and 4 usage in NSBrowserDelegate.
  • Revised BrowserTabItemViewController by implementing the selectElement(_:) action method and connected it to BrowserTabItemViewController’s first responder in Main.storyboard.
  • Successfully built and ran in Swift 4.
  • Saved a snapshot of build version 20.

##2017-10-12 (3.0.0 build 21)
Improve efficiency of choosing and validating a new target.

  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 21.
  • Revised TargetMenuExtension’s validate(target:) method to return the application AccessibilityElement object that was created to validate the proposed target, instead of discarding it, so it can be used in updateApplication(for:) to update ElementDataSource instead of recreating it; and renamed the method validatedTargetElement(for:).
  • Revised MainContentViewController’s updateApplication(for:) to take the AccessibilityElement returned by validatedTargetElement(for:) and pass it to updateApplicationData() to update ElementDataSource; and renamed the method updateApplication(forTarget:withElement:).
  • Revised MainContentViewController’s updateApplicationData() to take the AccessibilityElement returned by validatedTargetElement(for:) and use it to update ElementDataSource; and renamed the method updateApplicationData(withTargetElement:).
  • Revised chooseNoTarget(_:) and chooseSystemWideTarget(_:) action methods so they do not call validatedTargetElement(for:), and moved the code to clean out the old currentTarget to MainContentViewController’s updateApplication(forTarget:withElement:).
  • Revised validatedTargetElement(for:) so the parameter value is not optional, removed the nil branch, and added the code from the chooseNoTarget(_:) and chooseSystemWideTarget(_:) action methods to clean out the old currentTarget.
  • Revised all of the TargetMenuExtension’s action method signatures to specify NSMenuItem specifically as the sender type.
  • Revised the chooseAnyTarget(_:) action method by removing the isRunning(_:) nested function and replacing it with the NSRunningApplication array’s contains(where:) method, instead.
  • Revised the names of methods and properties throughout to comply with Apple’s API Design Guidelines for Swift 3 and 4.
  • Successfully built and ran in Swift 4.
  • Saved a snapshot of build version 21.

2017-10-15 (3.0.0 build 22)

Complete ElementDataSource and BrowserTabItemViewController for no target.

  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 22.
  • Moved development to Xcode 9.0.1.
  • Removed the isProcessTrusted global property and code that set it, and replaced all references to it with direct calls to the PFAssistiveFramework4 isProcessTrusted() method.
  • Implemented the NSBrowser+PFSmallBrowserAdditions Objective-C category file.
  • Revised BrowserTabItemViewController’s viewDidLoad() method to call methods implemented in the NSBrowser+PFSmallBrowserAdditions Objective-C category.
  • Implemented BrowserTabItemViewController’s clearView() method.
  • Revised MasterSplitItemViewController by implementing clearView() to call BrowserTabItemViewController’s clearView().
  • Revised MainContentViewController updateView() to call MasterSplitItemViewController’s clearView().
  • Revised several methods to use optional parameters.
  • Revised TargetMenuExtension’s validatedTargetElement(for:) method by limiting it to the validation code and moving other code to MainContentViewController’s updateApplication(for:using:), and by adding the role == NSAccessibilityRole.application.rawValue test.
  • Successfully built and ran in Swift 4.
  • Saved a snapshot of build version 22.

2017-10-22 (3.0.0 build 23)

Implement system-wide element data and display.

  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 23.
  • Changed the currentTarget, launchingTarget and currentDataSource properties to runningApplicationTarget, launchingApplicationTarget and currentElementData throughout.
  • Removed the isSystemWideTarget property.
  • Revised ElementDatasource by adding the updateDataSourceForSystemWideElement(element:) method.
  • Revised MainContentViewcontroller.displayName(for:) by adding an assertionFailure() call, returning empty string if error, and making returned string nonoptional.
  • Revised MainContentViewController.displayNameForTarget() by changing its name to displayNameForTargetApplication(), adding an assert() call if runningApplicationTarget is nil, calling displayName(for:) and returning empty string if error, and making returned string nonoptional.
  • Revised MainWindowController.updateWindowTitle() to handle SystemWide Target.
  • Revised TargetMenuExtension’s MainContentViewController.targetPopUpButtonWillPopUp(_:) to handle SystemWide Target.
  • Revised AppDelegate.menuNeedsUpdate(_:) to handle SystemWide Target.
  • Revised TargetMenuExtension’s MainContentViewController.updateTargetPopUpButton() by changing its name to UpdateTargetPopUpButtonTitle(), and to handle SystemWide Target.
  • Successfully built and ran in Swift 4.
  • Saved a snapshot of build version 23.

2017-10-25 (3.0.0 build 24)

Adopt PFAssistiveFramework4 AccessibilityElement changes.

  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 24.
  • Adopted PFAssistiveFramework4 build 11 changes to AccessibilityElement.
  • Revised TargetMenuExtension’s validatedTargetElement(for:) to call new AccessibilityElement.applicationElement(forProcessIdentifier:withDelegate:) class method.
  • Revised TargetMenuExtension’s chooseSystemWideTarget(_:) action method to call new systemWidwElement(withDelegate:) class method.
  • Successfully built and ran in Swift 4.
  • Saved a snapshot of build version 24.

2017-10-25 (3.0.0 build 25)

Simplify and clarify ElementDataSource code.

  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 25.
  • Made terminology changes throughout.
  • Revised BrowserTabItemViewController by adding Markup documentation.
  • Revised MainContentViewController.updateView() to call MasterSplitItemViewController.clearView() for running application targets as well as No Target and SystemWide Target, to work around NSBrowser bug relating to column titles.
  • Declared ElementDataSource’s typealias ElementNodeInfo in order to better hide the actual type.
  • Renamed ElementDataSource.currentItem to currentNode.
  • Renamed the ElementDataSource.elementArray property to elementTree.
  • Moved creation of elementTree and currentNode into init().
  • Renamed methods to nodeAt(level:index:), node(atIndexPath:), childNode(ofParentNode:atChildIndex:), nodeCount(atLevel:), element(ofNode:), childCount(ofNode:), indexPath(ofNode:), briefDescription(ofNode:), .
  • Revised the BrowserTabItemViewController.browser(_:child:ofItem:) NSBrowser datasource method to assert in debug mode that the type of item is ElementNodeInfo.
  • Changed ElementDataSource uses of item to node.
  • Removed ElementDataSource uses of AnyObject.
  • Added type designations for ElementNodeInfo.
  • Successfully built and ran in Swift 4.
  • Saved a snapshot of build version 25.

2017-10-30 (3.0.0 build 26)

Improve ElementDataSource code, change its terminology and write its markup documentation.

  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 26.
  • Moved development to macOS High Sierra 10.13.1 and Xcode 9.1.
  • Revised ElementDataSource by defining ElementNodeKey enumeration for element node dictionary keys.
  • Renamed ElementDataSource class to ElementDataModel.
  • Revised terminology throughout to refer to the model as the “data model” and “datasource” methods to “data source” methods.
  • Revised ElementDataModel by adding Markup documentation.
  • Revised ElementDataModel by renaming many methods to comply with Apple style guidelines.
  • Revised Defines.h by chaning the Terminology enumeration cases to lowercase.
  • Revised ElementDataModel.updateDataModel(forApplicationElement:) by moving inline code into the appleScriptDescriptions(forElement:) nested method.
  • Revised ElementDataModel.updateDataModelForCurrentElementAt(level:index:) by moving inline code into the appleScriptNameAndIndex(forElement:elementIndex:roleIndex:) nested method.
  • Revised ElementDataModel’s updateDataModel
 methods by removing multiple local variable declarations in favor of creating a node dictionary using inline method calls.
  • Revised ElementDataModel’s appleScriptClassNames variable, improved its error handling, and added the sheetForRolesAppleScriptFileFailedToLoad() method.
  • Pruned the list of AppleScript roles in RoleAppleScript.strings to match the System Events scripting dictionary.
  • Successfully built and ran in Swift 4.
  • Saved a snapshot of build version 26.

2017-11-05 (3.0.0 build 27)

Add support for the system-wide element in ElementDataSource.

  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 27.
  • Replaced RolesAppleScript.strings file with AppleScriptRoles.plist file.
  • Revised ElementDataModel.updateDataModel(forSystemWideElement:) by moving inline code into the appleScriptDescriptions(forElement:) nested method.
  • Revised MainContentViewController.updateView() to call MasterSplitItemViewController.shared.updateView() when the system-wide element is chosen as well as when an application element is chosen as the target.
  • Successfully built and ran in Swift 4.
  • Saved a snapshot of build version 27.

2017-11-06 (3.0.0 build 28)

Implement the Activate button’s activateTarget(_:slight_smile: action method.

  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 28.
  • Created extension on MainContentViewController in ActivateButtonExtension.swift.
  • Implemented ActivateButtonExtension’s activateTarget(_:) action method.
  • Connected activateButton outlet to First Responder’s activateTarget(_:) action method in Main.storyboard.
  • Successfully built and ran in Swift 4.
  • Saved a snapshot of build version 28.

2017-11-06 (3.0.0 build 29)

Import the PFAccessibilityAuthorizer2 framework and use it in the Accessibility checkbox’s action method and elsewhere.

  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 29.
  • Created extension on MainTargetViewController in AccessibilityCheckboxExtension.swift.
  • Implemented AccessibilityCheckboxExtension’s toggleAccessibility(_:) action method.
  • Connected accessibilityCheckbox outlet to First Responder’s toggleAccessibility(_:) action method in Main.storyboard.
  • Added the PFAccessibilityAuthorizer2 project to the UIBrowser3 workspace by dragging the project file into the root level of the workspace navigator.
  • Designated the PFAccessibilityAuthorizer2 project to the UIBrowser3 project as an embedded binary by using the plus button in the General pane.
  • Revised AccessibilityCheckboxExtension by importing PFAccessibilityAuthorizer2.
  • Revised AccessibilityCheckboxExtension toggleAccessibilityList(_:) by temporarily calling Authorizer().shoutOut() to test the PFAccessibilityAuthorizer2 framework.
  • Revised AppDelegate by importing PFAccessibilityAuthorizer2, declaring the accessibilityAuthorizer instance property, and revising the applicationWillFinishLaunching(_:) delegate method to create and initialize an instance of AccessibilityAuthorizer and set it to use sheets instead of modal alerts.
  • Revised applicationDidFinishLaunching(_:) by moving the definition of AppDelegate.shared to the applicationWillFinishLaunching(_:) delegate method, along with the accessibilityAuthorizer calls.
  • Revised the AccessibilityCheckboxExtension toggleAccessibility(_:) action method by calling accessibilityAuthorizer.updateAndOpenAccessibilityList().
  • Changed the target’s Packaging - PRODUCT_NAME (“Product Name”) build setting from $(Target_NAME) to UI Browser, so that PFAccessibilityAuthorizer2 will display it correctly in alerts while UI Browser is running in Xcode.
  • Revised AppDelegate’s applicationWillFInishLaunching(_:) delegate method to call PFAccessibilityAuthorizer2’s convenience initializer.
  • Added the menuDidClose(_:) delegate method to AppDelegate and the TargetMenuExtension on MainContentViewController to call requestAccess() after the Target menu is dismissed, and set MainContentViewController to conform to the NSMenuDelegate formal protocol.
  • Successfully built and ran in Swift 4.
  • Saved a snapshot of build version 29.

2017-11-21 (3.0.0 build 30)

Implement the NSUserInterfaceValidation and NSValidateUserInterfaceItem protocols for the Activate button in the MainContentViewController per Cocoa Recipes for Mac OS X (2nd Edition), Recipe 4, Step 4.

  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 30.
  • Created MainWindow.swift as a subclass of NSWindow to override its update() method, then decided to implement user interface validation in MainWindowController’s windowDidUpdate() delegate method instead.
  • Revised the MainWindow.swift template heading by changing the copyright to “Copyright © 2017 Bill Cheeseman. All rights reserved. Used by permission.” and adding the line “Version 3.0.0”.
  • Revised Main.storyboard by changing the Main Window Controller’s Main Window to Custom Class MainWindow instead of NSWindow.
  • Revised MainContentViewController.swift by implementing the custom ValidatedControl protocol as a subprotocol of the NSValidatedUserInterfaceItem protocol and implementing the ValidatedButton subclass of NSButton declaring that it conforms to the custom ValidatedControl protocol.
  • Revised Main.storyboard by setting the Activate button’s Custom Class to ValidatedButton instead of NSButton.
  • Revised MainWindowController by implementing the windowDidUpdate() delegate method and calling the custom ValidatedControl protocol’s update() method.
  • Revised MainContentViewController by implementing the validateUserInterfaceItem(_:) protocol method and declaring that MainContentViewController conforms to the NSUserInterfaceValidations formal protocol.
  • Successfully built and ran in Swift 4.
  • Saved a snapshot of build version 30.

2017-11-21 (3.0.0 build 31)

Implement the Detail button’s toggleDetailSplitItem(_:slight_smile: action method.

  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 31.
  • Revised MainContentViewController by adding its disclosureButton outlet, and connected it in Main.storyboard.
  • Created extension on MainContentViewController in DisclosureButtonExtension.swift.
  • Revised the DisclosureButtonExtension.swift template heading by changing the copyright to “Copyright © 2017 Bill Cheeseman. All rights reserved. Used by permission.” and adding the line “Version 3.0.0”.
  • Revised DisclosureButtonExtension by implementing the discloseDetailSplitItem(_:) action method to toggle the DetailSplitItem’s isCollapsed property.
  • Connected discloseDetailSplitItem(_:) action method to MainContentViewcontroller’s First Responder in Main.storyboard.
  • Revised DetailSplitItemViewController by implementing its shared static variable and setting it in viewDidLoad().
  • Revised MainSplitViewController by implementing splitView(_:canCollapseSubview) delegate method to return true for the detail split item, so we can collapse it by dragging the divider, but then removed it in favor of setting the value in Main.storyboard.
  • Revised MainContentViewController by changing the case statement in prepare(for:sender:) from MainContentViewSegueIdentifier to MainContentViewControllerSegueIdentifier, a bug that was preventing the detail split view from expanding and collapsing in some circumstances.
  • Renamed Disclosure button as Detail button and the discloseDetailSplitItem(_:) action method as toggleDetailSplitItem.
  • Revised the toggleDetailSplitItem(_:) action method to change only the isCollapsed property (removing the isHidden property), and added a call to the animator proxy to animate the expansion and collapse of the detail split item.
  • Revised Main.storyboard by changing the detail button to a Square Momentary Push In borderless button with the same image (renamed), and removed the proxy animator binding from Main.storyboard.
  • Revised Main.storyboard by disconnecting the delegate property of all NSWindow, NSTabView and NSSplitView objects because they are connected automatically by Xcode 9, per macOS High Sierra 10.13 AppKit Release Notes.
  • Confirmed through testing that the splitView(_ splitView:shouldCollapseSubview:forDoubleClickOnDividerAt:) delegate method does not work in macOS High Sierra 10.13, but left it in place for testing under eariler versions of macOS.
  • Successfully built and ran in Swift 4.
  • Saved a snapshot of build version 31.

2017-11-23 (3.0.0 build 32)

Make the Detail button a Toggle button with on and off images.

  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 32.
  • Created DetailToggleButtonOnTemplate.pdf and DetailToggleButtonOffTemplate.pdf images in Photoshop and added them to Assets.xcassets.
  • Revised MainContentViewController’s validateUserInterfaceItem(_:) protocol method by adding a branch to toggle the state of the detail button when the detail split view item is collapsed or expanded.
  • Revised Main.storyboard by setting the detail button’s Custom Class to ValidatedButton instead of NSButton.
  • Successfully built and ran in Swift 4.
  • Saved a snapshot of build version 32.

2017-11-23 (3.0.0 build 33)

Make Target menu and Accessibility checkbox respond to changes in access status.

  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 33.
  • Revised MainContentViewController’s validateUserInterfaceItem(_:) protocol method by adding a branch to update the state of the Accessibility checkbox based on the value of isProcessTrusted.
  • Revised Main.storyboard by setting the accessibility checkbox’s Custom Class to ValidatedButton instead of NSButton.
  • Revised MainContentViewController’s viewDidLoad() method to observe the AccessAuthorizer.didChangeAccessStatusNotification notification, and added the didChangeAccessStatus(_:) notification method to respond by clearing the application and setting the Target menu to No Target.
  • Revised TargetMenuExtension by adding an import PFAccessibilityAuthorizer2 statement
  • Revised the MainContentViewController.validateUserInterfaceItem(_:) notification method to use a switch statement.
  • Successfully built and ran in Swift 4.
  • Saved a snapshot of build version 33.

2017-11-25 (3.0.0 build 34)

Conform MainContentViewController to AccessibilityElement’s AccessibleElementDelegate protocol observing elements’ destruction.

  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 34.
  • Revised MasterSplitItemViewController by implementing the refreshApplication(_:) action method.
  • Revised Main.storyboard by connecting the refreshApplication(_:) action method to First Responder.
  • Revised MasterSplitItemViewController by implementing refreshApplicationToRoot(_:slight_smile: for Shift-click on refresh application button.
  • Revised MainContentViewController’s viewDidLoad() by registering as an observer of the PFAssistiveFramework4 AccessibilityElement’s elementWasDestroyedNotification.
  • Revised MainContentViewController by implementing the elementWasDestroyed(_:) notification method as a test stub.
  • Revised ElementDataModel.updateDataModelForCurrentElementAt(level:index:) to set every child element’s delegate property when it is added to the data source for display.
  • Revised MainContentViewController by implementing an extension on MainContentViewController declaring that it conforms to the AccessibleElementDelegate formal protocol, and moved the notification method test stub into the extension, so it can also serve as the delegate method as well as a notification method.
  • Successfully built and ran in Swift 4.
  • Saved a snapshot of build version 34.

2017-12-01 (3.0.0 build 35)

Revise ElementDataModel to cache selected parent and child nodes and track the selected element path as the user selects UI elements.

  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 35.
  • Revised ElementDataModel’s ElementNodeKey enum by adding .parentNodeKey and .childNodeKey.
  • Revised ElementDataModel by implementing the elementPath property.
  • Revised ElementDataModel’s designated initializer by creating elementPath as an empty array.
  • Revised ElementDataModel updateDataModel(forSystemWideElement:) and updateDataModel(forApplicationElement:) by adding .parentElementKey and .childElementKey values of an empty dictionary to the node.
  • Revised ElementDataModel updateDataForCurrentElementAt(level:index:) by setting the selected node’s parent node’s child node, setting the parent nodes of all of the selected node’s child nodes to the selected node, setting their child nodes to an empty dictionary, and updating the elementPath property.
  • Revised ElementDataModel clearDataModel() by removing all from elementPath.
  • Successfully built and ran in Swift 4.
  • Saved a snapshot of build version 35.

2017-12-02 (3.0.0 build 36)

Implement color coding for destroyed elements.

  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 36.
  • Moved development to Xcode 9.2, Swift 4.0.3.
  • Revised MainContentViewController by implementing the destroyedColor property.
  • Revised BrowserTabItemViewController by implementing the browser(_:wilDisplayCell:atRow:column:) optional item-based NSBrowser delegate method.
  • Revised BrowserTabItemViewController by implementing modifiedObjectValueForCell(_:atRow:column:), called by the browser(_willDisplayCell:atRow:column:) delegate method, to change the color of destroyed elements to destroyedColor just before the element is displayed.
  • Revised BrowserTabItemViewController by implementing the browser(_:isColumnValid:) delegate method to return false if any cell in the column is destroyed, thereby forcing NS Browser to reload the column, and revised the MainContentViewController elementWasDestroyed delegate method to call the browser’s validateVisibleColumns() method to call browser(_:isColumnValid:) on every visibile column. Confirmed that this caused all destroyed elements to turn destroyedColor as soon as any one of them was destroyed.
  • Removed the new column validation methods because they are too inefficient, being called by every element that is destroyed and repeatedly redrawing all of them on each call. Will instead call reloadData(forRowIndexes:inColumn) only once for each cell holding a destroyed element and only for that element. The ElementDataModel must set the indexPath of each AccessibleElement when it is added to the data source, so it can efficiently tell the browser which row and column it is in when it is destroyed instead of forcing the browser to search for it.
  • Revised AccessibleElement by adding an indexPath property.
  • Revised MainContentViewController’s elementWasDestroyed(_:) delegate method to call reloadData(forRowIndexes:inColumn).
  • Successfully built and ran in Swift 4, but errors when select a destroyed element.
  • Saved a snapshot of build version 36.

2018-01-17 (3.0.0 build 37)

Review all for best Swift 4 practices.

  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 37.
  • Revised AppDelegate.menuNeedsUpdate(_:) by adding assert() to test assignment to ‘controller’ instead of using a guard block.
  • Revised all classes that declare a ‘shared’ type property to use a ‘sharedInstance’ property instead.
  • Revised AppDelegate.swift by removing its ‘sharedInstance’ property, and replaced all calls to it with NSApp.delegate.
  • Revised MainContentViewController.displayNameForTargetApplication() by removing unneeded reference to ‘MainContentViewController.sharedInstance’.
  • Revised MainContentViewController by adding ‘@objc dynamic’ to the detailSplitViewItem property.
  • Revised MasterSplitItemViewController.swift by calling masterTabViewController instead of MasterTabViewController.sharedInstance in updateView() and clearView().
  • Revised AppDelegate.menuDidClose(_:) by testing ‘menu == targetMenu’ instead of ‘menu.title == TARGET_MENU_TITLE’.
  • Revised MainContentViewController.menuDidClose(_:) (in TargetMenuExtension) by testing ‘menu == targetPopUpButton.menu’ instead of menu.numberOfItems, etc.
  • Revised MainWindowController.windowDidUpdate(_:) by replacing for-in loop with forEach closure.
  • Revised MainWindowController.prepare(for:sender:) by adding preconditionFailure() to default case of switch statement, and in other locations.
  • Revised MainWindowController.updateTargetMenu(_:) (in TargetMenuExtension) by replacing for-in loops with forEach closures, combining them into a nested function, and simplifying the sort routines.
  • Revised MasterSplitItemViewController.refreshApplication() by replacing for-in loop with forEach closure.
  • Successfully built and ran in Swift 4.
  • Saved a snapshot of build version 37.

2018-01-26 (3.0.0 build 38)

Redesign user interface validation per https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/UIValidation/UIValidation.html#//apple_ref/doc/uid/10000040i.

  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 38.
  • Revised forEach loops to use ‘let’ declarations inside loops instead of ‘var’ declarations outside loops.
  • Revised MainContentViewController by implementing the updateValidatedControls() method to validate and update controls that conform to the ValidatedControls subprotocol of the NSUserInterfaceItem protocol, using code formerly located in MainWindowController.windowDidUpdate(_:).
  • Revised the MainWindowController.windowDidUpdate(_:) delegate method by calling the new MainContentViewController.updateValidatedControls() method.
  • Revised MainContentViewController.updateValidatedControls to avoid creating a local constant.
  • Revised MainContentViewController’s ValidatedButton.update() method to make it more general.
  • Successfully built and ran in Swift 4.
  • Saved a snapshot of build version 38.

#2018-01-28 (3.0.0 build 39)
Make the Detail toggle button conform to the current system control tint per https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/DrawColor/Tasks/SystemTintAware.html#//apple_ref/doc/uid/20002180-BCIBFAHH.

  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 39.
  • Revised Info.plist NSHumanReadableCopyright (Copyright (human-readable)) and InfoPlist.strings NSHumanReadableCopyright ending year to 2018.
  • Renamed MainContentViewController.updateApplication(for:using:) as updateApplication(forNewTarget:usingTargetElement:).
  • Renamed MainContentViewController.updateData(using:) as updateData(usingTargetElement:).
  • Revised Main.storyboard by connecting Main Content View Controller’s detailButton IBOutlet to the Detail button.
  • Revised Assets.xcassets by replacing DetailToggleButtonOnTemplate and DetailToggleButtonOffTemplate images with Blue and Graphite counterparts DetailToggleButtonBlueOn, DetailToggleButtonBlueOff, DetailToggleButtonGraphiteOn andf DetailToggleButtonGraphiteOff.
  • Revised Main.storyboard by changing the Detail button’s Image Set settings to Render As: Default, Resizing: Preserve Vector Data, Devices: Mac, and Scales: Single Scale.
  • Revised MainContentViewController (in DetailButtonExtension.swift) by implementing the setDetailButtonColor() method to set the Detail button’s image based on the current Tint Color and expanded or collapsed state of the main split view.
  • Revised MainContentViewController.viewDidLoad() by registering to observe the NSColor.currentControlTintDidChangeNotification notification.
  • Revised MainContentViewController by implementing the systemTintDidChange() notification method to call the setDetailButtonColor() method (and similar methods for any other custom controls) when the user changes the Appearance setting in General preferences.
  • Revised AppDelegate by implementing the applicationDidBecomeActive(_:) and applicationDidResignActive(_:) NSApplicationDelegate delegate methods to change the Detail button’s color to graphite (clear) when the application is not active.
  • Revised the Detail button images to use thinner lines.
  • Successfully built and ran in Swift 4.
  • Saved a snapshot of build version 39.

2018-02-05 (3.0.0 build 40)

Implement the refreshApplication action method and support, and clean up build 37’s errors when selecting a destroyed element.

  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 40.
  • Revised ElementDataModel by implementing clearDataModelBeyondLevel(_:) method.
  • Revised ElementDataModel by renaming private properties elementTree as elementNodeTree, elementPath as currentElementNodePath and currentNode as currentElementNode, renaming public property indexPathOfCurrentElement as currentElementIndexPath, and adding public property currentElementPath.
  • Revised ElementDataModel.updateDataModelForCurrentElementAt(level:index:) to fix two bugs (1) by removing the guard statement and adding currentElementNode to currentElementNodePath even when it has no children (it is a leaf node), and (2) by removing a previous currentElementNode from currentElementNodePath if the user selected a differrent row in the currently selected column.
  • Revised MasterSplitViewController.refreshApplication().
  • Revised ElementDataModel by adding the removeNodeAt(level:Index:), nodesAt(level:) and elements(atLevel:) methods.
  • Successfully built and ran in Swift 4.
  • Saved a snapshot of build version 40.

2018-03-14 (3.0.0 build 41)

Implement OutlineTabItemViewController and ListTabItemViewController.

  • Changed the project’s Versioning - CURRENT_PROJECT_VERSION (“Current Project Version”) build setting to 41.
  • Revised OutlineTabItemViewController and ListTabItemViewController by declaring that they conform to the NSOutlineViewDataSource and NSTableViewDataSource protocols.
  • Revised MasterSplitItemViewController’s updateView() and clearView() methods to call the corresponding OutlineTabItemViewController and ListTabItemViewController methods.
  • Revised OutlineTabItemViewController and ListTabItemViewController by implementing updateView() and clearView() method stubs.
  • Revised OutlineTabItemViewController and ListTabItemViewController by implementing a sharedInstance type property and setting it in viewDidLoad().
  • Revised Main.storyboard by inserting a path control and outline view in the Outline Tab Item View Controller Scene and a path control and a table view in the List Tab Item View Controller Scene, by connecting their dataSource outlets, and by configuring their constraints.
  • Revised OutlineTabItemViewController and ListTabItemViewController by adding an elementOutline and elementList IBOutlet, and connected them in Main.storyboard.
  • Revised OutlineTabItemViewController and ListTabItemViewController by implementing the selectElement(_:slight_smile: action method and connected them in Main.storyboard. This is subject to rethinking because it could all be done in the 
DidSelect delegate method instead, if nothing needs to be done when a clicked row was already selected.
  • Revised ListTabItemViewController by declaring the listPathControl IBOutlet, and by connecting it in Main.storyboard.
  • Revised ListTabItemViewController by implementing the numberOfRows(in:) dataSource method and the tableView(_:viewFor:row:) delegate method for view-based tab views.
  • Revised Main.storyboard by connecting the List Tab Item View Controller’s path control’s delegate outlet to ListTabItemViewController, in addition to the dataSource outlet.
  • Revised ListTabItemViewController by declaring that it conforms to the NSPathControlDelegate protocol.
  • Revised ListTabItemViewController by implementing the pathControl(_:willPopUp:) delegate method.
  • Revised ListTabItemViewController.swift by declaring the clickedPathControlItemIndex global variable used in the pathControl(_:willPopUp:) delegate method to populate the pop-up menu based on the selected item.
  • Revised ListTabItemViewcontroller by declaring the ListPathControl subclass of NSPathControl and implementing an override of mouseDown(with:) to set the new clickedPathControlItemIndex global variable.
  • Moved development to Xcode 9.3.1, Swift 4.1.
  • Moved development to Xcode 9.4.0, Swift 4.1.2.
  • Saved a snapshot of build version 41 (2018-10-28).

====

2018-10-28 (3.0.0 build 42)

Update to macOS Mojave 10.14, Xcode 10, and Swift 4.2.

  • Moved development to macOS Mojave 10.14.0, Xcode 10.0.0, Swift 4.2.
  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 42.
  • Changed the Project’s Deployment (macOS Deployment Target or MACOSX_DEPLOYMENT_TARGET) to macOS 10.14.
  • Revised the MasterSplitItemViewController.swift and MainContentViewController.swift prepare(for:sender:) methods to use as? instead of as! to fix build errors.
  • Miscellaneous revisions to UIBrowser3 ListTabItemViewController.swift to begin dealing with Mojave deprecations of NSPathControl cell methods.
  • Removed references to UIBrowser3Tests and UIBrowser3UITests targets and deselected Test for them in UIBrowser3 scheme to prepare for conversion to Swift 4.2.
  • Converted the Target to Current Swift Syntax (Swift 4.2).
  • Changed the Project’'s Swift Compiler - Language (Swift Language Version or SWIFT_VERSION) to Swift 4.2.
  • Revised Main.storyboard to change the placeholder for the outline and list master tab view items from “root” to “No Target.”
  • Saved a snapshot of build version 42.

2018-10-28 (3.0.0 build 43)

Complete a version of the list path control and its pop-up menu in ListTabItemViewController subclassing NSPathControl to capture a mouse down event to position the first menu item.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 43.
  • Revised ListTabItemViewController updateView() and clearView() to eliminate the use of the “root” placeholder and the “root” persistent first path control item.
  • Implemented the ListTabItemViewController selectPathControlItem(_:) action method to set the clickedPathControlItemIndex property and connected it to the list path control in Main.storyboard.
  • Revised the ListPathControl mouseDown(with:) override method to create the pop-up menu and position it over the clicked path control item.
  • Renamed the ListTabItemViewController menuForCell(_:) method as menuForPathItem(_:) and revised it to remove the “root” item.
  • Revised the ListTabItemViewController selectElement(_:) action method.
  • Moved development to macOS Mojave 10.14.1, Xcode 10.1.0, Swift 4.2.1.
  • Cleaned out old comments and unused code.
  • Saved a snapshot of build version 43.
  • Commited Source Control.

##2018-11-01 (3.0.0 build 44)
Implement a new version of the list path control and its pop-up menu in ListTabItemViewcontroller using NSMenuDelegate for the list path control pop-up menu without subclassing NSPathControl to position the first menu item.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 44.
  • Revised Main.storyboard by disconnecting the list path control’s delegate connection.
  • Revised ListTabItemViewController by declaring that it conforms to the NSMenuDelegate formal protocol.
  • Revised ListTabItemViewController menuForPathItem(_:) by setting the controller as the new pop-up menu’s delegate.
  • Revised ListTabItemViewController by mplementing stubs for ListTabItemViewController menuNeedsUpdate(_:) and menu(_:willHighlight).
  • Removed the ListPathControl subclass of NSPathControl and its mouseDown(with:) override method.
  • Revised ListTabItemViewController by renaming the selectPathItem(_:) action method popUpPathControlMenu(_:), and revising it to not only detect which path item was clicked but also to create the pop-up menu, set its delegate, configure its menu items with an express call to the menuNeedsUpdate(_:) delegate method, and pop it up with the menu item for the clicked path item positioned over the clicked path item.
  • Revised ListTabItemViewController by moving the menuForPathItem(_:) code that creates menu items into configurePathControlMenu(_:) and the code that sets a submenu into the menu(_:willHighlight:) delegate method.
  • Revised ListTabItemViewController by removing menuForPathItem(_:) because the top-level menu is now created in the popUpPathControlMenu(_:) action method and the menu items and submenus are created in the delegate methods.
  • Revised ListTabItemViewController by moving the configurePathControlMenu(_:) code into the menuNeedsUpdated(_:) delegate method and removing configurePathControlMenu(_:), because.
  • Added an extension on NSMenu to get the level of a path item submenu in the delegate methods.
  • Generally revised all of the code for the list path control and the pop-up menu to work correctly.
  • Revised ElementDataModel updateDataModelForCurrentElementAt(level:index:) to update level and index, not index always set to 0 (which was for testing).
  • Revised ListTabItemViewController by implementing the NSMenuDelegate menuWillOpen(_:) and menuDidClose(_:slight_smile: delegate methods to cache the datasource when the user opens the list path control pop-up menu and restore it if the user closes the menu without choosing a menu item. This required adding methods to ElementDataModel.
  • Revised ElementDataModel by adding the cachedElementNodeTree private instance variable and the cacheDataModel(_:) and restoreDataModel(_:) methods.
  • Revised ElementDataModel by adding mediumDescription(ofNode:) method for use in the path control pop-up menu, and made many other changes to accommodate it.
  • Cleaned out old comments and unused code.
  • Saved a snapshot of build version 44.
  • Commited Source Control.

2018-11-13 (3.0.0 build 45)

Fix remaining issues in the list path control and its pop-up menu.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 45.
  • Revised ElementDataModel by adding the cachedCurrentIndexPath private instance variable and removing the cachedElementNodeTree, cachedCurrentElementNode and cachedCurrentElementNodePath private instance variables.
  • Revised ElementDataModel by revising cacheDataModel(_:) and restoreDataModel(_:) methods to save only the current index path and restore in a loop by calling updateDataModelForCurrentElementAt(level:index:) for each level of the index path.
  • Revised ListTabItemViewController by implementing the menuWasDismissed() @objc method and performing after a delay in the menuDidClose(_:) delegate method to determine whether the user dismissed the path control pop-up menu without selecting a UI element.
  • Revised ListTabItemViewController selectElement(_:) and updateView() to set the font size of the list path control titles to small.
  • Cleaned out old comments and unused code.
  • Saved a snapshot of build version 45.
  • Commited Source Control.

2018-11-16 (3.0.0 build 46)

Fix segmented control and View > UI Elements menu in the Master split view to display an existing datasource in the list view when switching from another view.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 46.
  • Revised MasterSplitItemViewController by implementing the showMasterTabItem(_:) action method calling showView() and connecting it to the masterTabViewSelector segmented control in Main.storyboard.
  • Revised Main.storyboard Main Menu by rewording the “Show UI Element Hierarchy” menu as “UI Elements” and changing its menu items as “Show in Browser”, “Show in Outline” and “Show in List”.
  • Revised Main.storyboard Main Menu by rewording the “Show UI Element Detail” menu as “UI Element Information” and changing its menu items as “Show Attributes”, “Show Actions” and “Show Notifications”.
  • Revised Main.storyboard by connecting the showMasterTabItem(_:) action method to the masterTabViewSelector segmented control and the View > UI Elements > Show menu items.
  • Revised MasterSplitItemViewController by implementing the validateMenuItem(_:) protocol method for the View > UI Elements > Show menu items, and declared that the controller conforms to the NSMenuItemValidation formal protocol.
  • Revised Main.storyboard by adding tags to the segmented control items and View > UI Elements > Show menu items, for use in the action method.
  • Revised MasterSplitItemViewController by implementing the showView() method called by the showMasterTabItem(_:) action method.
  • Revised ListTabItemViewController by implementing the showView() method called by the MasterSplitItemViewController showView() method.
  • Saved a snapshot of build version 46.
  • Commited Source Control.

2018-11-17 (3.0.0 build 47)

General improvements to the browser and list views, including more fixes for the segmented control and View > UI Elements menu in the Master split view.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 47.
  • Revised BrowserTabItemViewController by implementing the showView() method called by the MasterSplitItemViewController showView() method.
  • Revised BrowserTabItemViewController by implementing the browserWillScroll(_:) delegate method to work around a longstanding bug that leaves a browser column title undisplayed when a hidden column scrolls into view.
  • Revised BrowserTabItemViewController and ListTabItemViewController showView() methods to call clearView() if the chosen target was No Target when the master tab view item was switched.
  • Revised ListTabItemViewController selectElement(_:slight_smile: action method to handle user clicking a table row by updating the list path control, the data model, and the list view.
  • Revised ListTabItemViewController by moving the table view branch of the selectElement(:slight_smile: action method into the tableViewSelectionDidChange(:slight_smile: delegate method to handle selection using the mouse or keyboard there and leave the action method to handle only the list path control.
  • Revised ElementDataModel by adding updateIsPending instance variable and setting it to true in all of the update
 methods, and setting it to false in the ListTabItemViewController tableViewSelectionDidChange(_:) delegate method after using it to avoid duplicate updates to the data model.
  • Cleaned out old comments and unused code.
  • Saved a snapshot of build version 47.
  • Commited Source Control.

2018-11-22 (3.0.0 build 48)

Create new class ElementPathControlManager to consolidate code for the path controls for reuse in the other master tab item element views.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 48.
  • Created a new file ElementPathControlManager.swift and implemented the ElementPathControlManager class in it.
  • Revised ListTabItemViewController and ElementPathControlManager by moving all code relating to the management of the list path control from the former to the latter.
  • Revised MasterSplitItemViewController by adding the currentElementView() method, and revised ElementPathControlManager to use it in the menuDidClose(_:) delegate method to make the current element view first responder so it will respond to arrow key presses.
  • Revised MasterSplitItemViewController by adding the currentTabItemSelectElementAction() method, and revised ElementPathControlManager to use it in the menuNeedsUpdate(_:) delegate method to set the current element view’s selectElement(_:) as the action method for pop-up menu items.
  • Saved a snapshot of build version 48.
  • Commited Source Control.

##2018-11-23 (3.0.0 build 49)
Implement right-click contextual menu in the list view.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 49.
  • Created the ListTableView subclass of NSTableView and implemented an override of NSTableView menu(for:) to create a contextual menu automatically and set its delegate to ListTabItemViewController when the user right-clicks or Control-clicks the list view.
  • Revised ListTabItemViewController to declare that it conforms to the NSMenuDelegate protocol.
  • Revised ListTabItemViewController by adding the menuNeedsUpdate(_:), menu(_:willHighlight:) and menuWillClose(_:) NSMenuDelegate methods to handle the contextual menu.
  • Revised ListTabItemViewController by implementing the menuWasDismissed() @objc method and performing after a delay in the menuDidClose(_:) delegate method to determine whether the user dismissed the contextual menu without selecting a UI element.
  • Revised ListTabItemViewController by implementing the selectElementWithContextMenu(_:) action method.
  • Revised ElementDataModel nodesAt(level:) and one other to return nil if level is out of range.
  • Saved a snapshot of build version 49.
  • Commited Source Control.

2018-12-01 (3.0.0 build 50)

Implement the updateNeedsDisplay and selectionWasUpdated flags to manage selections, data model updates and their display in the list view.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 50.
  • Revised the ListTabItemViewController selectElement(_:) action method by updating the dataSource for the final selection, to make sure the dataSource is always correct after an element is selected because updates during menu navigation do not update it when the mouse is moved to the left to a shallower level.
  • Revised ElementDataModel and other classes by renaming the updateIsPending instance property as updateNeedsDisplay.
  • Revised ListTabItemViewController showView() by setting updateNeedsDisplay to false instead of true.
  • Revised ListTabItemViewController upddateView() by setting updateNeedsDisplay to false.
  • Revised ListTabItemViewController by declaring the selectionWasUpdated instance property and initializing it to false, setting it to true in updateView(), showView(), clearView(), selectElement(_:) and selectElementWithContextMenu(_:), and testing it and setting it to false in the tableViewSelectionDidChange(_:) delegate method.
  • Saved a snapshot of build version 50.
  • Commited Source Control.

2018-12-02 (3.0.0 build 51)

Implement a toolbar for the main content view controls.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 51.
  • Revised Main.storyboard by dragging a toolbar from the library to the MainWindowController scene, set its Display to Icon Only, not Customizable and no Separator, and set its Size to Small.
  • Copied and pasted the Target pop-up menu, Activate button, Accessibility checkbox and Split view button into the Allowed Toolbar Items area of the toolbar controller; removed the default Colors, Fonts and Print toolbar items, and dragge the 4 new items into the Default area.
  • Resized the container view in the Main Content View Controller scene to fill it to the top, remove the 4 controls left underneath, and changed the Top Space constraint from 8 below the Target Pop Up Menu to Superview.
  • Revised MainWindowController by moving the 4 tool bar controls IBOutlet declarations from MainContentViewController because the toolbar is in the main window area outside of its main content view.
  • Revised MainContentViewController and extension references to the 4 controls by adding MainWindowController.sharedInstance to the reference path.
  • Revised MainContentViewController by moving the targetPopUpButton initialization code from viewDidLoad() to viewWillAppear() to it is called after MainWindowController initializes its sharedInstance property in windowDidLoad().
  • Saved a snapshot of build version 51.
  • Commited Source Control.

2018-12-03 (3.0.0 build 52)

Modernize the layout of the master and detail split views.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 52.
  • Revised Main.storyboard by changing the constraints on the master and detail split item container views and the Browser, Outline and List Tab Item views to eliminate gaps around the edges of the window.
  • Revised Main.storyboard by setting the Detail Tab View Controller scene Style to Tabs on Top instead of Unspecified, to eliminate the border around the edge and the dark background.
  • Saved a snapshot of build version 52.
  • Commited Source Control.

2018-12-03 (3.0.0 build 53)

Continue Implementing OutlineTabItemViewController.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 53.
  • Revised OutlineTabItemViewController by declaring the elementPathControlManager instance property and initializing it.
  • Revised OutlineTabItemViewController by delaring the selectionWasUpdated instance property and initializing it.
  • Revised OutlineTabItemViewController by declaring the outlinePathControl IBOutlet and connected it in Main.storyboard.
  • Revised OutlineTabItemViewController viewDidLoad() by setting the font size of the path control.
  • Revised OutlineTabItemViewController updateView(), showView(), clearView(), popUpPathControlMenu(_:) and selectElement(_:), by adapting them from ListTabItemViewController.
  • Revised OutlineTabItemViewController by implementing the outlineView(_;child:ofItem:), outlineView(_:isItemExpandable:), outlineView(_:numberOfChildrenOfItem:) and outlineView(_:objectValueFor:byItem:) NSOutlineViewDataSource methods.
  • Revised OutlineTabItemViewController by declaring that it conforms to the NSOutlineDelegate protocol
  • Revised Main.storyboard by connecting the outline view’s delegate outlet and disconnecting its action method.
  • Revised OutlineTabItemViewController viewDidLoad() by calling elementOutline.reloadData() per Apple’s NSOutlineView documentation.
  • Revised OutlineTabItemViewController outlineView(_:numberOfChildrenOfItem:) by returning 0 if the data source is empty per Apple’s NSOutlineView documentation.
  • Saved a snapshot of build version 53.
  • Commited Source Control?

2018-12-06 (3.0.0 build 54)

Fix Detail Tab View tabs in Main.storyboard.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 54.
  • Revised Main.storyboard in numerous ways to make the detail tab view look better.
  • Saved a snapshot of build version 54.
  • Commited Source Control.

2018-12-06 (3.0.0 build 55)

Continue Implementing OutlineTabItemViewController.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 55.
  • Revised ListTabItemViewController viewDidLoad() to call elementList.reloadData() and the numberOfRows(in:) NSTableViewDataSource method per Apple’s NSTableView documentation, to match similar code in OutlineTabItemViewController viewDidLoad() and the outlineView(_:numberOfChildrenOfItem:) NSOutlineViewDataSource method per Apple’s NSOutlineView documentation.
  • Revised OutlineTabItemViewController updateView() to expand the first row to show the children of the selected root application UI element.
  • Revised OutlineTabItemViewController showView() to expand all rows in the selection path to show their siblings and children.
  • Revised OutlineTabItemViewController clearView().
  • Revised ListTabItemViewController updateView(), showView() and clearView() to correspond to the new execution flow in the corresponding ListTabItemViewController methods.
  • Revised ListTabItemViewController viewDidLoad() by setting selectionWasUpdated to true before calling reloadData(), as in OutlineTabItemViewcontroller.
  • Globally changed selectionWasUpdated instance property to selectionDeclinesDisplay.
  • Saved a snapshot of build version 55.
  • Commited Source Control.

2018-12-08 (3.0.0 build 56)

Reverse order of subviews in master split item view controller.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 56.
  • Revised Main.storyboard by moving the master tab view to the bottom of the master split view, reversing the top-to-bottom order of the two rows of controls now at the top of the master split view, reversing the top-to-bottom order of the Keystrokes and Screen Reader buttons, and changing the split view divider to the default thick divider
  • Saved a snapshot of build version 56.
  • Commited Source Control.

2018-12-08 (3.0.0 build 57)

Continue Implementing OutlineTabItemViewController.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 57.
  • Revised Main.storyboard by connecting the outline view path control IBAction to the OutlineTabItemViewController.
  • Revised MasterSplitItemViewController currentTabItemSelectElementAction() by uncommenting and revising the MasterTabViewItemIndex.Outline.rawValue case to return the OutlineTabItemViewController selectElement(_:) action selector.
  • Revised OutlineTabItemViewController selectElement(_:) by changing the @IBAction attribute to @objc because its selector is connected to path control pop-up menu items using a #selector expression.
  • Revised OutlineTabItemViewController selectElement(_:) by adopting the node-based technique used in showView() to set the selectedRow local variable by getting the row of the selected item.
  • Revised ElementPathControlManager updateRowSelection(for:at:) by adopting the node-based technique used in showView() to accommodate outline view row numbering and click at any level.
  • Note: still need to work on ElementPathControlManager updateRowSelection(for:at:) and add code to handle expansion of outline row.
  • Saved a snapshot of build version 57.
  • Commited Source Control.

2018-12-11 (3.0.0 build 58)

Finish implementing OutlineTabItemViewController and ListTabItemViewController methods to select a new element and to use the outlineViewSelectionDidChange(_:) and tableViewSelectionDidChange(_:) delegate methods only to handle data source update and path control display for mouse and keyboard row selection.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 58.
  • Renamed the ListTableView class and all references to it to ListTabItemTableView.
  • Renamed the selectionDeclinesDisplay flag to selectionNeedsUpdate and reversed the Boolean logic.
  • Revised ListTabItemTableView to implement overrides of NSResponder mouseDown(with:) and keyDown(with:) and of the NSStandardKeyBindingResponding protocol methods moveUp(_:) and moveDown(_:), to set the selectionNeedsUpdate flag to true when the user selects a new row using the mouse or keyboard.
  • Created OutlineTabItemOutlineView, and revised it to implement overrides of NSResponder mouseDown(with:) and keyDown(with:) and of the NSStandardKeyBindingResponding protocol methods moveUp(_:) and moveDown(_:), to set the selectionNeedsUpdate flag to true when the user selects a new row using the mouse or keyboard.
  • Revised ListTabItemViewController updateView(), showView() and clearView() to set the updateNeedsDisplay and selectionNeedsUpdate flags before calls to reloadData() trigger the tableViewSelectionDidChange(_:) delegate method, and revised the selectElement(_:) and selectElementWithContextMenu(_:) action methods to eliminate the unneeded second setting of the selectionNeedsUpdate` flag.
  • RevisedOutlineTabItemViewController updateView(), showView() and clearView() to set the updateNeedsDisplay and selectionNeedsUpdate flags before calls to reloadData() trigger the outlineViewSelectionDidChange(_:) delegate method, and revised the selectElement(_:) action method to eliminate the unneeded second setting of the selectionNeedsUpdate flag.
  • Revised OutlineTabItemViewController datasource and delegate methods to use cleaner code.
  • Revised ListTabItemViewController datasource method to use cleaner code.
  • Saved a snapshot of build version 58.
  • Commited Source Control.

2018-12-13 (3.0.0 build 59)

Continue fixing problems in OutlineTabItemViewController.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 59.
  • Revised ElementPathControlManager updateRowSelection(for:at:) by renaming it updateSelection(for pathControl: NSPathControl, atLevel selectedLevel: Int, index selectedIndex: Int) and changing the code so it will work in outline view, where the level can be changed using the mouse or keyboard, as well as in list view, where it cannot.
  • Revised the OutlineTabItemViewController selectElement(_:) action method.
  • Revised ElementDataModel so it does not inherit from NSObject, and changed its initializer so it is not an override method.
  • Saved a snapshot of build version 59.
  • Commited Source Control.

2018-12-20 (3.0.0 build 60)

Fix the OutlineTabItemViewController selectElement(_:slight_smile: action method.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 60.
  • Revised the OutlineTabItemViewController selectElement(_:) action method by collapsing the outline before expanding the new selection path.
  • Saved a snapshot of build version 60.
  • Commited Source Control.

2018-12-21 (3.0.0 build 61)

Continue fixing problems in OutlineTabItemViewController.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 61.
  • Revised ElementDataModel childNode(ofParentNode:atChildIndex:) method to return an empty node if the child nodes have not yet been added to the data model, so clients can use this to test whether the child nodes need to be added.
  • Revised OutlineTabItemViewController by implementing the outlineView(_:shouldExpandItem:) NSOutlineViewDelegate method to update the data model by adding the child nodes to be displayed if necessary, by calling ElementDataModel updateDataModelForExpandedElementAt(level:index:).
  • Revised ElementDataModel by implementing the updateDataModelForExpandedElementAt(level:index:) method to add child nodes for display when an outline row is expanded.
  • Revised OutlineTabItemViewController by changing outlineView(_:shouldExpandItem:) to outlineViewItemWillExpand(_:).
  • Saved a snapshot of build version 61.
  • Commited Source Control.

2019-02-25 (3.0.0 build 62)

Finish fixing problems in OutlineTabItemViewController.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 62.
  • Revised OutlineTabItemViewController outlineViewSelectionDidChange(_:) to collapse the current selection path and expand the new selected item.
  • Revised OutlineTabItemViewController outlineViewItemWillExpand(_:) to collapse the current selection path and select the new expanded item.
  • Revised ElementDataModel.swift by deleting updateDataModelForExpandedElementAt(level:index:).
  • Revised BrowserTabItemViewController, OutlineTabItemViewController and ListItemViewController by rewriting their respective showView() methods.
  • Revised OutlineTabItemViewController showView(), selectElement(_:), outlineViewSelectionDidChange(_:) to prevent call to outlineViewItemWillExpand(_:) delegate method.
  • Saved a snapshot of build version 62.
  • Commited Source Control.

2019-03-04 (3.0.0 build 63)

Implement performIgnoringDelegate(_:with:) to perform selector without triggering the receiver’s delegate method.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 63.
  • Revised OutlineTabItemViewController by implementing performIgnoringDelegate(_:with:) and calling it in popUpPathControlMenu(_:) and selectElement(_:) to peform expandItem(_:).
  • Saved a snapshot of build version 63.
  • Commited Source Control.

2019-03-07 (3.0.0 build 64)

Remove the needsRestoreFromCache flag in favor of savedCurrentIndexPath object.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 64.
  • Revised ElementDataModel.swift by renaming private var cachedCurrentIndexPath to savedCurrentElementIndexPath.
  • Renamed cacheDataModel(_:) to saveCurrentElementIndexPath(_:) and restoreDataModel(_:) to restoreCurrentElementIndexPath(_:) throughout.
  • Changed savedCurrentElementIndexPath to an optional in order to use its nil value as a flag in place of the needsRestoreFromCache Boolean flag variable.
  • Revised restoreCurrentElementIndexPath by setting savedCurrentElementIndexPath to nil at the end.
  • Replaced all uses of the needsRestoreFromCache Boolean flag variable to testing the savedCurrentElementIndexPath for nil.
  • Deleted the needsRestoreFromCache Boolean flag variable throughout.
  • Saved a snapshot of build version 64.
  • Commited Source Control.

2019-03-07 (3.0.0 build 65)

Rename the selectionNeedsUpdate flag to isManualSelection and simplify its use, and remove the updateNeedsDisplay flag because unused.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 65.
  • Renamed selectionNeedsUpdate to isManualSelection throughout.
  • Revised OutlineTabItemViewController and ListTabItemViewController by setting isManualSelection to false after testing it in the outlineViewSelectionDidChange(:slight_smile: and tableViewSelectionDidChange(:slight_smile: delegate methods.
  • Deleted all other statements setting the isManualSelection flag to false.
  • Deleted all references to the updateNeedsDisplay flag.
  • Saved a snapshot of build version 65.
  • Commited Source Control.

2019-03-07 (3.0.0 build 66)
Scroll selected outline and table rows into view.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 66.
  • Revised ListTabItemViewController showView(), selectElement(_:), and selectElementWithContextMenu(_:) by calling elementList.scrollRowToVisible().
  • Revised OutlineTabItemViewController showView(), selectElement(_:), and outlineViewItemWillExpand(_:) by calling elementList.scrollRowToVisible().
  • Saved a snapshot of build version 66.
  • Commited Source Control.

2019-03-08 (3.0.0 build 67)

Add attribute columns to the list view.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 67.
  • Revised the Main.storyboard List Tab Item View Controller Scene table view by making its first column narrower, setting the Columns count to 6, turning on Headers, setting Column Sizing to Uniform, turning on Alternating Rows, setting Vertical Grid to Solid, entering Header Titles “Role”, “Subrole”, “Index”, “Title”, “Type”, and “Help”, setting Size to Small, and revised each column by setting their identifiers to role, subrole, index, title, type, and help, turning off Editable, setting the min and max width of the Index column to 50, and setting the min and max width of each remaining column to 80 or 70, and setting the index column’s table view cell alignment to right aligned.
  • Revised the ListTabItemViewController tableView(_:viewFor:row:) delegate method to display the contents of the new columns.
  • Saved a snapshot of build version 67.
  • Commited Source Control.

2019-03-09 (3.0.0 build 68)

Add attribute columns to the outline view.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 68.
  • Revised the Main.storyboard Outline Tab Item View Controller Scene outline view by making its first column narrower, setting the Columns count to 6, turning on Headers, setting Column Sizing to Uniform, turning on Alternating Rows, setting Vertical Grid to Solid, entering Header Titles “Role”, “Subrole”, “Index”, “Title”, “Type”, and “Help”, setting Size to Small, and revised each column by setting their identifiers to role, subrole, index, title, type, and help, turning off Editable, setting the min and max width of the Index column to 50, and setting the min and max width of each remaining column to 80 or 70, and setting the index column’s table view cell alignment to right aligned.
  • Revised the OutlineTabItemViewController outlineView(_:viewFor:item:) delegate method to display the contents of the new columns.
  • Declared OutlineTabItemViewController TableColumnIdentifiers struct for use in the delegate method.
  • Revised ListTabItemViewController by declaring the TableColumnIdentifiers struct and revising the tableView(_:viewFor:row:) delegate method for use in the delegate method.
  • Saved a snapshot of build version 68.
  • Commited Source Control.

2019-03-10 (3.0.0 build 69)

Conform the browser view controller to the outline and list view controllers.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 69.
  • Revised BrowserTabItemViewController showView() to scroll the selected row to visible.
  • Revised BrowserTabItemViewController updateView(), showView() and clearView() to scroll the last column into view instead of the selected column, so the selected column’s children will be visible.
  • Revised BrowserTabItemViewController by deleting browser(_:willDisplayCell:atRow:column:), browserWillScroll(_:) and modifiedObjectValueForCell(_:atRow:column:) because no longer needed.
  • Revised BrowserTabItemViewController browser(_:titleOfColumn:) to add “—n children” instead of “(n)” at end of title
  • Revised ElementDataModel fullNaturalDescription(ofElement:atIndexPath:) and fullRawDescription(ofElement:atIndexPath:) to add only the index in parentheses at the end of the description, removing the level
  • Saved a snapshot of build version 69.
  • Commited Source Control.

2019-03-10 (3.0.0 build 70)

Add a path control to the browser view.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 70.
  • Revised Main.storyboard Browser Tab Item View Controller Scene by lowering the top of the browser view, adding a path control from the library, adding constraints to all 4 sides and adding a Height constraint of 20 and setting the Placeholder to “No Target”.
  • Revised all 3 Main.storyboard Tab Item View Controller Scenes by setting the path control background color to Control Background Color.
  • Revised BrowserTabItemViewController viewDidLoad() by setting the background color of the browser view title area to controlBackgroundColor to match the header cell background color of the outline and list views.
  • Revised BrowserTabItemViewController by adding an elementPathControlManager instance variable and creating the path control.
  • Revised BrowserTabItemViewController by adding a browserPathControl outlet and connecting it in Main.storyboard.
  • Revised BrowserTabItemViewController viewDidLoad() by setting the font of the path control to smallSystemFontSize for the placeholder.
  • Revised BrowserTabItemViewController updateView(), showView() and clearView() adding code to update the path control.
  • Revised BrowserTabItemViewController by adding a popUpPathControlMenu(_:) action method and connecting it to first responder in Main.storyboard.
  • Revised MasterSplitItemViewController currentTabItemSelectElementAction() by implementing the switch case for the browser view.
  • Revised BrowserTabItemViewController selectElement(_:) by changing its sender parameter type to Any and adding branch tests to distinguish between browser and path control menu item.
  • Revised Main.storyboard by connecting popUpPathControlMenu(_:) action method to Browser Tab Item View Controller Scene path control.
  • Revised BrowserTabItemViewController selectElement(_:) by filling in the menu item branch.
  • Revised the BrowserTabItemViewController browser(_:numberOfChildrenOfItem:), browser(_:child:ofItem:), browser(_:isLeafItem:) and browser(_:objectValueForItem:) delegate methods to use the better code model in OutlineTabItemViewController.
  • Revised BrowserTabItemViewController, outlineTabItemViewController and Revised listTabItemViewController selectElement(_:) methods and listTabItemViewController selectElementWithContextMenu(_:) to call showView() once the data model is updated.
  • Revised BrowserTabItemViewController, outlineTabItemViewController and Revised listTabItemViewController viewDidLoad() to set the path control placeholder text attributes.
  • Revised all 3 Main.storyboard Tab Item View Controller Scenes by setting the path control’s Focus Ring to None.
  • Saved a snapshot of build version 70.
  • Commited Source Control.

2019-03-14 (3.0.0 build 71)

Implement application icon and Credits for About box.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 71.
  • Built and archived as executable release a1 for testing by Michael Tsai.
  • Updated Info.plist Copyright (human-readable) to end in 2019.
  • Updated InfoPlist.strings NSHumanReadableCopyright to end in 2019.
  • Revised Main.storyboard by rearranging the application menu to include Check for Updates
 menu, License menu, Registration menu with Online Store and Enter Key
 submenus, and System Preferences
 menu.
  • Revised Assets.xcassets by adding wide appicon png images to the AppIcon to form working application icon for application and About box Credits file.
  • Added Credits.rtf file from UI Browser 2.9.0 and revised text.
  • Saved a snapshot of build version 71.
  • Commited Source Control.

2019-03-21 (3.0.0 build 72)

Clean up authorizing access with System Preferences menu item.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 72.
  • Revised Main.storyboard by renaming UI Browser > System Preferences
 menu item to Accessibility List

  • Revised AppDelegate by implementing the openAccessibilityList(_:) action method and connecting it to the UI Browser > Accessibility List
 menu item.
  • Revised Main.storyboard by fixing Accessibility checkbox to Check and Switch.
  • Moved development to macOS 10.14.4 Mojave and Xcode 10.2.
  • Built and ran successfully.
  • Saved a snapshot of build version 72.
  • Commited Source Control.

2019-03-26 (3.0.0 build 73)

Convert to Swift 5.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 73.
  • Add ListTabItemTableView.swift to Source Control.
  • Validated project settings and migrated localization from “English.lproj”.
  • Committed Source Control
  • Converted the Target to Current Swift Syntax (Swift 5) – no source changes required.
  • Revised MainContentViewController (in TargetMenuExtension.swift) by adding an @unknown default case to the switch statement in updateTargetMenu(_:) at recommendation of compiler.
  • Changed the Project’s Swift Compiler - Language (Swift Language Version or SWIFT_VERSION) to Swift 5.
  • Built and ran successfully.
  • Saved a snapshot of build version 73.
  • Commited Source Control.

2019-03-27 (3.0.0 build 74)

Move handling of main window’s toolbar into the ToolbarExtension and other extensions on MainWindowController from MainContentViewController.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 74.
  • Created ToolbarExtension.swift as an extension on MainWindowController.
  • Revised TargetMenuExtension, ActivateButtonExtension, AccessibilityCheckboxExtension and DetailButtonExtension by making them extensions on MainWindowController instead of MainContentViewController.
  • Revised MainContentViewController by moving the didChangeAccessStatus(_:) notification method in from TargetMenuExtension.swift, and by revising viewDidLoad() accordingly.
  • Revised MainWindowController by moving the targetPopUpButton configuration code into windowDidLoad() from MainContentViewController viewWillAppear().
  • Revised MainContentViewController updateApplication(forNewTarget:usingTargetElement:) by updating the call to updateWindowTitle() which was moved to MainWindowController.
  • Revised TargetMenuExtension.swift throughout by revising references to properties and methods in MainContentViewController to accommodate making TargetMenuExtension an extension on MainWindowController instead of MainContentViewController.
  • Revised AppDelegate menuNeedsUpdate(_:) to set var controller to MainWindowController.sharedInstance.
  • Revised Main.storyboard by changing the toolbar items’ view classes from ValidatedButton back to their original NSButton or NSPopUpButton.
  • Revised MainContentViewController by declaring the mainwindowController instance property, setting it lazily, and substituting it for MainWindowController.sharedInstance throughout.
  • Revised MainWindowController and its extensions by declaring the mainContentVewController instance property, setting it lazily, and substituting it for MainContentViewController.sharedInstance throughout.
  • Revised Main.storyboard by making Accessibility button Bordered to give it white background color with rounded edges to match toolbar item user interface guidelines.
  • Revised DetailButtonExtension of MainWindowController by removing the setDetailButtonColor() method, and revised MainContentViewController by removing the call to setDetailButtonColor() from the systemTinitDidChange(_:) notification method, so that the Detail button can display a simple disclosure button with a chevron instead of the detail toggle images in Assets.xcassets
  • Revised Main.storyboard by making Detail button a Disclosure On Off button Bordered to give it a white background color with rounded edges to match toolbar item user interface guidelines.
  • Revised DetailButtonExtension of MainWindowController by rewriting the toggleDetailSplitItem(_:) action method to expand or collapse the detail split view item based on the current state of the button instead of simply toggling it.
  • Revised Main.storyboard by moving Float checkbox from main content view to right end of toolbar left of Detail button and making it a Push On Push Off button.
  • Revised Main.storyboard by moving Accessibility checkbox from right to center of toolbar and setting its title to Allow Access
 (to be changed to Deny Access
 with validation).
  • Revised Main.storyboard by renaming application menu’s Accessibility List
 menu item to Set Access

  • Revised Main.storyboard by removing View > Customize Toolbar
 menu item.
  • Revised ElementDataModel updateDataModel(forSystemWideElement:) by adding call at end to updateDataModelForCurrentElementAt(leel: 0, index: 0) on model of updateDataModel(forApplicationElement:). [IS THIS NEEDED?]
  • Revised MainContentViewController updateApplication(forNewTarget:usingTargetElement:) by adding code to set the currentElementData instance property to display the Target menu’s title and the window’s title when the SystemWide target is chosen.
  • Revised MainWindowController (in TargetMenuExtension.swift) updateTargetPopUpButtonTitle() and updateWindowTitle() to display the Target menu’s title and the window’s title when the SystemWide target is chosen.
  • Revised Main.storyboard by reorganizing and rewording the View menu in the menubar and adding Activate Target, Expand Detail View and Show Keystroke menu items to the menu bar’s View menu, and by adding a Report button to the master split item view.
  • Revised MainWindowController by declaring that it conforms to NSMenuDelegate, and removed declaration of conformance from MainContentViewController.
  • Revised MainWindowController windowDidLoad() to declare MainWindowController as the delegate of targetPopUpButton, so the menuDidClose(_:) delegate method (in TargetMenuExtension.swift) is called if access is disabled.
  • Removed AppDelegate menuDidClose(_:) delegate method because it gets called while the request access alert is already open or after it is dismissed for unknown reasons, causing duplicate alerts. The MainWindowController (in TargetMenuExtension.swift) menuDidClose(_:) delegate method is still used because it works properly.
  • Built and ran successfully.
  • Saved a snapshot of build version 74.
  • Commited Source Control.

2019-04-14 (3.0.0 build 75)

Implement toolbar item validation.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 75.
  • Revised MainWindowController (in ActivateButtonExtension.swift) by removing feedback from the activateTarget(_:) action method.
  • Revised ToolbarExtension.swift by renaming it MainToolbarItem.swift, and by implementing the MainToolbarItem subclass of NSToolbarItem and overriding validate(), which is called automatically because its Autovalidates setting in Main.storyboard is on by default.
  • Revised Main.storyboard by setting the class of the Target, Activate, Accessibility, _______ toolbar items to MainToolbarItem, and by setting the tags of all of the toolbar items.
  • Revised AccessibilityCheckboxExtension.swift by renaming it AccessibilityButtonExtension.swift.
  • Revised MainWindowController by adding the floatButton IBOutlet and connecting it in Main.storyboard.
  • Revised MasterSplitItemViewController by deleting the floatButton IBOutlet, and revised Main.storyboard by removing the Float checkbox.
  • Built and ran successfully.
  • Saved a snapshot of build version 75.
  • Commited Source Control.

2019-04-14 (3.0.0 build 76)

Clean up implementation of the NSUserInterfaceValidations and NSValidatedUserInterfaceItem protocols for the reportButton.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 76.
  • Revised MasterSplitItemViewController by declaring the reportButton IBOutlet, connected it in Main.storyboard, and set its class to ValidatedButton in Main.storyboard.
  • Created new file ReportButtonExtension.swift, implemented the ReportButton extension on MainContentViewController, implemented a temporary dummy showReport(_:) action method, and connected it in Main.storyboard.
  • Created new file ValidatedControlProtocol.swift, and implemented the ValidatedControl subprotocol of NSValidatedUserInterfaceItem and the ValidatedButton subclass of NSButton, conforming it to ValidatedControl by implementing the validate() protocol method.
  • Revised MainContentViewController by revising implementations of updateValidatedControls() and validateUserInterfaceItem(_:) to work with the new reportButton action.
  • Built and ran successfully.
  • Saved a snapshot of build version 76.
  • Commited Source Control.

2019-04-16 (3.0.0 build 77)

Implemented the UserControlValidations subprotocol of NSUserInterfaceValidations and the ValidatedUserControlItem protocol and applied them to the reportButton.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 77.
  • Revised MainContentViewController by renaming the validateControls() method as validateUserControls() and revised MainWindowController windowDidUpdate(_:) to call it by its new name.
  • Renamed the ValidatedControlProtocol.swift file as UserControlValidations.swift, and changed the required UserControlValidations protocol method from validate() to validateUserControl(_ item: NSControl) → Bool.
  • Revised UserControlValidations.swift by renaming the ValidatedUserControl protocol as ValidatedUserControlItem, and by changing the required ValidatedUserControlItem protocol method from validate() to update() (in addition to the action and target methods required by the parent NSUserInterfaceValidations protocol).
  • Revised MainContentViewController by declaring conformance to the UserControlValidations protocol and removing conformance to the NSUserInterfaceValidations protocol.
  • Revised MainContentViewController validateUserControls() to call the renamed update() method on MasterSplitItemViewController views that conform to the ValidatedUserControlItem protocol.
  • Revised MainContentViewController by calling validateUserControl(_:) instead of validateUserInterfaceItem(_:).
  • Revised UserControlValidations.Swift validatedButton update() method to call MainContentViewController validateUserControl(_:), and to call validateUserInterfaceItem(_:) in case any user controls implement it.
  • Revised ReportButtonExtension.swift to declare an extension on MasterSplitItemViewController instead of MainContentViewController for the showReport(_:) action method.
  • Revised MasterSplitItemViewController.swift by moving the validateUserControlItem(_:) validation method in from MainContentViewController and declaring it as conforming to the UserControlValidations protocol.
  • Revised Main.storyboard by setting the class of the Report button to NSButton instead of ValidatedButton.
  • Built and ran successfully.
  • Saved a snapshot of build version 77.
  • Commited Source Control.

2019-04-17 (3.0.0 build 78)

Applied the UserControlValidations subprotocol of NSUserInterfaceValidations and the ValidatedUserControlItem protocol and applied them to the remaining user controls in the master split view item controller.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 78.
  • Moved development to Xcode 10.2.1.
  • Revised UserControlValidations ValidatedButton to implement an override of awakeFromNib() to observe NSWindow.didUpdateNotification on the model of Erik M. Buck and Donald A. Yacktman, “Cocoa Design Patterns” (Addison Wesley 2010), pp. 228-29, revised MainWindowController by removing the windowDidUpdate(_:) delegate method and MainContentViewController by removing the validateUserControls() method because they are no longer needed to trigger validation.
  • Revised UserControlValidations.swift by renaming it UserControlValidation.swift and going back to declaring validatedButton as a subclass of NSButton instead of an extension, and revised Main.storyboard to set the class of NSButton controls in the master split item view to ValidatedButton, to make it possible to limit the Buck-Yacktman technique to buttons in the window’s content view.
  • Revised UserControlValidation.swift by implementing a ValidatedPopUpButton subclass of NSPopUpButton, and revised Main.storyboard to set the class of NSPopUpButton controls in the master split item view to ValidatedPopUpButton.
  • Revised MasterSplitItemViewController by removing the refreshApplication(_:) action method in anticipation of reimplementing it in RefreshApplicationButtonExtension.swift.
  • Renamed AppleScriptPopDownButton as AppleScriptPullDownButton throughout.
  • Created extension files with stub action methods for the remaining user controls in the master split view item controller, and connected them in Main.storyboard: HighlightCheckboxExtension, FollowFocusCheckboxExtension, ScreenReaderButtonExtension, AppleScriptButtonExtension, MasterTabViewSelectorExtension, RefreshApplicationButtonExtension, KeyStrokesButtonExtension and TerminologyButtonExtension.
  • Revised MasterSplitItemViewController validateUserControlItem(_:) by adding cases for all of the new action methods in the master split view item controller.
  • Revised Main.storyboard to set the Enabled setting of those user controls in the main split item view that need to be disabled when a window first open with No Target selected.
  • Revised the MainContentViewController didChangeAccessStatus(_:) notification method by adding a call to setWindowsNeedUpdate() to trigger validation when access is changed in System Preferences or elsewhere behind the back of UI Browser.
  • Revised AccessButtonExtension.swift to make UI Browser stay active after dismissing an access changed sheet by registering to observe the AccessAuthorizer didDismissAccessAlertNotification.
  • Revised AppDelegate applicationWillFinishLaunching(_:) by duplicating codes in AccessButtonExtension.swift to terminate System Preferences after the user grants or denies access.
  • Built and ran successfully.
  • Saved a snapshot of build version 78.
  • Commited Source Control.

2019-04-22 (3.0.0 build 79)

Fully implement the NSMenuItemValidation protocol for the toolbar items’ corresponding menu items.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 79.
  • Revised MainWindowController by imiplementing the validateMenuItem(_:) NSMenuItemValidation protocol method for the UI Browser > Grant Access menu item and declared that MainWindowController conforms to the NSMenuItemValidation protocol.
  • Revised Main.storyboard by connecting the UI Browser > Grant Access menu item to First Responder for the toggleAccess(_:) action method.
  • Revised TargetMenuExtension.swift updateTargetMenu(_:) by adding code for the new Activate Target menu item, and revised Defines.swift to declare the ACTIVATE_TARGET_MENU_ITEM_TITLE constant.
  • Revised ActivateButtonExtension.swift by revising the activateTarget(_:) action method to restore the menu item’s title to the current target application if the user chose the Target pop-up button’s Activate Target menu item.
  • Revised Main.storyboard by removing the View > Activate Target menu item.
  • Revised MainWindow.swift by making MainWindow a subclass of NSPanel so it can float.
  • Created FloatButtonExtension.swift as an extension on MainWindowController, implemented the float(_:) action method, and revised Main.storyboard by connecting the float(_:) action method to the Float button and the Window > Float menu item.
  • Revised MainWindowController validateMenuItem(_:) to set the state of the Window > Float menu item based on whether the window is floating.
  • Revised the MainToolbarItem.swift validate() method to add a case for the float button to set its state based on whether the window is floating, and revised Main.storyboard to make the floating button a MainToolbarItem and set its tag to 3.
  • renamed MailToolbarItem.swift as ValidatedToolbarItem.swift and renamed the subclass ValidatedToolbarItem.
  • Revised AppDelegate applicationWillFinishLaunching(_:) by calling AccessAuthorizer’s designated intializer instead of its convenience initializer, since making UI Browser’s main window a subclass of NSPanel forces AccessAuthorizer to present application-modal dialogs instead of document-modal sheets anyway.
  • Revised Main.storyboard to make the split view’s divider thin instead of thick because it looks better.
  • Built and ran successfully.
  • Saved a snapshot of build version 79.
  • Commited Source Control.

2019-04-25 (3.0.0 build 80)

Begin implementing the Outline view.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 80.
  • Revised the FloatButtonExtension.swift float(_:) action method to set isFloatingPanel based on the state of the button instead of just toggling isFloatingPanel.
  • Revised the HighlightCheckboxExtension.swift highlight(_:) action method to set

  • Saved a snapshot of build version 80.

WORK INTERRUPTED TO COMPLETE UI Browser 2 2.9.0 for macOS Catalina 10.15.

2019-10-27 (3.0.0 build 81)

Set size of element browser to small programmatically, and remove NSBrowser+PFSmallBrowserAdditions Objective-C category.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 81.
  • Moved development to macOS Catalina 10.15.0 (19A602) and Xcode 11.1 (11A1027).
  • Allowed Xcode to switch to development signing and enable hardened runtime.
  • Removed UIBrowser3-Bridging-Header.h and NSBrowser+PFSmallBrowserAdditions.h and .m Objective-C category files, because direct access to instance variables was deprecated in macOS Mojave 10.14. Apple announced in 2018 that it would block all use of private instance variables in a future release of macOS, and access was blocked in macOS Catalina 10.15; see my bug report 41209462 2018-06-18, now closed.
  • Revised BrowserTabItemViewController.viewDidLoad() by deleting calls to the NSBrowser+PFSmallBrowserAdditions category’s pfSetUsesSmallHorizontalScroller(), pfSetUsesSmallColumnScrollers and pfSetUsesSmallTitleFont() methods.
  • Revised BrowserTabItemViewController.viewDidLoad() by adding code setting elementBrowser’s controlSize to .small programmatically. Interface Builder still automatically switches back to Regular when attempting to set Size to Small or Mini.
  • Saved a snapshot of build version 81.
  • Commited Source Control.

2019-10-27 (3.0.0 build 82)

Move development to Swift 5.1.

  • Moved development to macOS Catalina 10.15.0 (19A602), Xcode 11.2 (11A1027) and Swift 5.1.
  • Changed the Project’s Deployment (macOS Deployment Target or MACOSX_DEPLOYMENT_TARGET) to macOS 10.15.
  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 82.
  • Changed the Project’s Versioning (Versioning System or VERSIONING_SYSTEM) to Apple Generic to match frameworks.
  • Revised Credits.rtf by referring to the “cursor” instead of the “mouse”, by referring to macOS 10.15 as “Catalina”, and by stating that UI Browser requires macOS Catalina 10.15.
  • Moved development to macOS Catalina 10.15.1 (19B88), Xcode 11.2 (11B52) and Swift 5.1.
  • Moved development to Xcode 11.2.1 (11B500) and Swift 5.1.2.
  • Moved development to macOS Catalina 10.15.2 (19C57), Xcode 11.3 (11C29) and Swift 5.1.3.
  • Moved development to macOS Catalina 10.15.3 (19D76), Xcode 11.3.1 (11C505) and Swift 5.1.3.
  • Changed copyright notices throughout to cover “-2020”.
  • Built and ran successfully.
  • Saved a snapshot of build version 82.
  • Commited Source Control.

2020-02-17 (3.0.0 build 83)

Embed new framework versions supporting Swift 5.1 module stability and library evolution to facilitate eventual distribution of the built frameworks for use by developers of client applications or frameworks using different versions of Swift.

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 83.
  • Incorporated PFAssistiveFramework4 4.0.0.17 and PFAccessibilityAuthorizer2 2.0.0.8.
  • Built and ran successfully.
  • Saved a snapshot of build version 83.
  • Commited Source Control.

##2020-02-27 (3.0.0 build 84)
???

  • Changed the Project’s Versioning (Current Project Version or CURRENT_PROJECT_VERSION) to 84.

ISSUES:

  • Detail Toggle Button in Toolbar does not toggle in response to dragging Detail Split Item collapsed or revealed. See builds 32, 39 and 74. It is named detailToggleButton where the color is set, but detailButton everywhere else. See MainSplitViewController: “A button can be bound to the isCollapsed property to collapse and reveal a split view, and a suitable bound detail button’s state can change automatically when the split view is collapsed and revealed by dragging.” Figure out how to do this when the button is a toolbar item in the toolbar.
  • Needs a minimum size.
  • Michael Tsai encountered a problem where arrow-selecting and click-selecting both failed to auto-expand.
  • Try to remove auto-collapse so outline view can be full powered.
  • Implement multiple windows for different targets.
    • try instantiating completely separate data model for each.
  • Check AppleScript support in macOS 15 (/System/Library/Frameworks/Scripting.framework and /System/Library/Frameworks/AppKitScripting.framework are still 32-bit in Mojave).
  • Explore compliance with VoiceOver, Dynamic Type and other accessibility technologies.
  • Update to latest Paddle Framework (in Cocoa/eCommerce Registration Services/Paddle).
1 Like