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

We sincerely appreciate your technical support.

I verified that it works using "rootthis".

Embedded Wizard Website | Privacy Policy | Imprint