418 views
in GUI Development by
Enabling and disabling the implementation of class Core::Group both caus executing OnSetEnabled, Within OnSetEnabled Enabled is always true, so I can not determine here, whether enabling or disabling was called.

1 Answer

0 votes
by

Hello,

I assume that you are talking about the state of the property Enabled that is shown within the Variables window - correct?

Please note, that the property Enabled is a so called memory-less property. This means, that the real value of this property can only be determined by its onget method. The Varaibles window cannot execute the onget method of the property and thus, cannot display the real value. Please have a look to the section memory-less properties.

The onget method of the property Enabled is implemented as 

return viewState.contains( Core::ViewState[ Enabled ]);

In your code, (e.g. if you place a trace statement) you will get the expected value of Enabled.

Best regards,

Manfred.

by

Hello Manfred,

actually I didn't use the variables window.

I just issued a trace command within the OnSetEnable method of my class, which is iherited from Core::Group.

There is already an OnGetEnabled metho inherited. Obviously this isn't executed. So I overrode the class member by one of those two:

return viewState.contains( Core::ViewState[ Enabled ]);

return super();

This trace command in the OnSetEnable method still returns not the value of Enabled:

trace "MenueVariabel.Enabled Enabled=", Enabled;

Best regards, Roland

by

Hello Roland,

I have just verified the property Enabled and it is working as expected. Can you provide us an example demonstrating the behavior? I would review it.

Best regards

Paul Banach

Embedded Wizard Website | Privacy Policy | Imprint

...