Skip to content

The Eclectic Light Company

Macs & painting – 🦉 No AI content
Main navigation
  • Downloads
  • Freeware
  • M-series Macs
  • Mac Problems
  • Mac articles
  • Macs
  • Art

Swift 4.0

In the Dark Mode: a tortuous journey without a map

Apple tells us not to use hard-coded colours like .black, but sets the default for scrolling text views to .black, causing text to be rendered in black on dark grey when in Dark Mode. Here’s a simple and universal fix.

June 20, 2018 General, Macs, Technology

Beyond scripting in Swift: the popup menu that won’t validate

Why did accessing a popup menu suddenly start throwing an exception? And why doesn’t a super call handle this? Another Swift mystery solved.

June 12, 2018 Macs, Technology

Scripting in Swift: Adding new menu commands to perform a quick copy

Adding sub-commands to write the contents of textboxes to the pasteboard: a simple task, but so easy to get hopelessly lost in it.

May 30, 2018 Macs, Technology

A simpler way to control an app’s Login Item

Want a non-sandboxed app to install itself in Login Items? Here’s a simple way without using a helper app.

May 23, 2018 Macs, Technology

Putting a browser window in your app

T T Read More

Adding a WebKit browser window is straightforward so long as you ignore what Apple tells you.

May 12, 2018 Macs, Technology

What’s that? Using magic on your Mac

Telling what a file is – whether plain text, Unicode UTF-8, 32-bit code, and so on – can be hard. Just use a little magic, free in the command tool ‘file’. Includes Swift code to access magic numbers.

April 24, 2018 Macs, Technology

A Swift 4 ‘droplet’ scripting prototype, Dropsy

Want a script app that takes dropped files/folders, does something to them, and saves them? Here’s a simple prototype project which does exactly that. Free to use.

April 13, 2018 Macs, Technology

Accessing Finder aliases in your own code: a walk through alisma’s source

Creating and resolving Finder aliases is straightforward in Swift: here’s how alisma does it.

March 16, 2018 Macs, Technology

Scripting in Swift: Checking free disk space

Robust example Swift code for checking the free space available on a volume. A good quick check to run before trying to write out anything hefty.

February 5, 2018 Macs, Technology

Scripting in Swift: Key characters, or what character can’t be key

A hard to spot runtime error results if you try to embed the key < in a dictionary. But when converting plain text for embedding in XML, that's one character you need to substitute.

January 11, 2018 Macs, Technology

Posts navigation

Previous1 2 Next
Blog at WordPress.com.
Footer navigation
  • Free Software Menu
  • About & Contact
  • Macs
  • Painting
  • Downloads
  • Mac problem-solving
  • Extended attributes (xattrs)
  • Painting topics
  • SilentKnight, Skint, SystHist, silnite, LockRattler & Scrub
  • DelightEd & Podofyllin
  • xattred, SpotTest, Spotcord, Metamer & xattr tools
  • 32-bitCheck & ArchiChect
  • XProCheck, T2M2, LogUI, Ulbow, blowhole and log utilities
  • Cirrus & Bailiff
  • Precize, Alifix, UTIutility, Sparsity, alisma, Taccy, Signet
  • Versatility & Revisionist
  • Text Utilities: Textovert, Nalaprop, Dystextia and others
  • PDF
  • Keychains & Permissions
  • Updates
  • Spundle, Cormorant, Stibium, DropSum, Dintch, Fintch and cintch
  • Long Reads
  • Mac Troubleshooting Summary
  • M-series Macs
  • Mints: a multifunction utility
  • VisualLookUpTest
  • Virtualisation on Apple silicon
  • System Updates
  • Saturday Mac Riddles
  • Last Week on My Mac
  • sysctl information
Secondary navigation
  • Search

Begin typing your search above and press return to search. Press Esc to cancel.

  • Subscribe Subscribed
    • The Eclectic Light Company
    • Join 8,875 other subscribers
    • Already have a WordPress.com account? Log in now.
    • The Eclectic Light Company
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar
 

Loading Comments...