Re: graphics in AU
Re: graphics in AU
- Subject: Re: graphics in AU
- From: Michael Hopkins <email@hidden>
- Date: Mon, 30 Sep 2002 09:44:54 -0700
On 9/29/02 10:00 PM, "email@hidden"
<email@hidden> wrote:
>
I still can't find a way to attach the sliderTrackProc and receive
>
Events of kEventControlTrack. Dunno what I'm missing.
Urs,
If you are creating controls such as slider controls using
CreateSliderControl() from the control Manager, you can specify your own
function to get called when the control is modified. You need to create a
function with the signature:
void SliderControlProc(ControlRef theControl, ControlPartCode partCode){}
You then pass this ProcPtr as the second to the last parameter of the call.
>
>
Next thing would be wrapping it in a class. Is it viable to modify the
>
AUPublic code or should I derive from there, make my own factory like
>
AUControlGroup?
>
>
Another thing is, I experience crashes when I open the AU a second
>
time, obviously by some uncertainty how to dispose off data I have
>
added to the derived AUCarbonViewBase (the image, that is). Do I have
>
to take care for superclasses when I implement a deconstructor there?
Your destructor should be called for you. You might want to verify this by
either putting a printf() in your destructor, or using the debugger to see
if your destructor is getting called.
We did have a problem in the header (AUCarbonViewBase.h) where the
destructor was not declared as virtual. This will be fixed in a subsequent
release.
I'm currently looking into these issues and will get back to the list with
further details shortly.
-Michael
>
>
It looks like this:
>
>
class myAUView : public AUCarbonViewBase {
>
public:
>
myAUView(AudioUnitCarbonView auv) : AUCarbonViewBase(auv)
>
{
>
TestImage = GetTestImage(); // read Image from component
>
bundle
>
}
>
>
~myAUView()
>
{
>
if ( TestImage != NULL )
>
{
>
CGImageRelease( TestImage );
>
TestImage = NULL;
>
}
>
}
>
virtual OSStatus CreateUI(Float32 xoffset, Float32 yoffset);
>
private:
>
CGImageRef TestImage; // my knob image
>
};
>
>
Will the destructor be called at all? And if so, when?
>
>
Thanks,
>
>
;) Urs
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.