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
Control's method, SetName(), has very confusing and error-prone behavior.
SetName() accepts two parameters; a string name and a defaulted boolean argument bTooltip that specified additional behavior related to tooltips.
If bTooltip is true, which is the default value, then name is treated as an optionally combined "name\tooltip" string. If the tooltip part exists, it is extracted and set as control's tooltip and name part is what is set as control's name. If the tooltip part is not present or bTooltip is false, name is not extracted and is set as-is but the tooltip is not updated.
GetName() only returns the name part, making copying the raw name with control2->SetName(control1->GetName()) incorrect if the name was set with bTooltip previously set false.
Control's name is used for some unintuitive things, like Window's title and Label's text. It also remains completely unused in some other controls, like Group. It should be refactored in a way that makes it sensible within the right context and not strictly depend on merged "name\tooltip" string specification.
Name property itself might be removed entirely from Control if it is found not needed for anything else.
The text was updated successfully, but these errors were encountered:
Control's method, SetName(), has very confusing and error-prone behavior.
SetName() accepts two parameters; a string
name
and a defaulted boolean argumentbTooltip
that specified additional behavior related to tooltips.If
bTooltip
is true, which is the default value, thenname
is treated as an optionally combined"name\tooltip"
string. If the tooltip part exists, it is extracted and set as control's tooltip and name part is what is set as control's name. If the tooltip part is not present orbTooltip
is false, name is not extracted and is set as-is but the tooltip is not updated.GetName()
only returns the name part, making copying the raw name withcontrol2->SetName(control1->GetName())
incorrect if the name was set withbTooltip
previously set false.Control's name is used for some unintuitive things, like Window's title and Label's text. It also remains completely unused in some other controls, like Group. It should be refactored in a way that makes it sensible within the right context and not strictly depend on merged
"name\tooltip"
string specification.Name property itself might be removed entirely from Control if it is found not needed for anything else.
The text was updated successfully, but these errors were encountered: