# Creating a component event

**URL:** <https://forum.inductiveautomation.com/t/creating-a-component-event/30403>\
**Category:** Module Development\
**Tags:** perspective\
**Created:** [December 3, 2019, 1:28pm UTC](https://forum.inductiveautomation.com/t/creating-a-component-event/30403 "2019-12-03T13:28:27Z")\
**Posts on this page:** 1\
**Showing post:** 16

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [April 6, 2020, 3:11pm UTC](https://forum.inductiveautomation.com/t/creating-a-component-event/30403/16 "2020-04-06T15:11:10Z")

</div>

For posterity; posting the solution to the issue with the script editor:

> As I vaguely alluded to, you're not able to (unfortunately) get the automatic parsing of schemas out of a single file that we use internally - which means that the _main_ issue with your module at present is the single event object schema being supplied for all four component event descriptors. So, to start off, you'll want to move them into separate files, and also flatten them - you don't need separate `name`, `description` (we'll get back to the description in a minute), or `schema` keys - just put everything in the `schema` key on the top level:
> 
> ![2020-01-07-104425_931x426_scrot](https://us1.discourse-cdn.com/inductiveautomation/original/2X/9/98ca3acb0cbeb5e5b3304f96fc52eb86a8414c78.png)  
> Then you'll want to individually create each `ComponentEventDescriptor` in `ATCalendar.java` - I made a simple wrapper class to fetch the individual schema resources more easily:  
> ![2020-01-07-104559_1058x817_scrot](https://us1.discourse-cdn.com/inductiveautomation/original/2X/8/8cde14322f136d37ec205555a4966c18bd0be3e8.png)  
> Now, as for the description, which you can't specify now? If you bump your SDK version from 8.0.3 to 8.0.5+, you'll be able to specify a 3-arg constructor for ComponentEventDescriptor - `String name, String desc, JsonSchema schema` - and that description will be automatically added in the rendered docstring.

---

_[View the full topic](https://forum.inductiveautomation.com/t/creating-a-component-event/30403)._
