• 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: Accessing interface elements (iPhone vs Mac)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accessing interface elements (iPhone vs Mac)


  • Subject: Re: Accessing interface elements (iPhone vs Mac)
  • From: Shawn Erickson <email@hidden>
  • Date: Wed, 21 Jan 2009 10:04:34 -0800

On Tue, Jan 20, 2009 at 5:30 PM, Graham Cox <email@hidden> wrote:

> When the nib is loaded, the accessor is used rather than setting the ivar directly (as per Mac)

To be clear NIB loading on Mac OS X will use a setter if one exists
(assuming a name match)...

Outlet connections
In Mac OS X, the nib-loading code tries to reconnect outlets using the
object's own methods first. For each outlet, Cocoa looks for a method
of the form setOutletName: and calls it if such a method is present.
If it cannot find such a method, Cocoa searches the object for an
instance variable with the corresponding outlet name and tries to set
the value directly. If the instance variable cannot be found, no
connection is created.
...

So if you are targeting Mac OS X 10.5 and later you can use the same
property syntax as you see on the iPhone ... the same consistent
pattern will support both.

-Shawn
_______________________________________________

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: Accessing interface elements (iPhone vs Mac)
      • From: Adam Venturella <email@hidden>
References: 
 >Accessing interface elements (iPhone vs Mac) (From: Ashley Perrien <email@hidden>)
 >Re: Accessing interface elements (iPhone vs Mac) (From: Graham Cox <email@hidden>)

  • Prev by Date: Adjusting cursor in non-key Panel window
  • Next by Date: Observing [NSWindow orderOut:] ?
  • Previous by thread: Re: Accessing interface elements (iPhone vs Mac)
  • Next by thread: Re: Accessing interface elements (iPhone vs Mac)
  • Index(es):
    • Date
    • Thread