{"id":1440,"date":"2017-03-11T15:08:46","date_gmt":"2017-03-11T23:08:46","guid":{"rendered":"https:\/\/www.ussherpress.com\/blog\/?p=1440"},"modified":"2017-03-11T15:11:56","modified_gmt":"2017-03-11T23:11:56","slug":"simple-macos-app-illustrating-undoredo-and-other-concepts","status":"publish","type":"post","link":"https:\/\/www.ussherpress.com\/blog\/?p=1440","title":{"rendered":"Simple macOS app illustrating undo\/redo and other concepts"},"content":{"rendered":"<p>For my <a href=\"https:\/\/www.ussherpress.com\/blog?tag=foreverlist\">ForeverList<\/a> project, I wanted to learn how to use NSUndoManager with a list, so I spent an hour and put together a simple app demo. <a href=\"https:\/\/github.com\/allenu\/SimpleLists\">Check out\u00a0my SimpleLists project on github<\/a>. It illustrates a few basic concepts in Document-based macOS app development.<\/p>\n<p>The app lets you create a simple list. You can enter new items and select existing items to delete one by one. You can save and load to a simple JSON array.\u00a0As mentioned, it supports undo using NSUndoManager.<\/p>\n<p><a href=\"https:\/\/www.ussherpress.com\/blog\/?attachment_id=1441\" rel=\"attachment wp-att-1441\"><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1441\" src=\"https:\/\/www.ussherpress.com\/blog\/wp-content\/uploads\/screenshot.png\" alt=\"\" width=\"1184\" height=\"808\" srcset=\"https:\/\/www.ussherpress.com\/blog\/wp-content\/uploads\/screenshot.png 1184w, https:\/\/www.ussherpress.com\/blog\/wp-content\/uploads\/screenshot-580x396.png 580w, https:\/\/www.ussherpress.com\/blog\/wp-content\/uploads\/screenshot-768x524.png 768w, https:\/\/www.ussherpress.com\/blog\/wp-content\/uploads\/screenshot-940x641.png 940w\" sizes=\"(max-width: 1184px) 100vw, 1184px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>For my ForeverList project, I wanted to learn how to use NSUndoManager with a list, so I spent an hour and put together a simple app demo. Check out\u00a0my SimpleLists project on github. It illustrates a few basic concepts in Document-based macOS app development. The app lets you create a simple list. You can enter &hellip; <a href=\"https:\/\/www.ussherpress.com\/blog\/?p=1440\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Simple macOS app illustrating undo\/redo and other concepts<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[131],"tags":[126],"_links":{"self":[{"href":"https:\/\/www.ussherpress.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1440"}],"collection":[{"href":"https:\/\/www.ussherpress.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ussherpress.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ussherpress.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ussherpress.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1440"}],"version-history":[{"count":5,"href":"https:\/\/www.ussherpress.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1440\/revisions"}],"predecessor-version":[{"id":1446,"href":"https:\/\/www.ussherpress.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1440\/revisions\/1446"}],"wp:attachment":[{"href":"https:\/\/www.ussherpress.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1440"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ussherpress.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1440"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ussherpress.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1440"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}