Exporting NSTableView to HTML [Open Source]

I needed to export the contents of a NSTableView to HTML, so I wrote a little NSTableView subclass in Objective-C to do this.

ATHyperTextTableView is a simple NSTableView subclass that makes exporting a table view to HTML easy. You can customize the look of the exported HTML table with your own CSS too.

Screenshots Below:
Screenshot of NSTableView.
Screenshot of exported HTML from a the tableView, loaded into a WebView.

Screenshot of the exported HTML loaded into a WebView.


Screenshot of exported HTML from a the tableView, loaded into a WebView with custom CSS set.

Screenshot of the exported HTML loaded into a WebView, styled with custom CSS.

There is a sample project available on Github here.

Quick Tutorial: How to Open a Folder Alias Directly in File Cabinet Pro

Note: Following this tutorial is only necessary if you purchased the Mac App Store version of File Cabinet Pro. If you purchased File Cabinet Pro from AppTyrant.com, opening a folder alias will automatically work.

If you purchased File Cabinet Pro from the Mac App Store, you may have noticed that you cannot open a folder alias directly within the app. If you double click an alias folder in File Cabinet Pro, it will say “Empty Folder” in the window even if the directory is not empty. It would be reasonable to assume that this is a bug in File Cabinet Pro; it is not.

So why does this happen?
This happens because Apple requires all apps sold on the Mac App Store to be sandboxed. The sandbox, as of macOS 10.12.1, prevents an application from accessing the contents of a folder alias; this behavior may or may not be a bug in macOS (that is for Apple to decide).

If you want to workaround this restriction, follow the steps below:
1) Launch File Cabinet Pro and bring up the app’s main window.
2) Open a document using one of File Cabinet Pro’s built-in document editors so the application’s menubar shows up.
3) In File Cabinet Pro’s menubar, click on the “Help” menu and then select the “Grant Permission for Alias Folders” menu item to bring up an open panel.
4) In the open panel select a directory to grant File Cabinet Pro permission to access the contents of that directory. After you select a directory, File Cabinet Pro will be able to open a folder alias if the original folder the alias points to resides within the directory you chose in the open panel. If you want to grant the app permission to open folder aliases for folders anywhere on your Mac, choose your hard disk (typically named “Macintosh HD”) in the open panel.

File Cabinet Pro open document to show the app's menubar.

Open a document to show File Cabinet Pro’s menubar and select “Grant Permission for Alias Folders.”

You only have to do the above steps once.

Quick Tutorial: How to Set a “Primary” and “Secondary” Directory in File Cabinet Pro Version 2.9

FileCabinetProAppIcon

You can configure a “Primary” and “Secondary” folder in File Cabinet Pro’s Settings window, and a button for each folder will appear in the bottom bar of the application’s main window. Clicking these buttons in File Cabinet Pro allows you to quickly toggle between two directories. To do this, simply follow these steps:

Step 1: Go to Settings in File Cabinet Pro

Click the File Cabinet Pro icon in the menubar to bring up the application’s main window. Now click the gear button at the bottom of the window to bring up the context menu and select “Settings.”

File Cabinet Pro mac app screenshot gear button clicked.

Step 2: Check the “Use Secondary Directory” Box

After the Settings window appears, select the “Folder Paths” item in the toolbar. In the Settings window you will now see a “Use Secondary Directory” box, check this box. When you check this box, an open panel will be displayed allowing you to choose your secondary directory. After you choose your secondary directory, the button for both your primary and secondary directory will appear in the bottom bar again (exactly how the “Local” and “iCloud” buttons appeared in previous versions of the app).

Check the use secondary directory box in File Cabinet Pro settings.

By default the title for each button will match the name of the directory you selected. However, you can now customize the title of the buttons in the bottom bar by changing the “Display Name” field for the primary and secondary directory (please note the ‘Display Name’ fields in the screenshot above).

Once you configure the secondary directory, you will see the buttons appear in the bottom bar of File Cabinet Pro’s window. That’s it!

Mac Tutorial: How To Enable an App Extension

Starting with OS X 10.10 (Yosemite), Mac applications can include embedded app extensions. App extensions add custom functionality to your Mac. How you can use an app extension depends on what kind of extension it is.

At the time of this writing, there are four different kinds of app extensions available on the Mac:

Action: Action extensions can manipulate content in another supporting app. Action extensions often work in text editing applications like Text Edit.

Finder: Finder extensions add functionality to the Finder.

Share Menu: Share extensions allow you to share content with other

Today: These are widgets that can be added to the Today view in the Notification Center.

While there are several different kinds of app extensions available, every app extensions requires the user to enable them in System Preferences before they can be used. If you recently purchased an app and cannot figure out why you are unable to use a feature advertised in the app description, there is a chance that the feature you are looking for requires you to enable an app extension.

How to Enable an App Extension

To enable an app extension, open the System Preferences app on your Mac. In the System Preferences window, click on “Extensions.”

Screenshot of System Preferences on OS X El Capitan annotated instructions 'Go to extensions pane.'

Once you are in the “Extensions” section of System Preferences, you will see a list of all the app extensions you have on your Mac. To enable or disable an app extension, simply check or uncheck the box next to each extension in the list. That’s all there is to it.

App extensions pane in System Preferences on Mac.

Quick Tutorial: How to Generate Icons as PNG Images with iSize Icons Pro

iSize Icons Pro Mac app icon.

         

With iSize Icons Pro for Mac, you can generate properly sized icon images for your iOS and OS X apps. iSize Icons Pro can generate standalone PNG images, an Asset Catalog for Xcode, or an .ICNS file from a single 1024×1024 large icon image. In this brief tutorial, we will generate standalone PNG images.

Generating Icons as PNG Images

To generate your properly sized app icons as png images, simply drag and drop your large 1024×1024 app icon image onto the window. Once your large icon image is dragged onto the window, simply check the boxes for the devices you wish to create icons for (for example: iPhone, iPad, and/or Mac). Then select “PNG Images” under the “Generate As” pop up button for your selected platforms.

iSize Icons Pro Mac app window.

Once you are ready to generate your icons, all you have to do is click the “Generate Icons” buttons to bring up a sheet which will allow you to choose a location on your Mac to save. Type in a name and hit save. iSize Icons Pro will create a directory using the name you have typed in the save panel. If you open the directory, you should see the folders for each device you choose to export for.

iSize Icons Pro generated icons.

If you open the folders, inside are all your properly sized app icon images. That’s all there is to it.

Quick Tutorial: How to Set a Global Hotkey for Opening/Closing File Cabinet Pro!

In this quick demo video, I show you how you can now set up a Global Hotkey to open and close the File Cabinet Pro window.

Global Hotkey support was introduced in version 2.0. You can now open/close the File Cabinet Pro window without having to bring your mouse all the way up to the menubar! If you already bought File Cabinet Pro, you can update now for free. If you haven’t purchased File Cabinet Pro, you can buy a copy here.

Quick Tutorial: How to Leave Yourself a Note in iCloud from the Menubar with File Cabinet Pro

File Cabinet Pro for macOS has many useful features. File Cabinet Pro comes with a built-in text editor, which is a feature that is really handy but also easy to overlook. In this quick demo video, I show you how you can use File Cabinet Pro’s built-in text editor to leave yourself a note in iCloud Drive.