try: #try to load from file
if file_path: Messages.send_start_load(file_path)
flow_graph = self._platform.get_new_flow_graph()
- flow_graph.handle_states = self.handle_states
page = NotebookPage(
self,
flow_graph=flow_graph,
self.pack_start(self.scrolled_window)
#inject drawing area and handle states into flow graph
self.get_flow_graph().drawing_area = self.get_drawing_area()
+ self.get_flow_graph().handle_states = main_window.handle_states
self.show_all()
def get_drawing_area(self): return self.drawing_area
self._handle_changed()
file_dialog.destroy() #destroy the dialog
+#blacklist certain ids, its not complete, but should help
+import __builtin__
+ID_BLACKLIST = ['options', 'gr', 'blks2', 'wxgui', 'wx', 'math', 'forms', 'firdes'] + dir(__builtin__)
#define types, native python + numpy
VECTOR_TYPES = (tuple, list, set, numpy.ndarray)
COMPLEX_TYPES = [complex, numpy.complex, numpy.complex64, numpy.complex128]
except:
self._add_error_message('ID "%s" is not unique.'%v)
raise Exception
+ try: assert v not in ID_BLACKLIST
+ except:
+ self._add_error_message('ID "%s" is blacklisted.'%v)
+ raise Exception
return v
#########################
# Grid Position Type