Skip to main content
dublove
Legend
Jun 23, 2025 9:10 AM UTC
Answered

The target of update() is supposed to be the image object... Dang, I wonder who's my target?

One minute it says it's not preceded by an object, the next it says it's not a function.
Sometimes I really don't know what I'm getting, mostly guessing ......

 

    function reLink() {
        link.reinitLink(encodeURI(lst[ppJ]));
        link.update();
        app.activeDocument.links.everyItem().update();
    }

 

I have defined the Link, who is the subject of my update()?

var link = selectedFrame.images[0].itemLink;

 

m1b
m1bCorrect answer
Community Expert
Jun 23, 2025 9:27 AM UTC

Hi @dublove the subject of update is the Link object. So...

var link = selectedFrame.images[0].itemLink;

if (LinkStatus.LINK_OUT_OF_DATE === link.status)
    link.update();

3 replies

m1b
Community Expert
m1bCommunity ExpertCorrect answer
Community Expert
Jun 23, 2025 9:27 AM UTC

Hi @dublove the subject of update is the Link object. So...

var link = selectedFrame.images[0].itemLink;

if (LinkStatus.LINK_OUT_OF_DATE === link.status)
    link.update();
Translate
dublove
dubloveAuthor
Legend
Jun 23, 2025 11:35 AM UTC

Victory.

Hi m1b.
Thankfully, this is it.

Translate