WOODY'S
FINDINGS

Posts

Tutorial

Scripting with SwiftUI (II) - Scripts Provider

In this second tutorial of the series you will learn how to develop an interface to let the user choose a script to execute and execute it.

Tip

Safer singletons with property wrappers

A solution to hide a singleton behind a property wrapper for easier use and dependency injection.

Tutorial

Scripting with SwiftUI (I) - Coding a color picker View

This tutorial is the first one of a series to learn how to use SwiftUI in Swift scripts. Some basis of SwiftUI are explained, as well as how to display an interface like with an application in a Swift script.

Tip

Working with Swifty NSNotification

An overview of NSNotification usage then a discussion about making NSNotification more "Swifty" by implementing extensions and a NotificationObserver wrapper (final Playground file provided).

Tip

Advanced array slicing

Whenever your work with numbers, you might want to define special ones that act a bit differently from others, while keeping their value. For example, it could be useful to define a first and last integers to be used in a range to target the first and last valid indexes of an array.

Tutorial

Cocoa: implement a privileged Helper

In this tutorial, learn how to implement a privileged helper on macOS from scratch. The goal is to make the application Scriptex able to execute scripts with root privileges.