• 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
[Lion] IBOutlets, strong or weak?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Lion] IBOutlets, strong or weak?


  • Subject: [Lion] IBOutlets, strong or weak?
  • From: Marc Respass <email@hidden>
  • Date: Fri, 05 Aug 2011 15:11:25 -0400

Hi All,

I'm writing a Lion-only application and trying to do things more iOS-like (which appears to be the direction but regardless, I like it) by creating properties for my IBOutlets. I am using the latest Xcode 4.2 and ARC.

With Xcode 4, I can drag from a control to the header and Xcode will create an outlet and a property. I noticed that Xcode creates a property like this

@property (strong) IBOutlet NSTextField *someField;

But I have other code where it is defined weak -- I started this project on an earlier build of Xcode . The strong and weak are new ARC types replacing retain and assign (if I remember correctly) and I thought that NSWindowController and NSViewController retain their top level objects so in 10.6 if I wanted to do this, I would make the property "assign". Should I be using "strong" as Xcode seems to think now or "weak" as Xcode used to think?

Any advice on this is appreciated.

Thanks
Marc
_______________________________________________

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: [Lion] IBOutlets, strong or weak?
      • From: Sean McBride <email@hidden>
  • Prev by Date: Re: Lion document opening: -[__NSArrayM insertObject:atIndex:]: object cannot be nil
  • Next by Date: Re: Smooth resizing of a text field
  • Previous by thread: Re: [Q] including omp.h?
  • Next by thread: Re: [Lion] IBOutlets, strong or weak?
  • Index(es):
    • Date
    • Thread