thesecretlab / SwiftDevelopmentWithCocoa1stEd

Code from our book Swift Development with Cocoa (1st Edition), for O'Reilly Media.
108 stars 45 forks source link

Wrong property watcher used #1

Open ColMcp opened 9 years ago

ColMcp commented 9 years ago

OSX/Events/Events/AppDelegate.swift has a willSet watcher on the date property in which it assigns a new value to date. I don't think this works. I changed the watcher to be didSet, grabbed the new value, modified it per the existing code and wrote it back. This fixed problems in the example where some events were being shown as happening on two consecutive dates.