Awsome, that looks a very handy category to have around. Thanks for producing it.

Mike.

On 16 Apr 2008, at 17:06, Antonio Nunes wrote:

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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/cocoadev%40mikeabdullah.net

This email sent to [EMAIL PROTECTED]

_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to