Extelligent Cocoa
Because one brain is not enough
RSS
  • Home
  • About…
NSStackView Tutorial

May 12 2018

NSStackView Tutorial

(Xcode 9, macOS 10.12, Swift 4) Stackviews exist mainly to make layout easier (we’ll not go much into NSGridView here, which is the ‘we found another use case for which stackViews aren’t all that great’ variant). In this post, we’ll see what else we can do with stackviews, and where the pitfalls are. I find […]

By Extelligent Cocoa • Bug Reports, Interface, Tutorials, Wiki • • Tags: Autolayout, NSStackView

Mar 13 2018

Bugfixing: an example from Topology

This is a lovely, and lovingly details explanation of how a rare bug was identified, what steps were taken to isolate it, and how it was finally resolved. Debugging is a skillset of its own, and this article walks you through the process. https://topologyeyewear.github.io/engineering-blog/2018/03/07/heap_corruption/ (warning: the main blog autoplays _something_ and doesn’t stop, so enter […]

By Extelligent Cocoa • Bug Reports, Real World Swift, Resources •

Filetypes and UTIs

Mar 11 2018

Filetypes and UTIs

macOS 10.12 (I will update this post once I’ve moved to 10.13) UTIs are necessary for – creating/setting filetypes for a document-based app (whether using NSDocument or not) – telling the system which filetypes your apps will open On macOS, you’re more likely to encounter UTIs in the both context; the importing of files (eg […]

By Extelligent Cocoa • File Handling, Wiki • • Tags: NSApplicationDelegate, NSOpenPanel, NSSavePanel

Saving Files with Codable

Feb 27 2018

Saving Files with Codable

macOS 10.12.6; Xcode 9.2; Swift 4.0 This is the basic ‘create a file’ post; you still need to register your filetype with the Finder and tell your app what it means to open a file when the user double-clicks it in the Finder; there is a separate post on Filetypes and UTIs which builds on […]

By Extelligent Cocoa • File Handling, Tutorials, Wiki • • Tags: Codable, NSCoding, NSKeyedArchiver, NSKeyedUnarchiver, NSOpenPanel, NSSavePanel

File Handling master post

Feb 13 2018

File Handling master post

Once you start looking into what file creation and reading involves, you may feel an urge to run away screaming. I certainly did. So far, I have managed to write posts on – NSOpenPanel/NSSavePanel – Basic FileManager paths/URLs – custom file types – Codable/NSCoding These posts do not touch on – file coordinators and -presenters […]

By Extelligent Cocoa • EC Meta, File Handling •

NSOpenPanel/NSSavePanel

Feb 7 2018

NSOpenPanel/NSSavePanel

macOS 10.12; Swift 4 Basics Opening and saving files is part of many, if not most Mac Apps, and there are many ways of achieving this. I wanted to review my practice and hope to arrive at a clean, swifty way of file handling. In this post, I will concentrate on NSOpenPanel and NSSavePanel, rather […]

By Extelligent Cocoa • File Handling, Interface, Wiki • • Tags: NSOpenPanel, NSSavePanel

Basic Filemanager paths/URLs

Feb 7 2018

Basic Filemanager paths/URLs

macOS 10.12; Swift 4 This post started as an offshoot of the NSOpenPanel/NSSavePanel post. Frequently I want to navigate to certain locations – eg, my apps ApplicationSupport folder, or the user’s document folder – and I could never remember how to get to them. (Spoiler: I think this API has been updated a lot since […]

By Extelligent Cocoa • File Handling, Wiki •

Toolbar Tutorial

Jan 27 2018

Toolbar Tutorial

Toolbars have been an integral part of macOS since the beginning. They provide the opportunity to display frequently used controls to the user. Where older macOS applications might have presented a pallet with certain options, modern macOS apps tend to use toolbars. While Apple provides an extensive guide for macOS toolbars, it was last updated […]

By Extelligent Cocoa • Bug Reports, Interface, Tutorials • • Tags: NSTitlebarAccessoryViewController, NSToolbar, NSToolbarItem

Storyboard Embed Segues

Jan 5 2018

Storyboard Embed Segues

macOS 10.12, Xcode 9.2 In the macOS Storyboard Segues post I briefly referred to embed segues; I have just used one and found an ideosynchracy that is worth documenting. At the moment, about 100% of bugs (as opposed to cases I didn’t handle or things I forgot to set up) are due to storyboard issues: […]

By Extelligent Cocoa • Wiki • • Tags: containerView, NSStoryboardSegue

Assigning a button’s action – with added bug

Dec 29 2017

Assigning a button’s action – with added bug

Edited to add: This, apparently, works as intended – you need to assign the button’s _target_ with testButton.target = self. It doesn’t completely explain why the code is working under some circumstances, but it’s not a bug as such. This thoroughly spoilt my day today. I was convinced I’d gotten the ‘assign-an-action-on-the-fly’ code correctly, but […]

By Extelligent Cocoa • Bug Reports, Interface • • Tags: containerView, NSButton, storyboards

< 1 2 3 4 5 >»

Categories

  • Application Design
  • Bug Reports
  • Coding Meta
  • Design Patterns
  • EC Meta
  • Extensions
  • File Handling
  • Frameworks
  • Graphics
  • Interface
  • Operators
  • Real World Swift
  • Resources
  • SpriteKit
  • Teaching Programming
  • Tutorials
  • Wiki

Recent Posts

  • NSOutlineView: Saving expansion status
  • Saving a font to UserDefaults
  • Disclosure Triangle (Autolayout)
  • NSColorWell/NSTextField Bug
  • Get the modification (or creation) date of a file

Archives

  • August 2020
  • March 2020
  • September 2019
  • January 2019
  • August 2018
  • May 2018
  • March 2018
  • February 2018
  • January 2018
  • December 2017
  • November 2017
  • October 2017
  • July 2017
  • June 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016
  • November 2016

Recent Wiki

  • Saving a font to UserDefaultsSaving a font to UserDefaults
    (Here using macOS 13, Xcode 10, Swift 4.2, but
  • Get the modification (or creation) date of a fileGet the modification (or creation) date of a file
    Xcode 10, Swift 4.2, macOS 10.13 func
  • NSDocumentController basicsNSDocumentController basics
    Xcode 10, macOS 13.5, Swift 4.2 Without wanting to
  • NSStackView TutorialNSStackView Tutorial
    (Xcode 9, macOS 10.12, Swift 4) Stackviews exist
  • Filetypes and UTIsFiletypes and UTIs
    macOS 10.12 (I will update this post once I’ve

Tags

AppDelegate Autolayout closures Codable containerView Core Data disclosure embed view enums FileAttributeKey FileManager generics initialFirstResponder NSAlert NSApplication.ModalResponse NSApplicationDelegate NSButton NSCoding NSColorWell NSDocumentController NSFont NSFontDescriptor NSImageView NSKeyedArchiver NSKeyedUnarchiver NSOpenPanel NSOutlineView NSPopover NSSavePanel NSScrollView NSStackView NSStoryboardSegue NSTextField NSTextFieldDelegate NSTitlebarAccessoryViewController NSToolbar NSToolbarItem NSView NSWindowController sheets singletons SKView storyboards UserDefaults zoom

↑

© Extelligent Cocoa 2023
Powered by WordPress • Themify WordPress Themes