Re: accessing mCarbonPane
Re: accessing mCarbonPane
- Subject: Re: accessing mCarbonPane
- From: Bill Stewart <email@hidden>
- Date: Mon, 28 Oct 2002 09:03:14 -0800
The protected thing is fine... A subclass can directly access a protected
variable...
on 26/10/02 7:21 AM, Airy Andri wrote:
>
Maybe you can :
>
if (mCarbonPane)
>
DisposeControl(mCarbonPane);
>
mCarbonPane = 0;
>
in your destructor before dealing with your controls (or you can just
>
delete them here).
I think its a very bad practise to have another class dispose of memory
associated with instance variables in that class...
This is something that should be added to the parent class' destructor
Bill
>
Your can also add a public GetCarbonPane() method in your view class,
>
or define a
>
SetCarbonPane method in your Control class.
>
>
BTW, why do your need the mCarbonPane to unregister your control class ?
>
>
Airy
>
>
>
Le samedi, 26 oct 2002, ` 16:38 Europe/Paris, Urs Heckmann a icrit :
>
>
> Hi,
>
>
>
> for my GUI class I would like to access mCarbonPane.
>
>
>
> Is there anything speaking against making it public member of
>
> AUCarbonViewBase?
>
>
>
> The reason for this is, I want to unregister my custom controls in my
>
> class derived from AUCarbonViewBase. But the destructor where this
>
> should happen gets called before AUCarbonViewBase destroys the
>
> controls, which in turn leads to a crash. Hence I want to track my
>
> controls on my own and delete them before I unregister them.
>
>
>
> (I think this would also affect the lately sample coded HIView
>
> approaches)
>
>
>
> Cheers,
>
>
>
> ;) 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.
>
_______________________________________________
>
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.
--
mailto:email@hidden
tel: +1 408 974 4056
__________________________________________________________________________
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
__________________________________________________________________________
_______________________________________________
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.