Re: How to communicate between the view and the edit components?
Re: How to communicate between the view and the edit components?
- Subject: Re: How to communicate between the view and the edit components?
- From: Bill Stewart <email@hidden>
- Date: Wed, 4 Jun 2003 10:24:10 -0700
We've done some more work in this area ourselves - generalizing the
notification model that are used to notify listeners of chagnes to
parameter values - we'll be going into this in more detail at WWDC...
In the mean time, with the existing services I think the following is
the best method.
Create a "private" parameter that you don't publish information about.
Have your view install a parameter listener for that parameter. When
you want to notify the view that it needs to do whatever work you have
to tell it to do - call AUParameterSet on this parameter ID.. (Make
sure that when someone asks you for the value of that parameter that it
returns a different value than it did last time - just increment an int
each time its asked for)...
The nice thing about this is that the call can be made directly from
the render thread.
It doesn't block, it doesn't allocate memory....
The nice thing with this methodology, is that your view will receive
the notification on the run loop (probably the main GUI thread) where
it can and should be doing work - and not being called on the render
thread which is typically the only thread that an AU gets to run code
(at least after its been set up)...
Bill
On Wednesday, June 4, 2003, at 02:25 AM, Shai Shasag wrote:
I need to communicate between the AUBase derived component and the
AUCarbonViewBase component.
I though of adding component selectors, however I did not find a way
to do that. In the past the macro FIVEWORDSINLINE was used to create
new component calls, however I could not get it to work as it
preprocessed to nothing. Although it is used in AUComponent.h to
define the AU functions.
I could send message from the view component to the edit component by
using Get/SetProperty. However the other drection is not possible as
the view component does not have Get/SetProperty mechanism.
Thanks,
Shai Shasag
_______________________________________________
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.