These are the program errors I get:
Unrecognized command verb.
Syntax error.
File does not exist.
Cannot open file c:\documents.dbf
I am trying to adapt "The fundamentals..." environment class within my own
baseclass.vcx.
Has anyone come across these program errors...? I have not used the "hw..."
classes, but this "ENV" class is based on my own prCustom class which is a
direct subclass of the custom base class to which I've made no changes. All
the changes have been put into the "ENV" class which when released give me
those errors listed above.
FYI. The Environment class has the properties and methods recommended, i.e.:
DoSets, SaveSets, and RestoreSets. The DoSets and the RestoreSets methods
are called from the Init and Destroy events with the requisite this.dosets,
and this.restoresets, respectively.
Any insight out there?
Here's the code for the class "ENV" in case some adventuresome spirit wishes
to test:
DEFINE CLASS env AS prcustom
coldcent = "ON"
colddele = ""
coldesca = ""
coldexac = ""
coldexcl = ""
coldmult = ""
coldproc = ""
coldrepr = ""
coldsafe = ""
coldstat = ""
coldtalk = ""
coldhelp = ""
coldreso = ""
coldoner = ""
noldhour = ""
coldclas = ""
Name = "env"
*-- Saves the values of existing set commands to properties of this
ENV class
PROCEDURE savesets
m.gcOldHour = set("HOURS")
set hours to 12
set hours to &gcOldHour
this.cOldclas = SET("Classlib")
this.cOldCent = set("century")
this.cOldDele = set("delete")
this.cOldEsca = set("escape")
this.cOldExac = set("exact")
this.cOldExcl = set("exclusive")
this.cOldMult = set("multilocks")
this.cOldProc = set("procedure")
this.cOldRepr = set("reprocess")
this.cOldSafe = set("safety")
this.cOldStat = set("status bar")
this.cOldTalk = gcOldTalk
this.cOldHelp = set("help",1)
this.cOldReso = sys(2005)
this.cOldOnEr = on("error")
RETURN
ENDPROC
PROCEDURE dosets
SET CENTURY ON
SET ESCAPE ON
SET CLOCK STATUS
SET DELETED ON
SET EXACT OFF
SET EXCLUSIVE OFF
SET MULTILOCKS ON
SET REPROCESS TO 5
SET SAFETY OFF
RETURN
ENDPROC
PROCEDURE restoresets
* use "u" because you may be storing either
* character or numeric values to luTemp
* in your own routine
*
m.gcOldHour = set("HOURS")
set hours to 12
set hours to &gcOldHour
*
local luTemp
luTemp = this.cOldCent
set century &luTemp
*
luTemp = this.cOldClas
set classlib to &luTemp
*
luTemp = this.cOldDele
set deleted &luTemp
*
luTemp = this.cOldEsca
set escape &luTemp
*
luTemp = this.cOldExac
set exact &luTemp
*
luTemp = this.cOldExcl
set exclusive &luTemp
*
luTemp = this.cOldMult
set multilocks &luTemp
*
luTemp = this.cOldProc
set procedure to &luTemp
*
luTemp = this.cOldRepr
set reprocess to (luTemp)
*
luTemp = this.cOldSafe
set safety &luTemp
*
luTemp = this.cOldStat
set status bar &luTemp
*
luTemp = this.cOldOnEr
on error (luTemp)
*
luTemp = this.cOldTalk
set talk &luTemp
*
luTemp = this.cOldHelp
if !empty( luTemp )
set help to &luTemp
ENDIF
*
luTemp = this.cOldReso
if !empty( luTemp )
set resource to &luTemp
ENDIF
*
RETURN
ENDPROC
PROCEDURE Init
* call the savesetes procedure
this.savesets
ENDPROC
PROCEDURE Destroy
* call the restoresets method in this class
this.restoresets
ENDPROC
ENDDEFINE
*
*-- EndDefine: env
**************************************************
================
PabloSr
In a learning adventure
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.