Re: AU custom cocoa view naming
Re: AU custom cocoa view naming
- Subject: Re: AU custom cocoa view naming
- From: Brian Willoughby <email@hidden>
- Date: Fri, 9 Sep 2005 23:48:59 -0700
Hello,
Considering that the Cocoa AU Hosting sample code autoreleases the
mCocoaAUViewClass instance, wouldn't it be better if the description method
were a class method?
+ (NSString *)description
{
return @"Filter View";
}
An instance method has the advantage of being able to return a different
string based on the state of an individual plug-in instance, but if the AU Host
has freed the mCocoaAUViewClass, then it won't be able to do anything more
interesting than return a static string, in which case it should be a class
method.
i.e. it is impossible for the host to call -description unless an instance of
the factory class exists. +description could be called at any time.
Brian Willoughby
Sound Consulting
Begin forwarded message:
To: CoreAudio API <email@hidden>
From: Michael Hopkins <email@hidden>
Date: Thu, 8 Sep 2005 15:21:12 -0700
Subject: AU custom cocoa view naming
Hello everyone!
I would like to post a reminder for those of you that are writing
custom audio unit views in cocoa. Please make sure that your main
class (the entry point class in the mCocoaAUViewClass field of the
AudioUnitCocoaViewInfo structure, not your view class) implements the
description method. This method is used by hosts to display the name
of your custom view in your interface.
Example:
- (NSString *) description {
return [NSString withString: @"Filter View"];
}
If you do not override this method in your main class, the host may
use the name of your audio unit, or the name of your main class
instead. You can test your Audio Unit in a host such is AU Lab to see
how this string is used in a host application. Open the inspector
window for your audio unit and look at the popup menu in the upper
right hand corner of the inspector.
For more information, see WritingCocoaAUUIs.pdf in the CoreAudio SDK.
Thanks,
michael
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden