PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV Mobile 2024 → How to wait for OpenChild() window to close?
How to wait for OpenChild() window to close?
Débuté par Indic Software, 28 sep. 2014 16:43 - 3 réponses
Posté le 28 septembre 2014 - 16:43
In an app that I am developing I want to show a window so for this I use OpenChild().

But the code after the line OpenChild() gets executed immediately.

What I want to do is show a Window and wait for the window to close before executing the code after the line OpenChild().

How to achieve this?
Posté le 29 septembre 2014 - 11:47
Hi

you'll have to check the status of the child window with winstatus, and
loop for as long as it is open. There is no modal window in android

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

NEW: WXReplication, your open source replication system is available on
my web site!!!
WXShowroom.com: Show your projects!
More information on http://www.fabriceharari.com


On 9/28/2014 8:43 AM, Indic Software wrote:
In an app that I am developing I want to show a window so for this I use
OpenChild().

But the code after the line OpenChild() gets executed immediately.

What I want to do is show a Window and wait for the window to close
before executing the code after the line OpenChild().

How to achieve this?
Posté le 01 octobre 2014 - 13:13
Mr Harari,

Thanks.

I will check out <strong>winstatus</strong> and its usages.
Membre enregistré
309 messages
Popularité : +31 (37 votes)
Posté le 07 novembre 2014 - 11:41
Hello
In such situations you should set code in the 'Closing process Of a Child Window' event of the parent window

- remove all code executing after the OpenChild() and move it to the 'Closing process Of a Child Window' Event of the parent window (see below)

On closing the child window, windev automatically fires the 'Closing process Of a Child Window' Event,of the parent window

So :

In the 'Closing process Of a Child Window' Event,of the parent window : test if the Just closed child window is the one you expect and perform the action :

if myChildWindow..name ="mychildwindowName" then
//The process to be executed after child window is closed ....
end

BR
Samir