Re: Parsing STDout into an NSDictionary
Re: Parsing STDout into an NSDictionary
- Subject: Re: Parsing STDout into an NSDictionary
- From: Nick Forge <email@hidden>
- Date: Wed, 28 Feb 2007 00:50:00 +1100
On 27/02/2007, at 8:12 PM, Thomas Engelmeier wrote:
Am 26.02.2007 um 02:45 schrieb Nick Forge:
After some more research I discovered that the settings can also
be found in /Library/Preferences/SystemConfiguration/
com.apple.PowerManagement.plist, so I can directly import the
dictionary and I don't have to worry about parsing. That
simplifies things somewhat!
- there should be PMxxx APIs to fiddle with the settings
- the plist is an implementation detail that might change at full
moon, the next system update or anytime later.
Do you want to release software that potentially causes wake from
sleep issues because suddenly the power manager finds obsoleted and
removed keys in its settings?
Point taken about the plist - I will only be changing settings via
the pmset command itself. It's just easier to read them via the
plist. It gets updated instantly when you change settings in the
Energy Saver preferencePane. I severely doubt that Apple would change
the pmset write commands in a point update of 10.4. I am aware that
it may all be changed in 10.5, so if I actually release this I will
make it check the version of either OSX or pmset before allowing you
to modify settings.
I would love to use a PMxxx API to do this, but I have spent hours
searching, and there is nothing. It's either pmset or nothing. If you
know of an API that will do the job, I'd love to know about it!
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden