Alan, here's the script that triggers the error. It happens every time a 
new global variable is created -- I only tested creating maps.

Run script with [EMAIL PROTECTED]("menu")

;; --- filename: debug.powerpro ---
;: [EMAIL PROTECTED](sOpts)
;: ==============================================
;: return sorted list of all scalar/compound globals and their values
;: if "menu"==sOpts show menu and debug print value of selected variable
;: usage: messagebox("ok", [EMAIL PROTECTED])
;:        [EMAIL PROTECTED]("menu")
;i easily extended to allstatic...
@allglobals
args sOpts
local f,tmpfile,i,ret,inside,s,m,v
tmpfile=?"vars\debug-tmp.ini"
file.deletenorecycle(tmpfile)
vars.save("allglobals", 1, 1, 1, tmpfile )
f=file.readall(tmpfile)
file.deletenorecycle(tmpfile)
inside=0
m=f.line(0)
v=vec.create(m)
for(i=1;i<=m;i++)
  s=f.line(i)
  if(inside)do
    if(select(s,1)!="[" )do
      v[i-inside]=s
    else
      inside=0
      v.sort
      ret ++= v.makelines
      v.deleteall
    endif
  endif
  if(1==index(s,"[allglobals-global-") )do
    inside=i
    v[i-inside]=s
  endif
endfor
if(inside)do
  v.sort
  ret ++= v.makelines
  v.deleteall
endif
v=vec.createfromlines(ret)
if( index(sOpts,"menu") )do
  i=v.showmenu
  if(-1 != i)
    win.debug(v[i])
endif
v=v.destroy
quit( ret )

Reply via email to