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

Home » Public Forums » archive » running an application from the IDL virtual machine
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: running an application from the IDL virtual machine [message #92336 is a reply to message #92335] Fri, 20 November 2015 02:14 Go to previous messageGo to previous message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
On Friday, November 20, 2015 at 10:41:53 AM UTC+1, marka...@gmail.com wrote:
> On Friday, November 20, 2015 at 1:52:20 AM UTC+1, Jim P wrote:
>
>> You will probably want your main widget event loop to be blocking if that's all your object is responsible for.
>
> I don't understand what you mean here. Do you mean that the object initialization should never finish, and that the variable foo in the above example should not be returned, until the application closes?
>
> The application itself is a graphics window. It can spawn further instances of itself if it needs to create new windows. The object initialization needs to finish smoothly, in order for things like that to work.

Hi,
the way I do this is to make an executable of a pro that calls the object.
This is how it looks like:

function myObj::init
;make your widget here or elsewhere within the object
;no need to block the widget
self.wBase = widget_base()
self.wlabel = widget_label(self.wBase, value='show something')
widget_control, self.wBase, /realize
xmanager, 'myObjWid', self.wBase, /no_block
print, 'wid obj initialized'
return,1
end

pro myObj__define
void ={myObj, wBase:0l, wLabel:0l}
end

pro runMyObj
obj = obj_new('myObj')
print, 'obj called, exit pro. Obj lives on.'
end

This does the trick for me.
Is this what you're looking for?

Cheers,
Helder
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Transparent overlay in postscript cgimage
Next Topic: IDL Online Documentation for Color Tables

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

Current Time: Wed Oct 08 13:59:11 PDT 2025

Total time taken to generate the page: 0.00252 seconds