This question is answered.


Permlink Replies: 16 - Pages: 2 [ 1 2 | Next ] - Last Post: 2 Jan 26, 11:14 Last Post By: RobM Threads: [ Previous | Next ]
MarkusD

Posts: 823
Registered: 13-Apr-2006
Error in "Apply text in files to comments"
Posted: 23 Dec 25, 14:58
 
  Click to reply to this thread Reply
Hi Rob,

I'm using JA 39b1 and I'm running into the following error:
org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'false' with class 'java.lang.Boolean' to class 'javax.swing.JCheckBox' in textsToComments.groovy


with the "textsToComments.groovy" tool
https://jalbum.net/forum/thread.jspa?threadID=57962&tstart=0

Any ideas what ist wrong here?

Thanks in advance.

Edited by: MarkusD on 23 Dec 2025, 15:01
JeffTucker

Posts: 8,197
Registered: 31-Jan-2006
Re: Error in "Apply text in files to comments"
Posted: 23 Dec 25, 15:00   in response to: MarkusD in response to: MarkusD
 
  Click to reply to this thread Reply
(Moved to the Tools forum section.)
RobM

Posts: 3,948
Registered: 4-Aug-2006
Re: Error in "Apply text in files to comments"
Posted: 23 Dec 25, 20:29   in response to: MarkusD in response to: MarkusD
Correct
  Click to reply to this thread Reply
MarkusD wrote:
Hi Rob,

I'm using JA 39b1 and I'm running into the following error:

org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'false' with class 'java.lang.Boolean' to class 'javax.swing.JCheckBox' in textsToComments.groovy

with the "textsToComments.groovy" tool
https://jalbum.net/forum/thread.jspa?threadID=57962&tstart=0

Any ideas what ist wrong here?

It still works with jAlbum 38 so my guess is a change in Groovy (gone from 4 to 5) being more strict on variable name usage. The attached fixes the problem by changing the name of the variables taken from the GUI panel.
MarkusD

Posts: 823
Registered: 13-Apr-2006
Re: Error in "Apply text in files to comments"
Posted: 23 Dec 25, 22:16   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Thanks Rob! It works now without errors. I'll keep an eye on it with more of my other projects.
RobM

Posts: 3,948
Registered: 4-Aug-2006
Re: Error in "Apply text in files to comments"
Posted: 23 Dec 25, 22:55   in response to: MarkusD in response to: MarkusD
 
  Click to reply to this thread Reply
MarkusD wrote:
Thanks Rob! It works now without errors. I'll keep an eye on it with more of my other projects.
It should work exactly as before, but I expect many of my other tools that have a GUI will need updating too - as and when I get a request.
MarkusD

Posts: 823
Registered: 13-Apr-2006
Re: Error in "Apply text in files to comments"
Posted: 29 Dec 25, 09:38   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
MarkusD wrote:
Thanks Rob! It works now without errors. I'll keep an eye on it with more of my other projects.
It should work exactly as before, but I expect many of my other tools that have a GUI will need updating too - as and when I get a request.
Hi Rob, today I used the tool and found out that it doensn't do what it should. There is no error message, but it also don't process files it should.

Here is the log file:
https://www.markus-drueck.de/JA/log-file-2025-12-29.txt

My script is very old and I couldn't figure out what is wrong.
https://www.markus-drueck.de/JA/textsToComments.groovy

TIA, Markus
RobM

Posts: 3,948
Registered: 4-Aug-2006
Re: Error in "Apply text in files to comments"
Posted: 29 Dec 25, 10:27   in response to: MarkusD in response to: MarkusD
 
  Click to reply to this thread Reply
If you used the tool version that you linked to, that is the old version. Try the new version.

Also, change the logging level back to warning, there is far too much information than needed for debugging, in fact it just gets in the way.
MarkusD

Posts: 823
Registered: 13-Apr-2006
Re: Error in "Apply text in files to comments"
Posted: 29 Dec 25, 10:30   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
RobM wrote:
If you used the tool version that you linked to, that is the old version. Try the new version.
The log file is from the new version. :-)

I only linked to the old file as a reference.
RobM

Posts: 3,948
Registered: 4-Aug-2006
Re: Error in "Apply text in files to comments"
Posted: 29 Dec 25, 10:38   in response to: MarkusD in response to: MarkusD
 
  Click to reply to this thread Reply
MarkusD wrote:
RobM wrote:
If you used the tool version that you linked to, that is the old version. Try the new version.
The log file is from the new version. :-)

I only linked to the old file as a reference.

In that case, since the tool completed can you tell me what didn’t work?
MarkusD

Posts: 823
Registered: 13-Apr-2006
Re: Error in "Apply text in files to comments"
Posted: 29 Dec 25, 10:56   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Now I tried your newest version again, and at the end jAlbum freezes, I have to shut it down with the Windows Task Manager. I remember that I had to comment out some of your code so it didn't crash.
MarkusD

Posts: 823
Registered: 13-Apr-2006
Re: Error in "Apply text in files to comments"
Posted: 29 Dec 25, 11:18   in response to: MarkusD in response to: MarkusD
 
  Click to reply to this thread Reply
RobM

Posts: 3,948
Registered: 4-Aug-2006
Re: Error in "Apply text in files to comments"
Posted: 29 Dec 25, 11:53   in response to: MarkusD in response to: MarkusD
 
  Click to reply to this thread Reply
Will have a look tonight, out for the day.
MarkusD

Posts: 823
Registered: 13-Apr-2006
Re: Error in "Apply text in files to comments"
Posted: 29 Dec 25, 11:55   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Thx!
RobM

Posts: 3,948
Registered: 4-Aug-2006
Re: Error in "Apply text in files to comments"
Posted: 29 Dec 25, 18:31   in response to: MarkusD in response to: MarkusD
 
  Click to reply to this thread Reply
The video has text that is too small and too low contrast for my old eyes to read. I assume that there is a folder for webams.... as it being a level below what is shown.

I tried the tool with a set of HTML files on a folder, a sub folder and a sub sub folder. The tool ran as expected, updating folders and sub folders below the starting point as shown in the tool's path field.

For me to do anything I need a small project that doesn't work for you.
MarkusD

Posts: 823
Registered: 13-Apr-2006
Re: Error in "Apply text in files to comments"
Posted: 30 Dec 25, 08:33   in response to: RobM in response to: RobM
 
  Click to reply to this thread Reply
Your new script works for a situation with only one folder level. But it does not with more folder levels, that is what I found out. I try to make a small test project.
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums