• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [Semi-OT] Gestures in Cocoa AU Views
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Semi-OT] Gestures in Cocoa AU Views


  • Subject: Re: [Semi-OT] Gestures in Cocoa AU Views
  • From: Pavol Markovic <email@hidden>
  • Date: Tue, 11 Oct 2005 00:27:44 +0200

Sorry, I should have been more exact and I should have tried the Filter demo before asking (to excuse my mistake I was running 10.3.x at the time of typing the message). The problem I've had was purely related to NSNotifications and their observers (not AUEvent listeners). Because I wanted to have controls-view relations as loosy as possible (creating reusable framework was my goal) I used [[NSNotificationCenter defaultCenter] addObserver:selector:name:object: with nil object]. And that was the problem, because all independent views' notification observers were receiving the same notification (posted from one of multiple active views) and thus creating multiple AUEvents (though only one was valid).

Now I see my concept needs adding observer instance variable (and connecting it in IB) for each control object embedded into AU view or one of it's subviews and use it as an object parameter in postNotificationName:object: method to prevent spreading notifications across all registered observers. But maybe using control's own delegate methods would be more readable if control's delegate is not needed for doing other job.

Again sorry for wasting time and space, but maybe someone will find this useful :)

PM

On Oct 10, 2005, at 9:39 PM, William Stewart wrote:

The Filter demo uses the AUEvent Listener as the basic API for dealing with this - if you run this say in AU Lab with the Generic view open as well, you'll see the appropriate highlighting occurring between the views as you click on sliders, etc.

There's also a tech note on Apple's developer web site that provides an overview of this architecture.

Bill

On 10/10/2005, at 2:02 AM, Pavol Markovic wrote:

Sorry for being OT, this is probably more Cocoa question.

I once played with Cocoa AU views and one thing that I've seen as problem was posting control/parameter's begin and end gestures. I remember in older CoreAudio SDK there was proposal for getting parameter ID according to mouse coordinates but it was pulled off later.

Then I thought about using NSNotifications and converting them into Carbon AUEvents. But I run into problem when two and more AUs have opened the view at the same time. Then there were multiple notification listeners and they responded simultaneously to mouse events. What was even worse, two different AUs using same code base might respond.

Because it was only research project I've frozen it, but today I've looked into latest SDK examples (Filter) and I found out that the same concept (NSNotification with default notification center) is used here. I haven't tried it yet, but I guess it suffers from the same problem. Is there any other way to do this - for example creating private notification center?

Thanks for suggestions,
Pavol Markovic

_______________________________________________
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


-- 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
_______________________________________________________________________ ___




_______________________________________________ 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
References: 
 >[Semi-OT] Gestures in Cocoa AU Views (From: Pavol Markovic <email@hidden>)
 >Re: [Semi-OT] Gestures in Cocoa AU Views (From: William Stewart <email@hidden>)

  • Prev by Date: Re: ClassInfo & PresentPreset confusion
  • Next by Date: Re: USB vs. FireWire
  • Previous by thread: Re: [Semi-OT] Gestures in Cocoa AU Views
  • Next by thread: ClassInfo & PresentPreset confusion
  • Index(es):
    • Date
    • Thread