Use .index() instead of ._index for NoteIndexList access
authorW. Trevor King <wking@drexel.edu>
Tue, 3 Aug 2010 16:57:34 +0000 (12:57 -0400)
committerW. Trevor King <wking@drexel.edu>
Tue, 3 Aug 2010 16:57:34 +0000 (12:57 -0400)
hooke/plugin/playlist.py
hooke/plugin/playlists.py
hooke/ui/__init__.py
hooke/ui/gui/panel/playlist.py
hooke/ui/gui/statusbar.py

index 82d0c83c4ddaf9975716fde060183f331919861d..73fd5a3ec04e0a388fbdb4d75e1587c109a217a0 100644 (file)
@@ -133,7 +133,7 @@ class IndexCommand (Command):
             help=self.__doc__, plugin=plugin)
 
     def _run(self, hooke, inqueue, outqueue, params):
-       outqueue.put(params['playlist']._index)
+       outqueue.put(params['playlist'].index())
 
 class GetCommand (Command):
     """Return a :class:`hooke.playlist.Playlist`.
@@ -269,7 +269,7 @@ Index of target curve.
 
     def _run(self, hooke, inqueue, outqueue, params):
         params['playlist'].pop(params['index'])
-        params['playlist'].jump(params._index)
+        params['playlist'].jump(params.index())
 
 class FilterCommand (Command):
     """Create a subset playlist via a selection function.
index 2be0c9bdef44b78bcd3f0463da1f0015dd49dddd..44bbe923074eb75c1672ea39aa995b518d0d8c75 100644 (file)
@@ -84,7 +84,7 @@ class IndexCommand (Command):
             help=self.__doc__, plugin=plugin)
 
     def _run(self, hooke, inqueue, outqueue, params):
-       outqueue.put(hooke.playlists._index)
+       outqueue.put(hooke.playlists.index())
 
 class PlaylistListCommand (Command):
     """Get the playlists in `hooke.playlists`.
index ad09e0236135c6b8fa0b91e0ede1f74e0c407dbc..d70bd41425334c4c0b75bac1ff9ccde3fe03f7f3 100644 (file)
@@ -103,7 +103,7 @@ Hooke version %s
 
     def _playlist_status(self, playlist):
         if len(playlist) > 0:
-            return '%s (%s/%s)' % (playlist.name, playlist._index + 1,
+            return '%s (%s/%s)' % (playlist.name, playlist.index() + 1,
                                    len(playlist))
         return 'The playlist %s does not contain any valid force curve data.' \
             % self.name
index ddfedb11bf3f2a78cfb14c4eeb0025a9632aff87..c50da0bd1449763fdffb075464285b6ccfdb9e81 100644 (file)
@@ -331,7 +331,7 @@ class Tree (wx.TreeCtrl):
         self.Bind(wx.EVT_TREE_SEL_CHANGED, self._on_select)
 
     def update_playlist(self, playlist):
-        """Absorb changed `._index`, etc.
+        """Absorb changed `.index()`, etc.
         """
         self._playlists[playlist.name] = playlist
 
index 758a4121f22312372088027b25943557f273e913..dcd1ac37fadf7bf3ddeefd3ae9f91f095b3f362c 100644 (file)
@@ -40,7 +40,7 @@ class StatusBar (wx.StatusBar):
     def _playlist_status(self, playlist):
         fields = [
             playlist.name,
-            '(%d/%d)' % (playlist._index, len(playlist)),
+            '(%d/%d)' % (playlist.index(), len(playlist)),
             ]
         curve = playlist.current()
         if curve != None: