• 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
Keyword @defs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Keyword @defs


  • Subject: Keyword @defs
  • From: James Pengra <email@hidden>
  • Date: Sun, 29 Nov 2009 16:07:11 -0800

Consider the following situation I found in a Cocoa program to simulate a sine wave generator:

The class Foo has a number of variables defined in its header. In the code file Foo.m, and.preceding the @implementation block, the following structure is defined:

	typedef struct
	{
	   @defs(Foo);
	} getFoo;

Also preceding the @implementation is a C procedure called IOProc which is the call-back procedure used in audio processing. IOProc contains a pointer def defined as

      getFoo *def;

which is used to get at Foo's variables with statements like def->varname.

The latest version of Xcode (v.3.2) does not permit use of the @defs keyword.

Does anyone know of a work around I might use so that IOProc can get access to Foo's variables? IOProc fills the input buffer with data which defines the audio signal. The bulk of the code in Foo (in the @implementation block) initializes Core Audio and handles the start and stop of the sound.

   Thanks for any ideas.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Keyword @defs
      • From: Ken Thomases <email@hidden>
    • Re: Keyword @defs
      • From: Oftenwrong Soong <email@hidden>
  • Prev by Date: Apple MVC and Document Based application confusion.
  • Next by Date: Re: Keyword @defs
  • Previous by thread: Re: Apple MVC and Document Based application confusion.
  • Next by thread: Re: Keyword @defs
  • Index(es):
    • Date
    • Thread