131 views
in GUI Development by
var Core::Group dialog = FindCurrentDialog();
        if ( dialog != null )
        dialog.Owner.PresentDialog(mydialog,SlideIndialog,null,null,null,null,null,null,null,false);

 

Here the FindCurrentDialog returns null so i couldn't able to present my dialog.

Could you help us on this issue?

 

Above mentioned code is written inside a slot and that slot is triggered using postsignal from anaother class.

1 Answer

0 votes
by

Hello mvg,

invoke FindCurrentDialog() in the right context. For example, GetRoot().FindCurrentDialog() searches the entire view tree (starting at the root object) for the current dialog. In turn, someComponent.FindCurrentDialog() searches in someComponent and other components existing in its context. Superior components are not taken in account in such case.

In your implementation, FindCurrentDialog() is executed in context of this object. Therefore the search operation is limited to this component and all other components existing in it at this moment. If the dialog has been presented in another context, the method can't find it.

See also Enumerate and search for existing Dialogs and Core::Group.FindCurrentDialog().

I hope it helps you further.

Best regards

Paul Banach

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

...