• 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
Accessing objects from plain c code
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Accessing objects from plain c code


  • Subject: Accessing objects from plain c code
  • From: Sarah Dumoulin <email@hidden>
  • Date: Thu, 15 Jan 2004 15:35:38 -0500

I have a linux c program which I am trying to add a cocoa interface to.
I've made a front end with xcode, but I need to be able to call some of my
objective-c methods from my c code (to update an opengl context). I'm sure
that there's some very simple and obvious way of doing this, but I'm don't
know what it is. Do I just include the header files for the objective c
classes and call the functions as if they were plain C functions? Is there
a generic header file that I include to deal with the "id" type?

E.g. I have a class Viewer with a method update. Update has an integer
argument. I want my c code to call the update method. How would I do this?

Thanks,

Sarah

--
Sarah Dumoulin email@hidden
Communications Research Centre www.crc.ca
Ottawa, ON
Phone: 613-990-5242
Fax: 613-998-9648
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Accessing objects from plain c code
      • From: Nicko van Someren <email@hidden>
    • Re: Accessing objects from plain c code
      • From: "Mike R. Manzano" <email@hidden>
  • Prev by Date: Re: Bindings question
  • Next by Date: RE: Autohiding scrollers/determining visibility
  • Previous by thread: Re: NSArrayController Funkyness
  • Next by thread: Re: Accessing objects from plain c code
  • Index(es):
    • Date
    • Thread