I have seen this same behavior too, creating @properties for IBOutlets on the iPhone. I have yet to run into a problem not @property/@synthsizeing my Outlets on the iPhone, everything seems to work just fine if you don't. So am I missing something? And am I correct in assuming you would then be responsible for [myOutlet release] in the dealloc?
On Wed, Jan 21, 2009 at 10:04 AM, Shawn Erickson <[email protected]> wrote: > On Tue, Jan 20, 2009 at 5:30 PM, Graham Cox <[email protected]> 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 protected]) > > 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: > http://lists.apple.com/mailman/options/cocoa-dev/aventurella%40gmail.com > > This email sent to [email protected] > _______________________________________________ Cocoa-dev mailing list ([email protected]) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
