What's missing in Cocoa? [closed]

2019-02-12 02:45发布

If you could add anything to Cocoa, what would it be? Are there any features, major or minor, that you would say are missing in Cocoa. Perhaps there is a wheel you have had to invent over and over because of an omission in the frameworks?

12条回答
家丑人穷心不美
2楼-- · 2019-02-12 03:05

A way to specify copy/retain properties that are automatically released in dealloc. Perhaps

@property (nonatomic, copy, dealloc) NSString* name;

And RegexKit of course.

查看更多
劳资没心,怎么记你
3楼-- · 2019-02-12 03:06

@property (..,copy) support for mutable type classes (NSMutableArray, NSMutableDictionary, etc.). Currently, if you assign a value to property for a mutable type class the object created will be non-mutable (due to the copy).

查看更多
Deceive 欺骗
4楼-- · 2019-02-12 03:06

Proper support for web services.

查看更多
小情绪 Triste *
5楼-- · 2019-02-12 03:10

A way to flag entire Core Data entities as transient. This would be particularly useful for implementing Bonjour sharing.

For example, let's say I've got an iTunes-like model, with Playlist and Song entities. Currently, to implement Bonjour sharing, I create two additional NSObject subclasses, TransientPlaylist and TransientSong, which implement all of the same methods as their Core Data counterparts.

I shouldn't need to double the number of model classes just to have transient versions of my objects – not when I want them to behave exactly the same, sans persistence.

(Yes, the other option is to have an in-memory persistent store which houses all of the entities you want to be transient. Either way, it's unnecessary overhead)

查看更多
对你真心纯属浪费
6楼-- · 2019-02-12 03:12
  • Good regular expression support
  • Layout managers in AppKit. Autoresizing just doesn't cut it for complicated GUIs.
查看更多
姐就是有狂的资本
7楼-- · 2019-02-12 03:12

Certainly a reasonable interface from manage object contexts to SQL database servers'd be pretty cool.

I'd like to see better examples of writing custom views with programatically created cells, all autoscrolling nicely.

Also, there seems to be a real gap in IB's support for complex multi-paned windows with working splitters. I suppose they're working on this?

And whatever happened to resolution independence, huh?

查看更多
登录 后发表回答