Author Topic: warning message from PreviewAggregator.js  (Read 1228 times)

Offline rockyraccoon

  • Member
  • *
  • Posts: 63
    • My gallery of astrophotos
warning message from PreviewAggregator.js
« on: 2016 December 10 14:29:33 »
When running PreviewAggregator.js on PixInsight Core 01.08.04.1199 Ripley (x64) in OSX, the following warning message is always presented in the console:

run --execute-mode=auto "/Applications/PixInsight/src/scripts/PreviewAggregator.js"

Processing script file: /Applications/PixInsight/src/scripts/PreviewAggregator.js
** Warning [156]: /Applications/PixInsight/src/scripts/PreviewAggregator.js, line 293: assignment to undeclared variable n

To avoid the warning, I made the following change on line 293 of the script.
replace:
     
Code: [Select]
for (n = 0; n < this.dialog.target_List.numberOfChildren; n++)with:
     
Code: [Select]
for (var n = 0; n < this.dialog.target_List.numberOfChildren; n++)

Offline mschuster

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1087
Re: warning message from PreviewAggregator.js
« Reply #1 on: 2016 December 10 14:56:56 »
Try this workaround for your ROI crop problem, add this line immediately before crop.executeOn. It will strip keywords and prevent the warning.

Code: [Select]
imageWindow.keywords = [];
crop.executeOn(imageWindow.mainView, false);

Offline rockyraccoon

  • Member
  • *
  • Posts: 63
    • My gallery of astrophotos
Re: warning message from PreviewAggregator.js
« Reply #2 on: 2016 December 10 15:34:55 »
ah! very nice, thanks!