> Am 13.11.2017 um 12:54 schrieb Ivan Vučica <[email protected]>: > > To add to thread from a different perspective... > > Menu items should auto enable/disable depending on whether the target object > supports the passed selector.
I'm afraid this logic is too simple. Yes, the target object should support the selector. But there may be additional conditions: For instance, a paste menu item should be enabled only when the pasteboard contains content that is compatible with the receiver. And cut, copy and delete menu items should be enabled only if the receiver has a non-empty selection. > Would it make sense to not have custom code to enable/disable menu items, and > just have appkit do it for you depending on the target? In my experience, custom code is unavoidable in almost any non-trivial case because the AppKit is not able to determine exactly when a menu item is applicable and when not. Having support for the selectors is a necessary but not a sufficient condition. Wolfgang _______________________________________________ Discuss-gnustep mailing list [email protected] https://lists.gnu.org/mailman/listinfo/discuss-gnustep
