Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[e4-dev] Proposal to replace the 'visible' flag


After spending some time with Lars yesterday explaining the difference between the 'toBeRendered' flag and the 'visible' flag (again!) I think that I've come up with a way to eliminate it altogether...

The proposal below is a first cut so I'd appreciate feedback on whether everybody thinks this is a good approach, if the new field name is clear...

Background: The 'visible' flag's intent is to allow the UI to take over the control of some element's widget so that some other part of the UI can use it. It's currently used when a stack is minimized, allowing the ToolControl to show the stack in its 'popup'. if 'visible' == false then the element is removed from the UI presentation in preparation for its use somewhere else in the UI. Unfortunately the name is misleading at best and has caused confusion in just about everybody...

Iin order to support the Perspective story UIElements already have a 'curSharedRef' flag which is how we designate which Placeholder 'owns' the shared part. This seems to be a much clearer way to express the semantic "I own that element's widget'... so I propose:

- Removing the 'visible' flag altogether
- Renaming 'curSharedRef' to something like 'logicalParent' (i.e. the element that 'owns' the referenced element, including its widget)

If 'logicalParent' == null then the element's 'actual' parent owns the control (i.e. it's in the regular UI presentation), if not then it is removed from the regular UI presentation and is expected to be managed by its 'logical' parent.

Onwards,
Eric


Back to the top