429 views
in Embedded Wizard Studio by
Actually while a view is invisible, the debugger always shows its visible-variable as true.

I am using Embedded Wizard 6.51.

2 Answers

+1 vote
by

The debugger shows only the value stored within the memory associated to a property. The value of the property Visible is however determined dynamically at the runtime by the result of the corresponding on-get method OnGetVisible. When you inspect an object in one of the debugger windows the code of such on-get methods is never executed in order to avoid potential interferences with the debugged application. The debugger limits to show what the memory behind the property does contain. In case of the property Visible it contains the value true.

The current visible state of a view is determined by the flag Visible stored within an internal variable viewState. Inspect the variable viewState when you want to check the current visibility state of a view:

Please note, the values of the properties Enabled, AlphaBlended or Embedded are similarly represented by homonymous flags within the variable viewState.

by
Thank your for your answer!

Now I am able to understand how to handle visability via debugger.

Just one suggestion to this point: Would it be possible to add a "pure Visible = value;" at the end of the OnSetVisible function (Core::Group), to avoid this 'trap'?
0 votes
by

I think in principal it will be helpfull to see the values at the related property in prototyper. Otherwise you may get confused during debugging. So my general proposal is to store the related value within the pure propery for prototyping.

In this case I recommend for the Visible property of Core::Group to add:
onget Visible
  {
    $if $prototyper
    pure Visible = viewState.contains( Core::ViewState[ Visible ]);
    $endif

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

  onset Visible
  {
    if ( value )
      ChangeViewState( Core::ViewState[ Visible ], Core::ViewState[]);
    else
      ChangeViewState( Core::ViewState[], Core::ViewState[ Visible ]);

    $if $prototyper
    pure Visible = value;
    $endif
  }

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...