Audit manual widget initialization code
There's still a noticeable amount of manual widget initialization code in widgets that are initialized by GML, and often this initialization can indeed be moved to GML. All apps should be audited for this, as I've found such code in numerous places.
This issue's task list will be filled out with apps that have been taken a look at, especially if no changes were necessary.
- [ ] ... (none so far)
The rough order of operations for performing an audit is as follows:
- Only check code that uses GML. Other code that should / could use GML is not a concern of this issue, although you are very welcome to introduce more GML into applications.
- There are several kinds of initialization which can't be replaced:
- Model initialization
- Passing references to data objects (which are by definition only created in code)
- Attaching callbacks
- Any constant-valued initializers, even if not yet supported, should be replaced.
- If the initialization would require new support from the GML system, or a new of getter/setter in the widget class, this can be added if it's deemed generally useful. (Especially if the type in question is used for other properties as well.)
- Move initialization into GML where possible.
Semi-related to #20518; if you're working on that it is ideal to immediately do the audit as well and mention that in your PR.
Hi, I would like to contribute to this issue. I just joined the discord server too, but don't see a channel explicitly for contribution-related discourse. Sorry if these things are already addressed in the extensive documentation, I haven't read all of it yet, and am still familiarizing myself with the code base. I am following the steps listed in the contribution guidelines for now, but please let me know if there is something more specific that I should be doing, thank you! :)
@Ajay-26 Welcome! For this issue, asking questions in any of the #ui, #userland or #development channels would all be a good starting point.
Sounds good, thank you! :)