alexzielenski/StartAtLoginController — pull request #2 by ttilley (2012-02-03 21:03:43+00:00)
Title: additional fixes/tweaks

This batch of changes is primarily sandbox related. I needed to do a fair bit of searching and debugging for this one... It doesn't help that the official documentation is incorrect. See the statement from an apple employee here (requires access to devforum): https://devforums.apple.com/message/587382#587382

* removed `LSRegisterURL`. In a dev forum discussion an apple employee admitted the documentation was incorrect and that `LSRegisterURL` should _never_ be called by a sandboxed application.
* replaced startAtLogin getter with one that's more sandbox friendly, if slightly slower and messier
* added semi-cached 'enabled' property that's more intuitive to track via KVO. `startAtLogin` and `setStartAtLogin:` save state to this property as it changes, allowing one to instead track `enabled` and avoid API calls altogether on read. writing to `enabled` simply calls `setStartAtLogin:`.
* inform KVO of the non-automatic behavior for properties 'startAtLogin' and 'enabled'
* remove potentially non-sandbox-safe `remove` method.
* re-indent everything like the whitespace nazi i am
* figured I might as well add my name to the copyright at this point