Re: [ANN] ANSystemSoundWrapper - Cocoa wrapper for changing system volume
Re: [ANN] ANSystemSoundWrapper - Cocoa wrapper for changing system volume
- Subject: Re: [ANN] ANSystemSoundWrapper - Cocoa wrapper for changing system volume
- From: Antonio Nunes <email@hidden>
- Date: Wed, 16 Apr 2008 17:06:13 +0100
On Apr 16, 2008, at 11:11 AM, Mike Abdullah wrote:
Also, another alternative is to follow a singleton pattern like
NSFileManager et. al and implement these as instance methods. If you
do persist with either of the ObjC-based approaches, I would also
suggest changing your first method to:
+ (float)systemVolume;
as this is more common Cocoa practice. The "get" prefix is generally
reserved for methods that return something by reference.
Very true, I overlooked that when I adapted the original code samples.
I've updated the downloadable file to reflect the change.
Actually, I have a further alternative that I've just thought of.
Rather than declaring your own class for these methods, you could
keep them as class methods, but turn it into a category on NSSound.
Cool. Now why didn't I think of that? I like this much better. So I've
created an alternative implementation as a category on NSSound. It's
available here:
http://sintraworks.com/media/code/ANNSSoundSystemVolumeAdditions.zip
António
-----------------------------------------------------------
What you have inside you expresses itself through both your
choice of words and the level of energy you assign to them.
The more healed, whole and connected you feel inside,
the more healing your words will be.
--Rita Goswami
-----------------------------------------------------------
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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