Skip to content

Commit 5b5bcb9

Browse files
author
Ram Rachum
committed
-
1 parent 9da7d14 commit 5b5bcb9

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

garlicsim/garlicsim/general_misc/caching.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
def cache(function):
88
# todo: kwargs support
9+
# todo: try to be smart and figure out the function's signature, then be
10+
# able to understand that squared(x) is the same as sqaured(number=x).
911
if hasattr(function, 'cache'): return function
1012

1113
def cached(*args):

garlicsim_wx/garlicsim_wx/frame/frame.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ def __init__(self, *args, **keywords):
4949
self.SetIcons(garlicsim_wx.misc.icon_bundle.get_icon_bundle())
5050

5151
self.Bind(wx.EVT_CLOSE, self.on_close)
52+
# self.Bind(wx.EVT_KEY_DOWN, self.on_key_down) todo: uncomment
5253

5354
self.tree_browser = None
5455
self.seek_bar = None
@@ -63,7 +64,9 @@ def __init__(self, *args, **keywords):
6364

6465
self.CreateStatusBar()
6566

66-
self.__init_menus()
67+
self.__init_menus()
68+
69+
self.__init_key_bindings()
6770

6871
self.background_timer = thread_timer.ThreadTimer(self)
6972

@@ -87,7 +90,6 @@ def __init_menus(self):
8790
self.SetMenuBar(menu_bar)
8891
self._recalculate_all_menus()
8992

90-
9193
def _recalculate_all_menus(self):
9294

9395
try_recalculate = lambda thing: \
@@ -439,3 +441,9 @@ def delete_gui_project(self,gui_project):
439441
self.notebook.DeletePage(0)
440442
del gui_project
441443
"""
444+
445+
"""
446+
def on_key_down(self, event):
447+
if event
448+
todo: Do the Key shit
449+
"""

0 commit comments

Comments
 (0)