Problem with GUI

Hi all,

I’ve followed Robert Haase’s excellent Fiji course and I’m a bit stuck:

I enter the following code in my IJ1 macro:

#@ int(value=25, min=0, max=100, style="slider") ratio2;
print(ratio2);

I get a slider which I can manipulate to get a value (let’s say 33). If I understand the code properly, I expect the variable “ratio2” to now be defined as 33. But Fiji tells me that “ratio2” is a new undefined value and it cannot print it…

I’ve tried the other commands that begin with #@ and get the same issue: Fiji recognises the command but does not define the variables.

Any idea?

1 Like

Hey @MatthieuV,

happy to hear you enjoy my lecture :slight_smile:

It works if you remove the semicolon be the end of your first line:

#@ int(value=25, min=0, max=100, style="slider") ratio2
print(ratio2);

image

Is this semicolon somewhere on my slides? Let me know, I’m happy to remove it. :slight_smile:

Cheers,
Robert

Aaaah! Thank you! I knew it was a stupid mistake!

1 Like

The error message could have been more helpful :wink:

Actually, the error comes from Fiji’s autocomplete: all lines that begin with #@ automatically end with a semicolon… Who should I contact to get these rectified?

Sincerely,

Matthieu

1 Like

You contacted the right person already - it’s me :smiley:

2 Likes