Closed idpaterson closed 9 years ago
I took a stab at doing this in Swift, but spent probably 8 hours dealing with errors from Cocoapods, Carthage, and the packages I was trying to use. Ultimately while it would run faster, I don't think the revised workflow would get off the ground with this foundation.
The PHP script currently used to handle user input from Alfred is a quick and dirty solution to a fundamentally slow response time from handling input in AppleScript. It was a significant but necessary compromise, sacrificing a few core concepts of the workflow for the sake of speed. Of course, if the
wl
script filter is not fast, when the user quickly presses return the command executed text may be missing a few characters compared to what they have typed.OS X Localization
Even though Alfred may not fully support localization, Wunderlist certainly does and its users expect a ubiquitous cross-platform experience. Certain strings, such as the localized names of the Inbox, Today, and other lists are easily determined from Wunderlist's strings files. While accessing this information would be trivial in Cocoa, it's not worth the effort to try to make PHP do the same.
Speed
PHP was the fastest scripting language available to load a working Alfred Workflow library. However, a compiled Cocoa script will be much faster. If the speed cannot be improved, usage of the workflow may need to change in a way that does not rely on script filters when a task is typed. This (typing the task first with just the
wl
keyword then selecting a list) may be an acceptable compromise but not being able to respond quickly with a script filter certainly limits possibilities for the workflow.AppleScript integration
Cocoa provides native support for AppleScript while PHP is confined to a system call. This strong integration could be very useful in the future of this workflow.