Skip to content

REF006: unknown-message-type

Message sent to a type no handler listens for

Code REF006
Name unknown-message-type
Category References (REF)
Default severity warning
Enabled by default yes
Fix available no
ign-lint equivalent none

Checks the literal message types of script calls against the message handlers of the target project (with inheritance):

  • system.perspective.sendMessage(type, payload, scope): component message handlers of the project's views. When handlers of the type exist but none listens on the call's scope (page when not given; session, page or view as a literal), that is reported too.
  • system.util.sendMessage(project, handler, payload, scope): gateway, Perspective session and Vision client message handlers of project (a literal naming a project of the workspace, or system.util.getProjectName()); a literal scope (G, S, C and combinations) limits the handler kinds that count.
  • system.util.sendRequest / sendRequestAsync: gateway message handlers of project.

Types and projects that are not literals, projects outside the workspace and projects whose handlers may come from a parent outside the workspace are not checked. In an inheritable project a handler defined by any project inheriting from it counts.

A message nobody handles is silently dropped (sendRequest fails with an error). A missing handler is usually a typo in the type or a handler that was renamed.

system.perspective.sendMessage('refreshTabel', scope='session')

Use instead (the handler listens for refreshTable with session scope):

system.perspective.sendMessage('refreshTable', scope='session')

Generated from the rule metadata by iglint generate-docs; iglint rule REF006 prints the same page in the terminal. Source: docs/rules/REF006.md.