I get the same message if I use saveallprocedures and loadallprocedures.
Can somebody please test this for me - preferably in High Sierra? I’ve recently upgraded to High Sierra and a few things that used to work don’t now. I have OS 10.13.3 which I think is the latest iteration.
Confirmed. I get the same error when running your procedure with macOS 10.13.3. The variable beta is being loaded with the procedure text correctly, so problem seems to be in the ImportDictProcedures statement.
This statement is completely non-functional, turns out it wasn’t really ported from Panorama 6. I guess I neglected to test it and no one has tried it before today. I have reworked the code just now, it now works so the fixed version will be in the next release.
I have traces of egg on my face - when I proof-read the Help wizard, I skipped the dictionary entries because I had never used dictionaries and I was reluctant to make corrections to something I knew nothing about.
Panorama releases are generally not announced in advance. The next release is getting closer, but not really imminent. I’ve paused working on it to reply to this message!!
If you can’t wait, I’ve included the new working code for this particular statement below. It’s only about a dozen lines of actual code, so you could easily incorporate it into whatever database needs it.
However, as mentioned in the documentation, for new applications I would generally recommend using blueprints instead of using exportallprocedures/importdictprocedures.
/*
<PROCEDUREINFO>
<description>converts source code exported by the [ExportAllProcedures][] statement into a dictionary.</description>
<breadcrumb>Panorama>Procedures>Procedures</breadcrumb>
<tags>procedures</tags>
<parameter NAME=SOURCETEXT TYPE=TEXT>Source code that was exported with the [ExportAllProcedures][] statement.</parameter>
<parameter NAME=DICTIONARY TYPE=TEXT>Field or variable to store result in.</parameter>
<body>This statement converts source code exported by the [ExportAllProcedures][] statement into a dictionary. This dictionary can be used with the [LoadAllProcedures][] statement.
This example transfers all of the procedures from the current database into some other database.
global psave
exportallprocedures "",psave
...
...
...
...
window "Some Other Database"
local psDictionary
importdictprocedures psave,psDictionary
loadallprocedures psDictionary</body>
<seealso>@procedures</seealso>
<history><revision version="1.0" status="No Change">Carried over from Panorama 6.0.</revision></history>
</PROCEDUREINFO>
*/
local procedureNames
let rawSource=lftocr(parameter(1))
let rawSourceArray=tagarray(rawSource,"___ PROCEDURE ",¶+"___ ENDPROCEDURE ","+++++++++++"+cr()) // chr(1))
arrayfilter rawSourceArray,procedureNames,"+++++++++++"+cr(),
import()[1,search(import()," ____________")][1,-2]
let procedureDictionary=""
looparray procedureNames,"+++++++++++"+cr(),procedureName,procedureNumber
let procedureCode = array(rawSourceArray,procedureNumber,"+++++++++++"+cr())
procedureCode = arrayrange(procedureCode,2,-1,cr())
setdictionaryvalue procedureDictionary,procedureName,procedureCode
endloop
setparameter 2,procedureDictionary
return
There may be an error in your code. The code generates a dictionary of procedures with each entry in this format (this particular procedure begins at the semi-colon):
.Initialize=; .Initialize 21.8.2017
local I, J, K, L, M, Tim, Hrs, Mins, Secs, FileName1, FileName2, FileNameTest, FixChoice, Bnnn, BnDiff, NumRec
local Array1, Array2, Array3, Window1, Window2, NumPhoneFields1, NumPhoneFields2, Start, FieldName1
local mA, mB, ArrayElement, Temp, Kount1
following which the loadallprocedures statement crashes Panorama X.
Don’t spend any time on it for the moment - I extracted the heart of your procedure and incorporated it into mine - I may have made an error in so doing. I’ll try it as a call to a separate procedure.
Yes, I was wondering that also, I’m not sure if I changed that also, so mine might be different from yours. That’s one of the things I was going to look into when I get a bit more time.