Re/evaluate the notebook blocks label because we dont garuntee the evaluation priority.
authorJosh Blum <josh@joshknows.com>
Fri, 18 Sep 2009 16:51:33 +0000 (09:51 -0700)
committerJosh Blum <josh@joshknows.com>
Fri, 18 Sep 2009 16:51:33 +0000 (09:51 -0700)
Meaning, we cant garuntee that the notebook block will be evaluated before this param,
without explicitly calling evaluate on it when the value is needed.

grc/python/Param.py

index 1c151131526a9ca8f175d6841d25da4195adace2..34d5ab116b07e629f16ecf0d70c29361a16579da 100644 (file)
@@ -385,7 +385,7 @@ class Param(_Param, _GUIParam):
                        try: notebook_block = filter(lambda b: b.get_id() == notebook_id, notebook_blocks)[0]
                        except: raise Exception, 'Notebook id "%s" is not an existing notebook id.'%notebook_id
                        #check that page index exists
-                       try: assert int(page_index) in range(len(notebook_block.get_param('labels').get_evaluated()))
+                       try: assert int(page_index) in range(len(notebook_block.get_param('labels').evaluate()))
                        except: raise Exception, 'Page index "%s" is not a valid index number.'%page_index
                        return notebook_id, page_index
                #########################