• 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: Objective-C question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Objective-C question


  • Subject: Re: Objective-C question
  • From: Chuck Soper <email@hidden>
  • Date: Tue, 4 May 2004 11:19:52 -0700

It makes sense that your can't reference self because the function is not part of a class, eh? Something like this works fine:
AppPrefs *appPrefs = [[[NSApp delegate] appModel] appPrefs];
Chuck

At 7:57 PM +0200 5/4/04, j o a r wrote:
Eh, no - you can't access instance variables from a C function - unless
you pass them to the function as parameters. This is especially
important for the reference to "self", that you need to be able to call
instance methods.

j o a r

On 2004-05-04, at 19.01, Chuck Soper wrote:

I am mistaken. Everything I need is available from a C function. For
some reason I thought that I could not access instance variables from
C functions. I just tried to access instance variables from my "C
function" and it works great.

As you pointed out "any function written in C is therefore already
written in Objective-C." That's what I did not realize. Thanks.

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.
_______________________________________________
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: Objective-C question
      • From: j o a r <email@hidden>
References: 
 >Objective-C question (From: Chuck Soper <email@hidden>)
 >Re: Objective-C question (From: Fritz Anderson <email@hidden>)
 >Re: Objective-C question (From: Chuck Soper <email@hidden>)
 >Re: Objective-C question (From: j o a r <email@hidden>)

  • Prev by Date: Re: Getting the selected object from a popup button
  • Next by Date: Re: NSTextField and bindings
  • Previous by thread: Re: Objective-C question
  • Next by thread: Re: Objective-C question
  • Index(es):
    • Date
    • Thread