Use of `Data` property
See original GitHub issueDescribe the bug
Just noticed that there are some internal uses within Terminal.Gui
library of the Data
field e.g.
The documentation for this property indicates that we won’t do this:
/// <summary>
/// Gets or sets arbitrary data for the view.
/// </summary>
/// <remarks>This property is not used internally.</remarks>
Within the designer, I use Data
to track the field member name in the source code written out to .Designer.cs. And to store the Design
(editable properties blueprint).
So there is a meaning when Data
has a value (user designed this view) and theres a meaning when it is null
(this view is an artifact of another view e.g. ContentView).
There may be other library users making similar assumptions.
Is it please possible to move the internal uses of this property to a new field or adjust the approach?
Issue Analytics
- State:
- Created 4 months ago
- Comments:5
Top Results From Across the Web
Using data attributes - Learn web development | MDN
data -* attributes allow us to store extra information on standard, semantic HTML elements without other hacks such as non-standard attributes, ...
Read more >HTML data-* Attribute
The data-* attribute is used to store custom data private to the page or application. The data-* attribute gives us the ability to...
Read more >Using the data Property
The following example shows how you can use the data property to specify item data when performing a single push operation (see Add...
Read more >What's "Data Property" in JavaScript?
In JavaScript, a "data property" is a type of object property that has the following attributes (or property descriptors):.
Read more >Data Property Hierarchy
The data property hierarchy view displays the asserted and inferred data property hierarchies. The asserted data property hierarchy is visible by default.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We should add a Unit Test that uses reflection to find every subclass of
View
and test andAssert.Null (view.Data)
after construction and afterIsInitialized = true
.Related: https://github.com/gui-cs/Terminal.Gui/issues/2502
This PR (removing TopLevel completely) will fix one egregious violation of us using Data internally.