Espresso icon indicating copy to clipboard operation
Espresso copied to clipboard

Check for invalid view names in any childViews property during the build process

Open dominiklaubach opened this issue 13 years ago • 0 comments

We should add a mechanism to check for invalid view names within the childViews property of any view during the build process. Therefore we will set up a list containing all 'keywords' used within the framework, e.g. 'render', 'renderChildViews' or 'theme'. Espresso then should parse the application's source code, look for properties called 'childViews' and check, whether one of them contains one of the 'keywords'.

Example:

M.PageView.design({
  childViews: 'header render footer',

  header: M.ToolbarView.design({
    value: 'Toolbar'
  }),

  render: M.ScrollView.design({
    // anything....
  }),

  footer: M.ToolbarView.design({
    value: 'Footer'
  })
});

Since the page view in the sample above uses 'render' within the childViews property, this should throw an error during the build process.

dominiklaubach avatar Aug 15 '11 09:08 dominiklaubach