-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement ability to augment uiActions in subclass #70
Conversation
I don't know how this would be used by the application developer. Updating the documentation and the automated tests as part of the pull request would give me a much better understanding of the intended use. Thanks. |
This will allow the developer to do this:
|
That breaks backwards compatibility. |
Ok I've added the |
This pull request determines the superclass UI actions at the time the subclass is defined. This is "early binding". Everything (or almost everything) in Maria uses "late binding" for the most dynamic and flexible possible behaviour. The UI actions of the super class may change during the life of the application and what is inherited by the subclass should change dynamically with it. If you look in #64 you can see the code that we want to generate when the
|
This looks very good to me. Please add a superclass and a subclass UI action that have the same key but different values. Then check that the subclass value is the one that is ultimately used by the subclass. I think this will require exactly 3 lines to be added to the change set. |
Modified test to check overwritten uiActions in subclass. Added new test to check subclass of dynamically changed superclass uiActions.
It looks to me like this code is good and ready to pull. How about documentation for |
I don't know why I mentioned documentation for This is is a great addition to Maria. The code is compact, has tests, and documentation. Thank you, Hieu. |
Implement ability to augment uiActions in subclass
Hi Peter,
I've added a check in
EventView.subclass
to see if uiActions object was defined and augment it in the subclass.