It's been a long time since I've tried doing anything with IUP or Lua, 
but if I remember correctly the mainloop would be paused while executing 
this task? If so, then in your mainloop couldn't you do something like 
this:

if dlg.visible == "NO" then dlg.visible = "YES"

On 10/20/2014 3:04 PM, Milind Gupta wrote:
> Thanks,
> Milind
>
>
> On Mon, Oct 20, 2014 at 12:04 PM, Antonio Scuri
> <[email protected] <mailto:[email protected]>> wrote:
>
>       No, I guess you will have to intercept the Lua error processing to
>     show your dialog.
>
>     Best,
>     Scuri
>
>
>     On Mon, Oct 20, 2014 at 4:19 PM, Milind Gupta
>     <[email protected] <mailto:[email protected]>> wrote:
>
>         I create a dialog and then to do a task in the background I hide
>         it using dlg.visible = "NO". Now the program is executing in the
>         background and once it finishes the task function it will return
>         to the function that made it invisible and the show it again
>         using dlg.visible = "YES".
>         Something Like:
>
>         dlg.visible = "NO"
>         doTask()
>         dlg.visible = "YES"
>
>         I have also re-routed print and io.write to output to a text box
>         on the dlg itself.
>              Now the problem is this: When the program is running in the
>         background (doTask function) and it encounters an error which is
>         not caught using pcall then it would never reach the dlg.visible
>         = "YES" to make the dialog visible but goes back to the IUP
>         Mainloop after writing the error in the dialog text box. So now
>         I have no way of accessing the dialog and I have to kill the
>         process.
>              If I remove dlg.visible="NO" then I see that the error
>         displays the message on the text box and then returns to the
>         main loop and then it continues.
>              So I was wondering if on error the dlg can be made visible
>         automatically.
>
>         Milind
>
>
>
>         On Mon, Oct 20, 2014 at 8:12 AM, Antonio Scuri
>         <[email protected] <mailto:[email protected]>> wrote:
>
>                Hi,
>
>               What do you mean by "the hidden dialog does not get
>             visible"? Did you called IupShow on the dialog an it didn't
>             work?
>
>             Best,
>             Scuri
>
>
>             On Sun, Oct 19, 2014 at 2:33 AM, Milind Gupta
>             <[email protected] <mailto:[email protected]>> wrote:
>
>                 Hi,
>                         I have the following scenario. I have a single
>                 dialog which I hide but I maintain the mainloop to keep
>                 the program active and code runs in the background. But
>                 if an error occurs in the code then the hidden dialog
>                 does not get visible. Is it possible to have the dialog
>                 become visible if some error happens in the code?
>
>                 Thanks,
>                 Milind
>
>
>                 
> ------------------------------------------------------------------------------
>                 Comprehensive Server Monitoring with Site24x7.
>                 Monitor 10 servers for $9/Month.
>                 Get alerted through email, SMS, voice calls or mobile
>                 push notifications.
>                 Take corrective actions from your mobile device.
>                 http://p.sf.net/sfu/Zoho
>                 _______________________________________________
>                 Iup-users mailing list
>                 [email protected]
>                 <mailto:[email protected]>
>                 https://lists.sourceforge.net/lists/listinfo/iup-users
>
>
>
>             
> ------------------------------------------------------------------------------
>             Comprehensive Server Monitoring with Site24x7.
>             Monitor 10 servers for $9/Month.
>             Get alerted through email, SMS, voice calls or mobile push
>             notifications.
>             Take corrective actions from your mobile device.
>             http://p.sf.net/sfu/Zoho
>             _______________________________________________
>             Iup-users mailing list
>             [email protected]
>             <mailto:[email protected]>
>             https://lists.sourceforge.net/lists/listinfo/iup-users
>
>
>
>         
> ------------------------------------------------------------------------------
>         Comprehensive Server Monitoring with Site24x7.
>         Monitor 10 servers for $9/Month.
>         Get alerted through email, SMS, voice calls or mobile push
>         notifications.
>         Take corrective actions from your mobile device.
>         http://p.sf.net/sfu/Zoho
>         _______________________________________________
>         Iup-users mailing list
>         [email protected]
>         <mailto:[email protected]>
>         https://lists.sourceforge.net/lists/listinfo/iup-users
>
>
>
>     
> ------------------------------------------------------------------------------
>     Comprehensive Server Monitoring with Site24x7.
>     Monitor 10 servers for $9/Month.
>     Get alerted through email, SMS, voice calls or mobile push
>     notifications.
>     Take corrective actions from your mobile device.
>     http://p.sf.net/sfu/Zoho
>     _______________________________________________
>     Iup-users mailing list
>     [email protected] <mailto:[email protected]>
>     https://lists.sourceforge.net/lists/listinfo/iup-users
>
>
>
>
> ------------------------------------------------------------------------------
> Comprehensive Server Monitoring with Site24x7.
> Monitor 10 servers for $9/Month.
> Get alerted through email, SMS, voice calls or mobile push notifications.
> Take corrective actions from your mobile device.
> http://p.sf.net/sfu/Zoho
>
>
>
> _______________________________________________
> Iup-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/iup-users
>


------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
Iup-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to