• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [ANN] ANSystemSoundWrapper - Cocoa wrapper for changing system volume
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ANN] ANSystemSoundWrapper - Cocoa wrapper for changing system volume


  • Subject: Re: [ANN] ANSystemSoundWrapper - Cocoa wrapper for changing system volume
  • From: Mike Abdullah <email@hidden>
  • Date: Wed, 16 Apr 2008 17:28:42 +0100

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@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

_______________________________________________

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


References: 
 >[ANN] ANSystemSoundWrapper - Cocoa wrapper for changing system volume (From: Antonio Nunes <email@hidden>)
 >Re: [ANN] ANSystemSoundWrapper - Cocoa wrapper for changing system volume (From: Jean-Daniel Dupas <email@hidden>)
 >Re: [ANN] ANSystemSoundWrapper - Cocoa wrapper for changing system volume (From: Antonio Nunes <email@hidden>)
 >Re: [ANN] ANSystemSoundWrapper - Cocoa wrapper for changing system volume (From: Mike Abdullah <email@hidden>)
 >Re: [ANN] ANSystemSoundWrapper - Cocoa wrapper for changing system volume (From: Antonio Nunes <email@hidden>)

  • Prev by Date: Re: NSAllocateCollectable() questions
  • Next by Date: Re: Enabling File Open/Save etc in a non-document-based application
  • Previous by thread: Re: [ANN] ANSystemSoundWrapper - Cocoa wrapper for changing system volume
  • Next by thread: Detect phone number in NSString
  • Index(es):
    • Date
    • Thread