As a challenge to Chapter 9 (Adding your own tasks), I wanted to add the possibility to start any task by clicking on it. (I don’t know the pomorodo method, it’s just for the challenge’s sake)
I think I am able to create the action, but it never seems to be enabled. Is there a restriction on using storyboard+code for menu items?
Here’s the code to add the action (in MenuManager, in the loop to create all the tasks items):
I would approach this by adding a transparent button to TaskView that filled the view and was on top of everything else. It would post a notification when clicked, setting the view’s task as the notification object.
Yeah, it’s a bummer that it doesn’t work with a custom view, but on the other hand, I understand why. It could get out of hands quickly, with weird images and behaviours.
I was able to make it work with the button, but it doesn’t highlight on mouse hover.