discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fix for startup of AClock


From: Fred Kiefer
Subject: Re: fix for startup of AClock
Date: Fri, 13 May 2011 10:02:31 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.17) Gecko/20110414 SUSE/3.1.10 Thunderbird/3.1.10

On 12.05.2011 23:51, Sebastian Reitenbach wrote:
On 05/12/11 20:14, Stefan Bidi wrote:
So this works for you?  That's great.

Just one thing, not that it really matters, but you don't need to call
-stop from -sound:didFinishPlaying:.  At this point the the code in
NSSound would have already stopped and cleaned up.  As a matter of
fact, you should get NO from the call to -stop.
Ah, yeah, I remove them, if someone else has suggestions for
improvements, let me know ;)

What I noticed while looking how to get it working, I found here:
http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSSound_Class/Reference/Reference.html

That I should use:
- (void)setDelegate:(id<  NSSoundDelegate
<http://developer.apple.com/library/mac/documentation/MusicAudio/Reference/NSSoundDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intf/NSSoundDelegate>
)/delegate
to set the delegate, but then when compiling, I got the error message
that it was unable to find the Protocol definition of NSSoundDelegate.
In GNUstep it seems, NSSoundDelegate is "only" a Category, not a Protocol.

Sebastian
/

The NSSoundDelegate protocol was added in MacOSX 10.6 and yes, we are still missing some of the functionality from that release :-) Feel free to add this simple definition into GNUstep gui, otherwise I will do so when I have the time for it. The annoying bit here will be to keep compatibility for people that explicitly request the older API. This means we need two separate declarations of the two delegate methods on NSSound...



reply via email to

[Prev in Thread] Current Thread [Next in Thread]