| Subject |
form.close() not working |
| From |
AGOSTINHO <agostinhoteixeira@yahoo.com> |
| Date |
Thu, 13 May 2021 00:18:49 -0400 |
| Newsgroups |
dbase.getting-started |
Dear group.
I'm having two issues with this form:
1. form.close() does not closes this form
2. I'm getting an error when run this form saying Error: Variable undefined: AG
What i'm I doing wrong?
Agostinho
parameter bModal
local f
f = new test3Form()
if (bModal)
f.mdi = false // ensure not MDI
f.readModal()
else
f.open()
endif
class test3Form of FORM
with (this)
onOpen = class::FORM_ONOPEN
height = 16.0
left = 49.1111
top = 7.04
width = 40.0
text = ""
endwith
this.CUSTOMER1 = new QUERY(this)
with (this.CUSTOMER1)
left = 15.0
top = 6.0
sql = 'select * from "C:\Users\HOME_PC\Desktop\dBASEtutorial\customer.DBF"'
active = true
endwith
this.USERS1 = new QUERY(this)
with (this.USERS1)
left = 31.0
top = 6.0
sql = 'select * from "C:\USERS.DBF"'
active = true
endwith
this.PUSHBUTTON1 = new PUSHBUTTON(this)
with (this.PUSHBUTTON1)
onClose = class::PUSHBUTTON1_ONCLOSE
height = 1.92
left = 11.0
top = 10.56
width = 15.0
text = "CLOSE FORM"
endwith
this.PUSHBUTTON2 = new PUSHBUTTON(this)
with (this.PUSHBUTTON2)
onClick = class::PUSHBUTTON2_ONCLICK
height = 2.4
left = 11.0
top = 0.96
width = 20.0
text = "Pushbutton2"
endwith
this.rowset = this.customer1.rowset
function PUSHBUTTON1_onClose()
form.close()
return
function PUSHBUTTON2_onClick()
IF ag="AGOSTINHO"
*say someting
ENDIF
return
function form_onOpen()
ag=form.users1.rowset.fields["NAAM"].VALUE
return
endclass
|
|