#Formdata1 Var
FD1_uiO uiObject
FD1_tC tCursor
#Formdata1 Arrive
var
a_logl logical
s_str string
n_lInt longInt
endVar
if (eventInfo.isPreFilter()) then
;;//for each object (i.e. box, mro, container, field)
if (active.class = "Field") then
s_str = self.TableName
a_logl = FD1_tC.open(FD1_uiO)
arriveFieldObject()
endIf
else
;;//for Form only
s_str = self.name
a_logl = FD1_uiO.attach(s_str)
s_str = self.TableName
a_logl = FD1_tC.open(FD1_uiO)
endIf
#Formdata1 Proc
proc arriveFieldObject()
var
a_logl logical
s_str string
n_lInt longInt
o_uiO uiObject
fieldObjectName_str string
fieldName_str string
endVar
;; scenerio where user presses [Ins] key
a_logl = FD1_uiO.recordStatus("New")
a_logl.view ("Viewing Record Status...") ;; CORRECTLY displays "True"
a_logl = FD1_tc.recordStatus("New")
a_logl.view ("Viewing Record Status...") ;; INCORRECTLY displays "False"
fieldObjectName_str = "fieldName_01"
a_logl = o_uiO.attach(fieldObjectName_str)
s_str = o_uiO.value
s_str.view ("Viewing contents of fieldName...") ;; CORRECTLY displays blank
fieldName_str = "fieldName 01"
s_str = FD1_tc.(fieldName_str)
s_str.view("Viewing contents of fieldName...") ;; INCORRECTLY displays contents from the next record
------------------------------------
Manually, in Paradox Workspace
[Format][Data Model] ;; to add table to data model
"Right-click" [Define Field] ;; to add each field to form
-------------------------------------
Obviously, FD1_tc does not "see" the newly inserted blank record.
Whereas, FD1_uiO does "see" the newly inserted blank record through the eyes of the form.
As a programmer/developer,
I would prefer to use the FD1_tc."fieldName 01" notation
over the use of the FD1_uiO."fieldName_01" notation
I guess that this is a carryover from my [tableName->fieldName 01] PDOX for DOS days.
-----------------------------------
What is the best technique for referencing newly inserted blank records???
I have been giving thoughts to the use of FD1_uiO(postRecord)