• 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: audio-specific UI component libraries for Cocoa?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: audio-specific UI component libraries for Cocoa?


  • Subject: Re: audio-specific UI component libraries for Cocoa?
  • From: Justin Carlson <email@hidden>
  • Date: Mon, 1 Nov 2010 23:57:07 -0400


I'm not sure I understand the Cocoa namespace problem very well. Does this mean that even if the controls are distributed as just .h/.m files to include in your project, the names could conflict if multiple plugins simply have the same class name?
exactly.

(going off memory:)
objc classes/symbols are registered with the objc runtime when the binary is loaded. if you attempt to register an objc class with a name that has already been registered (which happens by loading your binary), then you're well on your way to UB:
- a message will be logged when the second class attempts to register
- the first class is not replaced
- the second class is then not registered
- alloc/init calls to this class (in your implementation) would return an instance from the objc class which was first loaded (e.g., the other manufacturer's, or from another plugin you developed which also statically linked to the control library)

the problems could manifest many ways; you may end up with different data layouts of ivars and methods from multiple implementations.

if you distribute a framework (and don't alter the names), then you have to ensure all binaries refer to the framework implementation, which means you'll have to support versioning (otherwise, the chances for failure are too high).

if the classes/categories are linked into the plugin's ui executable, then all class names and category methods for each distribution will have to be uniquely named.

fwiw, you can also synthesize objc classes (with arbitrary names/selectors) at runtime.

Maybe I'm not remembering correctly, but we *do not* have this problem in C and C++, correct? This seems a bizarre design choice.
correct - C and C++ don't register with the objc runtime. bizarre, perhaps, but this is also a feature in some regards. for example, it allows constructs we can't (conveniently) simulate in C or C++, such as: "id stack = [NSClassFromString(@"YYYStack") new]".

I notice that AUGUI is for Carbon, which I'm not developing for. I'll take a look at VSTGUI and WDL. Thanks -Kevin

AUGUI also includes a cocoa sample. the library was primarily developed when Carbon AU views were the standard and Cocoa AU views were still very new.

 _______________________________________________
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: 
 >Re: audio-specific UI component libraries for Cocoa? (From: Justin Carlson <email@hidden>)

  • Prev by Date: AudioQueue Services approximate latency?
  • Next by Date: Audio Component Count "Badness"
  • Previous by thread: Re: audio-specific UI component libraries for Cocoa?
  • Next by thread: mouse moved events in an AudioUnit's cocoa view
  • Index(es):
    • Date
    • Thread