idpaterson / alfred-wunderlist-workflow

Unbelievably fast task entry in Wunderlist with due dates, reminders, and recurrence
298 stars 8 forks source link

Alfred not properly initialized for UI traversal if running without a window #27

Closed idpaterson closed 10 years ago

idpaterson commented 10 years ago

From @Muurtegel in #26:

Alfred seems to crash/close with the wl command when Wunderlist is running without a window, but with the focus on another app. Here is how you can reproduce it:

  1. Close the Wunderlist window with CMD+W
  2. Open a random app (I tried Firefox and iMessage, seems to be the same for both)
  3. Run alfred with the wl command

The Wunderlist app will gain focus (it turns up in the OSX menu at the top of the screen) and alfredapp will close. I didn't get any error messages in the console though.

idpaterson commented 10 years ago

I'll add a test case for this scenario, great observation! Looks like I can use the Cmd+N shortcut to handle the case where Wunderlist is running without a window. Currently the expectation in that bit of code is that if Wunderlist does not have a window, it is in the process of launching and will soon have one, which is incorrect in this case.

idpaterson commented 10 years ago

Seems it will not be possible to prevent Alfred from closing but I can at least get the Wunderlist window to appear so that the next wl command works. Once Wunderlist provides AppleScript bindings this shouldn't be an issue since the workflow will not need to activate and send keystrokes to the app.

Muurtegel commented 10 years ago

So a workaround for now is to have a Wunderlist window open or minimized at all times. That's fine with me!

I'm curious about the Wunderlist update for AppleScript bindings. I guess Wunderlist will not have to pop-up every time, making the workflow even smoother. I do suggest adding notifications for feedback once this is the case, but that's something for the future ;).

edit: Seems like I was wrong. With the Wunderlist window minimized, there still seem to be some problems. I'll open a new issue for that (sorry for all the bug reports)

idpaterson commented 10 years ago

There is so little that can be done with the Wunderlist UI because it uses a non-standard TWUI framework. Rather than scroll and text areas, almost everything is "unknown". It's not very keyboard accessible and some features are only available by mouse click which is where my upcoming version 0.3 will focus.

I'll be very happy once Wunderlist supports AppleScript since it should unlock control for the breadth of features that the app provides but you're right, it will require a bit more feedback as to what's going on behind the scenes.

Muurtegel commented 10 years ago

For now it's fine as the Wunderlist window pops-up and you can see what is happening. But once it happens behind the scenes, a simple popup would be nice. Which can easily be done in the Workflow.

I do think you've come quite far with the workflow already though! Especially when you keep in mind that Wunderlist is so "unknown". Great job, thanks!

Muurtegel commented 10 years ago

This issue seems to be fixed with the latest update. Everything behaves as expected now.