Hello Peter,

This is a good question. The actual behavior you are encountering is because 
the process will die after the execution of the code.

Thanks to the worker it is now possible to use a worker to display dialog with 
the * parameter. A worker never die until you kill it with KILL WORKER.

This pattern will allow you to open a new dialog in a worker process called 
“main_windows”.

C_BOOLEAN($1)

If (Count parameters=0)
        CALL WORKER("main_windows";Current method name;True)
Else 

        $ref_win:=Open form window("myDialog";Plain form window)
        DIALOG("myDialog";*)

End if 

Hope it helps.

Best Regards,

Gabriel Inzirillo
— 
4D Developer
AJAR S.A.
—
https://ch-fr.4d.com/ <https://ch-fr.4d.com/>
twitter: ajar_info
Tél : +41 (0)32 3422684

> On 25 Jun 2019, at 15:45, Peter Bozek via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I maybe already asked this question, but anyway I am still a bit confused:
> 
> I wanted to use DIALOG with * as an additional parameter, but have problem
> to make it work. I have app that display several info windows - like
> palettes, progress messages, communication statuses etc.Currently, I often
> need 2 processes for each task: one does the work as background task,
> another display it status / progress.  So instead of running a separate
> process for each window, why not to use one process that will display
> whatever windows application wants to display? Or display status from
> inside background process that do communication or lengthy task.
> 
> My original idea was to call
> 
> OPEN FORM WINDOW
> DIALOG(;*)
> PAUSE PROCESS
> 
> but that does not work, as the process execution is "standing" at PAUSE
> PROCESS and no code is executed (and CALL FORM is either not executed or
> window is not redrawn.)
> 
> When I remove PAUSE PROCESS, process ends and DIALOG window is closed.
> 
> According to documentation, it would work of I do
> OPEN FORM WINDOW
> DIALOG(;*)
> DIALOG()
> 
> but that is quite ugly, and would cause some problems, as I want the
> process that calls DIALOG(;*) periodically evaluate which windows are open
> and close itself if none.
> 
> Another possibility is just to open window and call DIALOG(), then call
> DIALOG(;*) from inside the form method of the first DIALOG() form. That
> would (probably) work, form can use On timer event to check what is open,
> open additional dialogs etc. but I do not like the idea either.
> 
> Is there a way how to use DIALOG(;*)  from a process that does not have any
> other window open?
> 
> Regards,
> 
> -- 
> 
> 
> Peter Bozek
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **********************************************************************

**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to