Open yasmanmesa opened 7 years ago
Thanks for reporting.
The best solution to this issue is that DecleX should create the event with all the parameters that has been passed from any method, so that the event can fulfill any interface, an action should be done for each one of those methods, so if you have
@Event
void onSomeEvent(String param1, String param2) {
}
@Event
void onSomeEvent(String param3, String param2) {
}
This would create an event with 3 parameters, and with the actions
$SomeEvent(param1, param2);
$SomeEvent(param3, param2);
If a parameter is passed with the same name and 2 different types, 2 versions of the param will be created, since it is used different actions for each Action, the framework can decide what param is being referenced, so
@Event
void onSomeEvent(String param) {
}
@Event
void onSomeEvent(int param) {
}
This would create in the action param$1, param$2, which will be used depending of what is sent...
If you create events with parameters, and then they are used to reload a model, an error is generated since no parameter is recognized. Suppose we have an event like this:
Then we use this event to reload a model, something like this:
These annotations, @LoadOnEvent and @UpdateOnEvent, construct the event without parameters, although it was previously declared with a parameter. DecleX should choose the most parameters and generate the event.