3 feb 2010 kl. 15.05 skrev Matt Thomas:
On Wed, Feb 3, 2010 at 8:00 AM, Johan Lund <
email@hidden> wrote:
When adding and outlet to a class I find myself adding a property declaration and then synthesizing it. This could all be done for me.
Quick note on this specific comment. There is a huge problem with automatically declaring a property, even ones that are IBOutlets. Properties don't always have to be @synthesize (they can be @dynamic or even nothing at all). They aren't always (nonatomic, retain) either, even ones are are IBOutlets can be (nonatomic, assign). The Table View Programming Guide for iPhone OS gives an example of this. If you automatically @sythesize properties, you will lead to a situation where you're causing the user to delete code for it to work properly. This is always a bad idea. A general rule of thumb with automatically generated code is that the user should not have to delete code to make it work properly. This is why stuff you have to delete in Xcode show up as tokens and not code (like the "initializations" token when you automatically create an init method).
Now, some of your comments are good ideas. I particualrly like this one:
If I nominate e.g. the fileowner in interface builder to be the delegate of some component, why does not XCode automatically offer to insert the necessary e.g. <UIPickerViewDelegate, UIPickerViewDataSource> in my .h file?
You should definitely submit them to
http://bugreport.apple.com but keep in mind not all of your suggestions are a "correct" way to do things, they're just a personal preference. A good example is this:
Things like this is done for me if I want it to in IntelliJ for example, the call it intentions. "It seems like you intend to implement an adapter in this class..."
Microsoft tried this in Word with a cartoon character named Clippy. Myself and many other developers would HATE this feature.
-Matt
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden