Re: cleanup after CreateUI
Re: cleanup after CreateUI
- Subject: Re: cleanup after CreateUI
- From: Bill Stewart <email@hidden>
- Date: Fri, 28 Mar 2003 02:16:15 -0800
We left this perhaps a little lose, but that basic intention is:
open view component
Create View
...
close component
It was NOT our intention for the following to occur:
open view component
Create View
....
Create View
...
..
.
close (eventually!)
Thus - I would either do one of the following (and we should ammend the
SDK to deal with this as well):
Return an error if CreateView is called more than once...
Chris' suggestion is OK, except the possibility that you might be given
a different window to display in - in my view (!:)) that should be a
different instance of the component (and an error should be
returned)....
We wanted the views to be a simple interface that was easy to implement
- the difference between opening a new component for a different window
and telling a view to draw in a different window is minimal...
Thus, the only way to REMOVE a view from the window its in is to close
it... (thus in EditWindow in AUHosting, we close an existing view
component)
Bill
On Thursday, March 27, 2003, at 04:20 PM, Marc Poirier wrote:
I'm only concerned with CreateUI being called more than once if that's
permissable. If not and it happens, then I simply point my finger at
the
host app. ;) So I guess I would feel a little better if someone from
the
CoreAudio team could say with certainty what the protocol is, but if
not,
I'll take your word for it, Chris. :)
Marc
On Thu, 27 Mar 2003, Chris Reed wrote:
You are correct (as far as I know :-). And if you are concerned about
CreateUI being called more than once, just put a check for that in
your
CreateUI implementation.
-chris
On Thursday, Mar 27, 2003, at 13:18 US/Central, Marc Poirier wrote:
Hi. I have some questions about the creation and destruction of
AudioUnitCarbonViews.
The main thing that is concerning me is that there is the
kAudioUnitCarbonViewCreateSelect component selector which is set when
the
host wants the AUCV to put together its view, but there is not, so
far
as
I can tell, a destructive complement to that selector. Is the basic
idea
just that kAudioUnitCarbonViewCreateSelect will only ever be set (at
most)
once for a given component instance? So then kComponentCloseSelect
essentially is what triggers the cleanup of whatever occurs in
response to
kAudioUnitCarbonViewCreateSelect (as well as whatever occurs in
response
to kComponentOpenSelect)?
To put this in AUCarbonViewBase SDK-speak, the idea is that my
AUCarbonViewBase child class will do any minimal creation stuff that
is a
bare necessity for existance. Then in CreateUI, everything for the
actual
view in the window is created. Then in my AUCV class' destructor, I
clean
up everything that was created in the constructor and also, if
CreateUI
ever occurred, everything that was created there, too? And I can be
confident that CreateUI will never be called more than once in the
lifetime of my class?
I'm just lookig for some reassurance that I'm doing things correctly
and
not goofing anything up horrendously...
Thanks,
Marc
_______________________________________________
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
________________________________________________________________________
__
--
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.