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

Home » Public Forums » archive » Re: Problem with save and VM
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Problem with save and VM [message #48592] Fri, 05 May 2006 08:51 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
MichaelT writes:

> I read the pages on modal/blocking widgets but it did not quite help me
> and I don't know if that applies to my problem.
>
> So, here is a very simple program which has the same problem as the
> real one:
> If I omit the three lines after realizing, the program works fine in
> VM. I hope that helps you helping me :-)

Ah, well. Make the XMANAGER call the LAST one in your program
and you will be fine. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Problem with save and VM [message #48593 is a reply to message #48592] Fri, 05 May 2006 08:35 Go to previous messageGo to next message
MichaelT is currently offline  MichaelT
Messages: 52
Registered: May 2006
Member
I read the pages on modal/blocking widgets but it did not quite help me
and I don't know if that applies to my problem.

So, here is a very simple program which has the same problem as the
real one:

PRO TEST, GROUP = GROUP

BASIS = WIDGET_BASE(XSIZE = 400, YSIZE = 300, /COLUMN)

INFO = {TYPE: 'LOAD'}
B_LOAD = WIDGET_DRAW(BASIS, XSIZE = 24, YSIZE = 24,
/BUTTON_EVENTS, UVALUE = INFO)

XMANAGER, 'TEST', BASIS, GROUP_LEADER = GROUP, /NO_BLOCK
WIDGET_CONTROL, BASIS, /REALIZE

WIDGET_CONTROL, B_LOAD, GET_VALUE = WID
WSET, WID
PLOTS, [0, 1], [0, 1], /NORMAL

END


PRO TEST_EVENT, EV

WIDGET_CONTROL, EV.ID, GET_UVALUE = INFO

CASE INFO.TYPE OF
'LOAD': BEGIN
END
ENDCASE

END

If I omit the three lines after realizing, the program works fine in
VM. I hope that helps you helping me :-)

Michael
Re: Problem with save and VM [message #48602 is a reply to message #48593] Thu, 04 May 2006 10:10 Go to previous messageGo to next message
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
On Wed, 03 May 2006 19:06:46 -0600, David Fanning wrote:

> JD Smith writes:
>
>> Didn't that problem get fixed in 6.1?
>
> Not as far as I know. :-)
>
> Cheers,
>
> David

I found this in the 6.1 release notes:

Because XMANAGER did not honor the NO_BLOCK keyword in previous
releases, widget applications that worked properly (that is, not
blocking) when run in a licensed full version of IDL behaved
differently when run in Runtime or Virtual Machine mode. This
difference in behavior has been removed; widget applications should
behave identically (with regard to blocking behavior) in all IDL
licensing modes

JD
Re: Problem with save and VM [message #48617 is a reply to message #48602] Wed, 03 May 2006 18:06 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
JD Smith writes:

> Didn't that problem get fixed in 6.1?

Not as far as I know. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Problem with save and VM [message #48618 is a reply to message #48617] Wed, 03 May 2006 18:05 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
MichaelT writes:

> Thanks for your quick answer, David. As I am not an IDL expert I am not
> quite sure what that means, though :-/

Well, this is probably something else, then. :-)

> In my program I try to use the draw widgets immediately after realizing
> the GUI (main program). That is the part that is obviously the problem,
> because I don't get that error message after ommiting these lines.
> How can I circumvent this? I already tried to put all this into another
> sub-routine, but without success.

You might have to start with a MUCH simpler program and
show it to us.

> ps.: Your great IDL page has given me valuable IDL programming tips
> countless times, thanks for that :-)

I'd read the articles on widget programming again, especially the
one of the difference between blocking and modal widgets, and maybe
the article on modal dialog widgets. But I'm thrilled that
you are reading. Thanks. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Problem with save and VM [message #48623 is a reply to message #48618] Wed, 03 May 2006 14:18 Go to previous messageGo to next message
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
On Wed, 03 May 2006 07:07:40 -0600, David Fanning wrote:

> The most common reason widget programs fail in the VM is that
> they rely on command line blocking instead of being written
> as modal widgets. Thus, programs run through their blocks
> and try to act with information that hasn't been collected
> yet.

Didn't that problem get fixed in 6.1?
Re: Problem with save and VM [message #48630 is a reply to message #48623] Wed, 03 May 2006 07:22 Go to previous messageGo to next message
MichaelT is currently offline  MichaelT
Messages: 52
Registered: May 2006
Member
Thanks for your quick answer, David. As I am not an IDL expert I am not
quite sure what that means, though :-/
In my program I try to use the draw widgets immediately after realizing
the GUI (main program). That is the part that is obviously the problem,
because I don't get that error message after ommiting these lines.
How can I circumvent this? I already tried to put all this into another
sub-routine, but without success.

Thanks, Michael

ps.: Your great IDL page has given me valuable IDL programming tips
countless times, thanks for that :-)
Re: Problem with save and VM [message #48631 is a reply to message #48630] Wed, 03 May 2006 06:07 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
MichaelT writes:

> I have come across a problem that I am not able to solve myself.
>
> I have programmed a GUI using widgets which runs fine under IDL 6.0. No
> problems. Then I exported it to a .sav file using "save, 'file.sav',
> /routines" after compiling and "resolve all", to distribute it to some
> other people.
> I tested the .sav and I always get the following error message:
> "The following error was encountered: WIDGET_CONTROL: Invalid widget
> identifier: 3.
>
> So obviously the program is not able to identify the widget that I try
> to use for drawing some initial figure. The same (with a different
> identifier) occurs with all other widgets.
>
> All that worked fine in a previous, less developed version of the
> program.
>
> What is going on? Can anybody help?

The most common reason widget programs fail in the VM is that
they rely on command line blocking instead of being written
as modal widgets. Thus, programs run through their blocks
and try to act with information that hasn't been collected
yet.

It is hard to tell if this is the problem here, but this
is where I would look first.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: Problem with save and VM [message #48691 is a reply to message #48592] Fri, 05 May 2006 09:00 Go to previous message
MichaelT is currently offline  MichaelT
Messages: 52
Registered: May 2006
Member
Oh, is that all... :-))

Wouldn't have thought that could be the problem. I had never read the
xmanager command had to be the last one...

Many thanks David!
Michael
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL eps outpt converted to png for MS PowerPoint
Next Topic: Problem with save and VM

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

Current Time: Fri Oct 10 13:39:25 PDT 2025

Total time taken to generate the page: 0.48203 seconds