if not file('default_values.dbf') create table default_values (id autoinc,data1 character(15),data2 character(15)) endif ** END HEADER -- do not remove this line // // Generated on 2016/10/22 // parameter bModal local f f = new defaultForm() if (bModal) f.mdi = false // ensure not MDI f.readModal() else f.open() endif class defaultForm of FORM with (this) onOpen = class::FORM_ONOPEN height = 22.1818 left = 63.0 top = 10.1818 width = 106.5714 text = "" mdi = false sysMenu = false endwith this.DEFAULT_VALUES1 = new QUERY(this) with (this.DEFAULT_VALUES1) left = 5.0 top = 1.0 sql = 'select * from "default_values.DBF"' active = true endwith this.PUSHBUTTON1 = new PUSHBUTTON(this) with (this.PUSHBUTTON1) onClick = class::PUSHBUTTON1_ONCLICK height = 1.0909 left = 31.0 top = 18.0 width = 15.2857 text = "Save" endwith this.PUSHBUTTON2 = new PUSHBUTTON(this) with (this.PUSHBUTTON2) onClick = class::PUSHBUTTON2_ONCLICK height = 1.0909 left = 60.0 top = 18.0 width = 15.2857 text = "Don't save" endwith this.ENTRYFIELD1 = new ENTRYFIELD(this) with (this.ENTRYFIELD1) dataLink = form.default_values1.rowset.fields["data1"] height = 1.0 left = 8.0 top = 7.0 width = 8.0 endwith this.ENTRYFIELD2 = new ENTRYFIELD(this) with (this.ENTRYFIELD2) dataLink = form.default_values1.rowset.fields["data2"] height = 1.0 left = 34.0 top = 7.0 width = 8.0 endwith this.TEXTLABEL1 = new TEXTLABEL(this) with (this.TEXTLABEL1) height = 1.0 left = 8.0 top = 5.0 width = 12.0 text = "data1" endwith this.TEXTLABEL2 = new TEXTLABEL(this) with (this.TEXTLABEL2) height = 1.0 left = 34.0 top = 5.0 width = 12.0 text = "data2" endwith this.rowset = this.default_values1.rowset function PUSHBUTTON1_onClick() form.rowset.save() form.close() return function PUSHBUTTON2_onClick() form.rowset.abandon() form.close() return function form_onOpen() if form.rowset.count() = 0 form.rowset.beginAppend() else form.rowset.beginEdit() endif return endclass