You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature overview
Name: Gui core trivial case extension
TL;DR: Allow the trivial case for a gui define to accept a non unique name when no events are used and an option for "provided by arguments" for element fields like name or caption being provided by an argument to the draw function.
Details
After reviewing #195 I found cases of where really short functions were being used for draw functions. These functions were very similar to the trivial case and to avoid repetition the trivial case should be extented to include these use cases. Allowing a non unique name is extremely simple but the provided by argument case is less trivial but still so coommon that it should be included.
Possible methods
Only a single if statement is required to allow non unique names, an "Id" field might be useful to avoid confussing.
For the provided values a constant from the gui module (such as "Gui.provided_argument") can be used as a signal for which fields are provided as arguments. Because of closures no extra data is required to be on the element object but for debug purposes this would be useful. The order in which fields are provided will determine the order in which the arguments should be provided.
The text was updated successfully, but these errors were encountered:
Some work has been done on this: #253 coverted the core module to use tags for events which makes names optional even when event handlers are present. No work has been done to allow for the "provided by argument" case.
Feature overview
Name: Gui core trivial case extension
TL;DR: Allow the trivial case for a gui define to accept a non unique name when no events are used and an option for "provided by arguments" for element fields like name or caption being provided by an argument to the draw function.
Details
After reviewing #195 I found cases of where really short functions were being used for draw functions. These functions were very similar to the trivial case and to avoid repetition the trivial case should be extented to include these use cases. Allowing a non unique name is extremely simple but the provided by argument case is less trivial but still so coommon that it should be included.
Possible methods
Only a single if statement is required to allow non unique names, an "Id" field might be useful to avoid confussing.
For the provided values a constant from the gui module (such as "Gui.provided_argument") can be used as a signal for which fields are provided as arguments. Because of closures no extra data is required to be on the element object but for debug purposes this would be useful. The order in which fields are provided will determine the order in which the arguments should be provided.
The text was updated successfully, but these errors were encountered: