This seems to have been incorrectly moved here from the code that defines the add button handler -- there is no `event` variable in this scope, making the app impossible to use due to an error.