416 views
in GUI Development by
i want to use PresentDialog function on DeviceClass Method

 

I want to enable/disable( PresentDialog /DismissDialog) another dialog in DeviceClass.

1 Answer

0 votes
by
 
Best answer

Hello TnseoRnr,

PresentDialog() can be invoked in context of a GUI component (a class descending from Core::Group) only. In most cases it is invoked in context of the Application component (a class descending from Core::Root also called 'root object'). Since Device Class is not descending from Core::Group it does not expose the methods PresentDialog(), DismissDialog(), etc.

If you are working with version >= 12, use rootthis in the implementation of the Device Class to access the root object (the unique instance of the Application component). Then you can invoke PresentDialog() in context of this root object.

If you are working with version <= 11, you will need to follow other approach. In this approach Device Class has to trigger a System Event whenever it wants to present or dismiss a dialog. In the Application component use a System Event Handler to react to the event and in response to it present/dismiss a dialog.

Best regards

Paul Banach

by
We sincerely appreciate your technical support.

I verified that it works using "rootthis".

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

...