Skip to main content
Known Participant
August 24, 2005
Question

thumb.lastModifiedDate is wrong data type

  • August 24, 2005
  • 4 replies
  • 490 views
On page 125 of the Bridge JavaScript Reference, it lists the lastModifiedDate property for the thumbnail object. It says that it should be a Date data type.

When I access app.document.visibleThumbnails.lastModifiedDate and look at it, I find that this property is a string data type (a bunch of numbers in a string).

If I access app.document.visibleThumbnails.spec.modified, I find that it's a date type.

According to the doc, both are supposed to be Date types. Is the doc wrong? Is this a bug that lastModifiedDate is showing up as a string.

In case you are wondering why I don't just use app.document.visibleThumbnails.spec.modified since it is a proper Date object, I was using that field, but I'm having a problem with that field sometimes returning as "undefined", so that's why I tried to switch to app.document.visibleThumbnails.lastModifiedDate, but it's not the right type. So, I'm temporarily stuck. My code is just trying to determine which thumb has the more recent modification date.

After I finish some more testing, I'll write more about the problem with app.document.visibleThumbnails.spec.modified sometimes showing up as undefined. In a large folder of images, it happens nearly every time, but only once or twice in the folder and not on the same images every time. I'm working on putting this into my test app to report more detail on this problem.

--John
This topic has been closed for replies.

4 replies

Known Participant
August 25, 2005
It's not the same files everytime so it's hard to imagine it has anything to do with the filename. Successive runs on the same large directory (>200 image files) will show the problem everytime, but not always on the same image. When it does happen, it's just normal names of images like DSC_2473.NEF. This doesn't sound like the problem you describe that was found and fixed in 1.02. And, it's something that is a problem in 1.02.

--John
Known Participant
August 25, 2005
John,

What are the file names of the files that are showing up as undefined?

There was a bug, that I thought was fixed in 1.0.2, that would cause the spec property of files to point to a non-existant file, depending on what characters were in the filename. Manually creating the file spec with

file = new File( encodeURI( thumb.path ) );

was the workaround.

Bob
Known Participant
August 25, 2005
I'm using Bridge version 1.02.109.

Any idea why the file modified date property is occasionally undefined?

--John
Known Participant
August 24, 2005
John,

That is a known bug. One of those that no one understands how it fell through the cracks...

Looks like you found the workaround - use the file.

What version of Bridge are you using??

Bob
Adobe WAS Scripting