365 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 - Archive

Welcome to the Ask Embedded Wizard archive. This community forum served us well for many years, but we've evolved our support approach!

Your resources:

The Embedded Wizard Online Documentation provides comprehensive documentation, tutorials, examples and ready-to-use software packages.

For dedicated assistance, explore our Embedded Wizard Product Support.

You can still browse the valuable discussions from our community history here.

Embedded Wizard Website | Privacy Policy | Imprint

...