Hi,
Ivan Vučica wrote:
Menu items should auto enable/disable depending on whether the target
object supports the passed selector.
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?
auto-enable already works that way. If you attach to NSFirst it goes
down the responder chain.
This works especially magically if you use target NSFirstResponder and
target the “first responder” correctly. Depending on how Graphos
works, this might be infeasible, of course.
It works but it is not "enough".
If I want to enable "copy" only if an object is selected I need to ask
my document or view if it has something selected inside. If you just
validate if your controller supports copy there still might be nothing
to do.
I wanted to go more "finegrained", up to the point where certain menus
are enabled only if certain things are selected.
Riccardo
_______________________________________________
Discuss-gnustep mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep