Re: WaitForUser problem
Posted by
dscho on
Nov 06, 2008; 9:32am
URL: http://imagej.273.s1.nabble.com/WaitForUser-problem-tp3694321p3694322.html
Hi,
On Wed, 5 Nov 2008, Ben G wrote:
> [...] When I install the macro and run it, macro a) works fine and macro
> b) crashes with a nonsensical error message that expects a ")" in the
> middle of a P=nSlice kind of statement.
>
> After spending a week fighting with this bug (and using the pgms
> separately), I tried again and found the bug. For trouble shooting my code,
> I wrote a simply Pause function shown below.
>
> function P(){waitForUser("Press any key to continue");}
>
> located inside the end of each macro.
Just a guess: you try to assign to the variable "P" after defining a
function of the same name?
I think that is a bug in your macro. Never use the same name for a
function _and_ for a variable.
Hth,
Dscho