• 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: Sending message to Objective-C object from C file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sending message to Objective-C object from C file


  • Subject: Re: Sending message to Objective-C object from C file
  • From: "Alexander v. Below" <email@hidden>
  • Date: Sat, 28 Jul 2007 12:16:25 +0200

You would do that like you would do it with C++, or any other object oriented language.

For example, you can pass the object into your library as a parameter, and then call methods on it

void myCFunction (void * myParam, id myObject)
{
 [myObject doSomething:myParam];
}

A fairly common technique you will also find int Apple Sample Code -- however, the other way around: A C++ Method is called from QuickTimes C-based callback mechanism.

Alex

P.S.: Some people are on a lot of mailing lists. When you cross-post, these people - like me - will get your message several times. Please do not do that.


On 28.07.2007, at 11:58, seyed mehdi nazemi wrote:

Hi everyone,

I am an experienced programmer but quite new in Mac OS programming. I am developing a Cocoa application. I have an old C library files which I want to reuse in this application. Part of that C library file plays an audio file using another Audio library file. I want to replace functionality of that Audio library file with QuickTime.

So I have created a Controller Objective-C object that includes QTMovieViewer and can use that to play an audio file. Now my question is how to send message to that Objective-C object from a C file in my old library.

Thanks in advance

Luca.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Sending message to Objective-C object from C file (From: "seyed mehdi nazemi" <email@hidden>)

  • Prev by Date: Sending message to Objective-C object from C file
  • Next by Date: Re: Sending message to Objective-C object from C file
  • Previous by thread: Sending message to Objective-C object from C file
  • Next by thread: Re: Sending message to Objective-C object from C file
  • Index(es):
    • Date
    • Thread