Weird issue caused by sequential order of functions?

Dear all,

I am encountering a strange issue:

I am processing an image (smoothing operation). The dialog includes a checkbox to let the user decide whether the smoothed result should be displayed after the successful processing.
The smoothing is followed by a progress bar indicating the progress of the image-processing.
After the smoothing operation, the result should be displayed according to the state of the checkbox.
The attached picture shows the problem: When the checkbox tells igor to display the result, the progress bar does not count till 100 % (a small portion of the bar is missing, see picture).
The displayed graph with the result, however, has an added box in the left upper corner, stating "100". I have no clue why this happens, but it might be due to the displaying directly following the image process?
Any help or input would be appreciated :)

Best regards,

Peter
No ideas?

I just wanted to find out whether this is something I got wrong or a bug that I cannot help.

Thanks again :)
You should post also the procedure code used to display this (custom) panel with the checkbox and progress bar, maybe in an IGOR experiment file.
It will be easier to debug your code this way.

--
Gregor Kladnik
ALOISA beamline @ Elettra synchrotron
Since you didn't post your code we're all just guessing, but my guess is that you need to use the /W= flag with the ValDisplay or SetVariable control you're displaying the % completion in. If you don't use the /W flag, then the target window it the top panel/graph, and if the top window happens to change when the processing is completed, that would explain why the control ends up on the wrong window. I recommend that you always use the /W flag with every control related call you make since it's pretty common for the order of windows to be different when you run your code compared to what you expect.
Thanks for the hint, I think this might indeed be the reason for the strange behaviour. However, when I try to set the /W flag for the ValDisplay, the debugger tells me "unknown flag"...

Also, in this snippet: http://www.igorexchange.com/node/619
there is no such flag - where do I have to put the /W to make it work?
PeterR wrote:
Thanks for the hint, I think this might indeed be the reason for the strange behaviour. However, when I try to set the /W flag for the ValDisplay, the debugger tells me "unknown flag"...

Also, in this snippet: http://www.igorexchange.com/node/619
there is no such flag - where do I have to put the /W to make it work?

For controls you use the win keyword. As in

ValDisplay myValDisplay, win=Panel0, ...

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
It worked! :)

By adding the "win = PanelName" to every instance of the ValDisplay.

Thanks for the help!

Regards,

Peter
PeterR wrote:
Thanks for the hint, I think this might indeed be the reason for the strange behaviour. However, when I try to set the /W flag for the ValDisplay, the debugger tells me "unknown flag"...

Also, in this snippet: http://www.igorexchange.com/node/619
there is no such flag - where do I have to put the /W to make it work?


Sorry, I forgot about our lack of consistency :)

/W is for operations like ModifyGraph, while the win= keyword is for controls, as John mentioned.