comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » testing IDL_IDLBridge status
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: testing IDL_IDLBridge status [message #92261 is a reply to message #92254] Fri, 06 November 2015 00:50 Go to previous messageGo to previous message
markb77 is currently offline  markb77
Messages: 217
Registered: July 2006
Senior Member
On Thursday, November 5, 2015 at 6:00:12 PM UTC+1, dmzarro wrote:
> On Thursday, November 5, 2015 at 10:16:17 AM UTC-5, superchromix wrote:
>> Even better: if I use the EXECUTE function with EXIT, it still doesn't work.
>>
>> cmdstr = 'EXIT, STATUS=0'
>> result = EXECUTE(cmdstr)
>>
>> the EXECUTE statement has no effect on IDL when executed from within the cleanup procedure of my application.
>>
>> ???
>
> Hi Mark,
>
> One solution is to check the status in your callback function. The callback function will also have a reference to your bridge object as its third argument :
>
> PRO BridgeCallbackName, Status, Error, Objref [, Userdata]
>
> Depending upon the status value, you can destroy the object from within the callback. For example, for a successful completion (status=2), enter the following line before returning from your callback function:
>
> if status eq 2 then obj_destroy,Objref
>
> Dominic

hi Dominic,

Thanks, but this solution doesn't work. When the application is started on the bridge, using a command similar to:

my_app = obj_new('my_application')

this command executes normally and the bridge status is set to 2 (command completed). However, if you kill the bridge now, you would kill the whole application. What you need to do is wait until the application is closed by the user (it is a GUI application), and only then can you destroy the bridge.

The question is, how do you check if the application is closed? Any call to Execute or Execute, /NOWAIT will get stuck if the application is busy, even though the bridge status indicates 0 or 2.

thoughts?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Dates conversions
Next Topic: memory leak in volume()

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:59:44 PDT 2025

Total time taken to generate the page: 0.00595 seconds