• 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: Sharing methods with other objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sharing methods with other objects


  • Subject: Re: Sharing methods with other objects
  • From: Sherm Pendley <email@hidden>
  • Date: Tue, 17 Dec 2002 15:16:09 -0500

On Monday, December 16, 2002, at 10:39 PM, Aidas Dailide wrote:

I have a simple question here. I want to share some variables between NSObjects. After "sharing" shared variables are nil's. What is the correct way to share variables between NSObjects(and others ofcourse)?

I used methods like -(int)returnNumber{ return my_number; }

In the most general case, accessor methods such as you describe above are the preferred means of providing access to instance variables.

sherm--

If you listen to a UNIX shell, can you hear the C?
_______________________________________________
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.

References: 
 >Sharing methods with other objects (From: Aidas Dailide <email@hidden>)

  • Prev by Date: Re: Printing examples in Cocoa
  • Next by Date: Re: Tooltips - what a pathetic joke... :)
  • Previous by thread: Sharing methods with other objects
  • Next by thread: Re: Sharing methods with other objects
  • Index(es):
    • Date
    • Thread