"app.stringIDToTypeID is not a function" error

Discussion of the xtools Toolkit

Moderators: Tom, Kukurykus

fotog@fitzfoto
Posts: 3
Joined: Wed May 27, 2020 5:25 pm

"app.stringIDToTypeID is not a function" error

Post by fotog@fitzfoto »

I am running xtools v2.3 in Extendscript Toolkit CC 4.0.0.1 (ExtendScript 4.5.5 ScriptUI 6.2.2) for PS 2020 21.1.3 under Win10.

I have two issues:

1) The install process does not amend the directories in the programmes in the \xapps directory. It appears to run OK except for not creating the .atn file. There are no error reports in the log file.

2) In all programs (standalone in the \apps directory and those in the \xapps directory) where the function is included, app.stringIDToTypeID throws a "is not a function" error, e.g., from ActionFileBrowser.jsx:

Code: Select all


PSString = function PSString() {};
PSConstants.add(PSString, "String");
PSString._add = function(name, sym) {
  if (!name) { throw "Internal error PSString._add()"; }
  if (!sym) sym = name;
  var kind = this;
  kind[name] = app.stringIDToTypeID(sym);    <<<<< THIS ERRORS
  kind._reverseName[kind[name]] = sym;
  kind._reverseSym[kind[name]] = sym;

  if (!kind[sym]) {
    PSString._add(sym);
  }
};

I did not experience this when using xtools last year.

I have tried v2.2 (which I was using last year) with the same result.

If anyone has any ideas, I'd much appreciate hearing them, as I have a large action to edit and one to turn into a script.

Many thx.
User avatar
Kukurykus
Posts: 528
Joined: Mon Jul 25, 2016 12:36 pm

Re: "app.stringIDToTypeID is not a function" error

Post by Kukurykus »

What specific action you do in Photoshop to get an error?
fotog@fitzfoto
Posts: 3
Joined: Wed May 27, 2020 5:25 pm

Re: "app.stringIDToTypeID is not a function" error

Post by fotog@fitzfoto »

Thank you for reading and replying.

As I said, the program is ActionFileBrowser.jsx being run from the ExtendScript Toolkit (with PS 2020 open).
fotog@fitzfoto
Posts: 3
Joined: Wed May 27, 2020 5:25 pm

Re: "app.stringIDToTypeID is not a function" error

Post by fotog@fitzfoto »

Apologies. I just noticed that '#target photoshop' was missing. It runs OK now.
User avatar
Kukurykus
Posts: 528
Joined: Mon Jul 25, 2016 12:36 pm

Re: "app.stringIDToTypeID is not a function" error

Post by Kukurykus »

I don't use xtools, but I could check what is wrong with item of action that you get error with, comparing it to older releases, as sometimes newer can't handle older commands. But if you say it all happened because you forgot to target Photoshop I understand you don't need my help now ;)
User avatar
txuku
Posts: 136
Joined: Thu Jan 01, 1970 12:00 am

Re: "app.stringIDToTypeID is not a function" error

Post by txuku »

Bonjour

I already used xtools - happily by placing this at the top of the code:

Code: Select all

//@includepath "/c/Program Files/Adobe/xtools"
//@include "xlib/stdlib.js"