I have an update from 4D v15 to 4D v17… (On Mac)
I am converting old 4D Write docs in picture format to the new Object format. Some of the docs are causing errors by running embedded 4D methods.
For example this line on a particular 4D Write doc:
WR PICTURE TO AREA ($offscreen;[CATALOG]CATpict_)
Must have a routine that calls another method which then uses sets. Like this:
INTERSECTION** ($set1;$set2;“QK RESULTING SET”)
But the sets don’t exist and thus an error.
So I’ve looked through the NUG and found a previous topic. But no real solution. I tried to trap it with an On error Call and and on WR Error Call but they seemed to be ignored.
I tied putting these lines before the call:
WR GET COMMAND INFO ($offscreen;wr cmd compute references;$Applied;$StringValue;$Name;$Status)
If ($Status=1) // enabled or disable?
WR SET DOC PROPERTY*** ($offscreen;wr cmd compute references;0)
But… I think these settings get overrode when the doc is loaded from the record. And by that time the code is already running.
I realize that trying to create a “Is Set Exist” command doesn’t really solve the problem. But this code really should have some better error checking anyway.