I use UserEvent and call it in the same UX file, it works 100%
Error: ReferenceError: myEvent is not defined: Name: ReferenceError: myEvent is not defined
Error message: Uncaught ReferenceError: myEvent is not defined
Please share a complete, minimal reproduction that we could copy-paste and run to see the problem, otherwise it’s impossible to help.
ux:Names in its local data context. So if your
myEvent is living somewhere up the tree, you will likely need to pass it in to your “sub ux” as a
ux:Dependency. There’s an article in docs about Dependencies.
As for a complete, somewhat complex example on
UserEvents, see this.