Skip to content

Commit

Permalink
calling all bindings
Browse files Browse the repository at this point in the history
fixes #90
  • Loading branch information
typemytype committed Apr 9, 2019
1 parent 5139c21 commit f9b976e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Lib/vanilla/vanillaWindows.py
Expand Up @@ -459,12 +459,15 @@ def _alertBindings(self, key):
# call the delegate method which calls
# this method) before the super
# call in __init__ is complete.
returnValues = []
if hasattr(self, "_bindings"):
if key in self._bindings:
for callback in self._bindings[key]:
# XXX this return causes only the first binding to be called XXX
# see http://code.typesupply.com/ticket/2
return callback(self)
value = callback(self)
if value is not None:
# elimitate None return value
returnValues.append(value)
return all(returnValues)

def windowWillClose_(self, notification):
self.hide()
Expand Down

0 comments on commit f9b976e

Please sign in to comment.