imagej2
imagej2 copied to clipboard
Bug in Macro editor
I raised the bug here and it was confirmed by an user : http://forum.imagej.net/t/small-bugs-in-macro-editor/3688
When I write a code :
- The first save generate a file without extension were the last character of the specified file name is spitted
- The language syntax is lost just after the save process, so you have to re-specify the language you were writing your code to do a new save to get the correct filename with the correct extension.
I'm using windows OS.
Thanks for you help,
Salim
@salimkanoun Are you using an up-to-date Fiji from https://fiji.sc/#download ? Could you please describe the exact steps you follow—which commands and menu items you run?
I used to observe this last character truncation problem too, but I cannot reproduce now with an up-to-date Fiji.
Hi Curtis,
Yes i'm up to date,
here is the sequence,
Plugin => New => Macro
type print("hello world");
File => Save "Macro" as file name
The saved file is "Macr.txt" and do no have the ijm extension (while Ij1Macro type is selected by default in language)
after the save language became "None" and so you have to select "Ij1Macro" and save it again and finally you get the ijm file.
It also happens that drag and drop a proper ijm file, the macro editor open but ask to select the language (ijm file extension should be clear enough)
Best regards,
Salim
2017-05-09 19:27 GMT+02:00 Curtis Rueden [email protected]:
Are you using an up-to-date Fiji from https://fiji.sc/#download ? Could you please describe the exact steps you follow—which commands and menu items you run?
I used to observe this last character truncation problem too, but I cannot reproduce now with an up-to-date Fiji.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/imagej/imagej/issues/157#issuecomment-300240692, or mute the thread https://github.com/notifications/unsubscribe-auth/AYD5_pTUMWu6URnt6O0d6NnkCs-Kht_Uks5r4KHogaJpZM4LoaKk .
@salimkanoun Great, thanks! I was trying to reproduce with the Java language type. But it seems this bug might be specific to the ImageJ1 macro language? I will dig in now for a few minutes.
The saved file is "Macr.txt" and do no have the ijm extension (while Ij1Macro type is selected by default in language)
@salimkanoun I made a candidate bug-fix. Could you please download the new imagej-legacy-0.23.7-SNAPSHOT.jar
, place it in your ImageJ installation's jars/
folder, and delete the old jars/imagej-legacy-0.23.5.jar
? Then spin up ImageJ again and see whether the problem still happens for you.
It also happens that drag and drop a proper ijm file, the macro editor open but ask to select the language (ijm file extension should be clear enough)
I cannot reproduce this problem. Does it still happen after updating to the new imagej-legacy
?
Dear Curtis,
I download and used your new legacy
At starting the script editor the default filename is now "Macro.ijm.ijm" (double extension) When I save it it save "Macro.ijm.ijm.ijm" (triple extension) and the script editor don't see the saved file (the asterix stays on the macro name). When I hit save again, the macro name update itself to triple extension (Macro.ijm.ijm) and the asterix is removed (Macro editor find itself saved).
For the drag and drop, it will be hard to reproduce, since it happens on my colleague's computer, this one is much harder to reproduce.
Just to say i'm on windows 7 but I also seen similar trouble on macro editor filename in linux.
You didn't reproduce that bug ? It is highly reproducible for me.
Best regards,
Salim
2017-05-09 21:51 GMT+02:00 Curtis Rueden [email protected]:
The saved file is "Macr.txt" and do no have the ijm extension (while Ij1Macro type is selected by default in language)
@salimkanoun https://github.com/salimkanoun Could you please download the new imagej-legacy-0.23.7-SNAPSHOT.jar http://maven.imagej.net/service/local/artifact/maven/redirect?r=snapshots&g=net.imagej&a=imagej-legacy&v=0.23.7-SNAPSHOT&e=jar, place it in your ImageJ installation's jars/ folder, and delete the old jars/imagej-legacy-0.23.5.jar? Then spin up ImageJ again and see whether the problem still happens for you.
It also happens that drag and drop a proper ijm file, the macro editor open but ask to select the language (ijm file extension should be clear enough)
I cannot reproduce this problem. Does it still happen after updating to the new imagej-legacy?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/imagej/imagej/issues/157#issuecomment-300281857, or mute the thread https://github.com/notifications/unsubscribe-auth/AYD5_mGD3zBkyw2L-ZEN2-VjtlHZcQ_iks5r4MPFgaJpZM4LoaKk .
At starting the script editor the default filename is now "Macro.ijm.ijm" (double extension)
Sorry to hear that. 😞
You didn't reproduce that bug ? It is highly reproducible for me.
Nope, but I'm running macOS 10.12.
On your Windows system, does it matter whether Use JFileChooser to open/save is checked in Edit > Options > Input/Output...?
To debug this further, I will need to spin up a Windows VM and do a debugging session in Eclipse there... no time right now. Maybe I'll be able to come back to it later.
Dear curtis,
I checked on Linux and I got the exact same bug (Macr.txt). Unfortunatly I don't have access to a MacOS device Activating the jfilechooser don't solve it. I got the additional filechooser window but the bug stay the same.
Best regards,
Salim
2017-05-09 22:19 GMT+02:00 Curtis Rueden [email protected]:
You didn't reproduce that bug ? It is highly reproducible for me.
Nope, but I'm running macOS 10.12.
On your Windows system, does it matter whether Use JFileChooser to open/save is checked in Edit > Options > Input/Output...?
To debug this further, I will need to spin up a Windows VM and do a debugging session in Eclipse there... no time right now. Maybe I'll be able to come back to it later.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/imagej/imagej/issues/157#issuecomment-300289181, or mute the thread https://github.com/notifications/unsubscribe-auth/AYD5_om4RaHR93tDB_Q07NPNy_dFV4nbks5r4MpjgaJpZM4LoaKk .