How to Add Files to mpd using python-mpd2

The music player daemon, mpd, and its client counterpart mpc operate on a managed directory structure. All paths are relative to this root directory. You cannot make mpd play a file from just anywhere, it seems. This is important to know when you script MPDClient using python-mpd2, because when you try to add any absolute path, even those pointing into the managed directory, you’ll be in trouble.

Continue reading …

Emacs for Remote SSH Python Development

Teaser image

I am using Emacs for over a year now to manage my tasks. I like how I can mix tasks with long form notes in a single outline. It’s good. We had to play with vi and emacs for a while at University. I’m very happy I got used to the very basics of both editors because I ended up using vi a lot when SSH-ing into remote machines, and now Emacs for everything else.

Continue reading …

Finding the Field Editor in UI Tests

On macOS, the field editor is a NSText instance that appears whenever you edit a NSTextField. This means the text fields themselves offer no editing features; they just tell the shared field editor to appear in their drawing area and show their content. When you write XCUITests, you may want to edit cells in a table or fill out a form with many text fields. Today I learned that you don’t get to the field editor in UI tests and send it the typeText message. You work with the text fields like the user does: as if they themselves accepted user input.

Continue reading …

Being Afraid to Change a Working App

Today I work on The Archive. The focus is on an issue brought up by the community. Search results don’t update the sort order when you modify a note unless you refresh manually. In fact, the issue is expected behavior. The Archive, being a note-taking app where you can filter notes on disk with a live search, is designed to not update the search results for an active search term. Att all. This should prevent the note from disappearing from the results if you remove the search term from its contents. If you search for “foo” and get 10 results, the note you currently edit should not disappear when you cut the search term, “foo”, from it. The Archive protects the search results; a mere live-reload would change the list to 9 results, removing the currently edited one, and that’d be pretty confusing.

Continue reading …

TableFlip Is Now Available on the Mac App Store

Teaser image

TableFlip is now available on the Mac App Store!

I also released updates to the non-Mac App Store version that fix CSV editing problems and improve the user interface. Of course both versions have the same features, so you’re not missing out on anything if you only own one version.

The app store page is a feast for the eyes. There’s a demo video (I already know how I can improve it a lot with the next update), Zebras, and lovely icy mountains.

Please share the news to help the app get traction. That would be super helpful!

Using Drag and Drop with NSTableView

Nate Thompson compiled a tutorial on how to implement drag & drop in NSTableView. It’s a good read.

I remember how weird it felt to implement this the first time. Drag & drop is actually realized via the pasteboard. So it’s more like cut and paste with a visual representation. From this you get the ability to put multiple content representations into the pasteboard at once, so the drop container can decide how to handle whatever it receives.