Subject |
Re: Form with Seeker - It Happened Again!!! |
From |
Wayne Graham <equiline2@gmail.com> |
Date |
Sun, 22 Mar 2015 21:35:29 -0400 |
Newsgroups |
dbase.getting-started |
OK I have no idea what is causing this. Hopefully I am just ignorant and someone can point me in the right direction.
I have a "Main" form containing a Grid & a Seeker. It works perfectly and calls other Forms and Menus etc I can add any form I wish and pass parameters do Adds & Edits and it all works fine. BUT..............
Every time I add a second Seeker/Grid combo to the design it falls over AFTER I close Dbase and re-open it. If I dont close Dbase the second Seeker continues to work perfectly and I can leave both forms open and swap from one seeker to the other.
If I close it the second Seeker almost always fails. My testing this morning indicates it always fails but I am not 100% sure on that.
I am using the following code for the second Seeker form. I have tried umpteen times with variations in naming conventions etc with the same result.
I Know the use of a PUBLIC variable in the OnClick event will not be approved by some but it works for me in this situation as this piece of code is the only user of the variable across several sub prgs and it should have no bearing on the problem. Am planning to tidy it up later and left it to show exactly what I am doing
** END HEADER -- do not remove this line
//
// Generated on 23/03/2015
//
parameter bModal
local f
f = new X_Data_BldForm()
if (bModal)
f.mdi = false // ensure not MDI
f.readModal()
else
f.open()
endif
class X_Data_BldForm of FORM
set procedure to "D:\Other Documents\DBase8\Code Examples\seekersql.cc" additive
with (this)
colorNormal = "white"
height = 22.5455
left = 102.2857
top = 1.3182
width = 68.7143
text = ""
endwith
this.ALPH_LST1 = new QUERY(this)
with (this.ALPH_LST1)
left = 2.0
top = 20.0
sql = 'select * from "D:\Other Documents\DBase8\Equigenes\ALPH_LST.DBF"'
active = true
endwith
with (this.ALPH_LST1.rowset)
indexName = "NAME"
endwith
this.TEXT1 = new TEXT(this)
with (this.TEXT1)
height = 1.3182
left = 13.0
top = 20.5
width = 36.0
colorNormal = "Black/white"
fontSize = 8.0
text = "<p> (c) ALL RIGHTS Reserved</p><p> 2012 - 2015 Equigenes - NSW, Australia, 2581</p>"
endwith
this.X_TEXT2 = new TEXT(this)
with (this.X_TEXT2)
height = 3.0
left = 4.0
top = 0.0
width = 39.0
colorNormal = "Slategray/white"
fontSize = 39.0
fontBold = true
text = "Equigenes"
endwith
this.X_IMAGE1 = new IMAGE(this)
with (this.X_IMAGE1)
height = 1.5
left = 2.0
top = 3.0
width = 40.0
dataSource = 'FILENAME "D:\Other Documents\DBase8\Equigenes\Logo_image2.png"'
borderStyle = 3 // None
endwith
this.X_TEXT3 = new TEXT(this)
with (this.X_TEXT3)
height = 1.5
left = 45.0
top = 1.0
width = 20.0
colorNormal = "Slategray/white"
fontSize = 15.0
fontBold = true
text = '"X" Data Build'
endwith
this.GRID1 = new GRID(this)
with (this.GRID1)
dataLink = form.alph_lst1.rowset
columns["COLUMN1"] = new GRIDCOLUMN(form.GRID1)
with (columns["COLUMN1"])
dataLink = form.alph_lst1.rowset.fields["name"]
editorType = 1 // EntryField
width = 50.0
endwith
columns["COLUMN2"] = new GRIDCOLUMN(form.GRID1)
with (columns["COLUMN2"])
dataLink = form.alph_lst1.rowset.fields["dob"]
editorType = 1 // EntryField
width = 5.7143
endwith
with (columns["COLUMN1"].headingControl)
value = "NAME"
endwith
with (columns["COLUMN2"].headingControl)
value = "DOB"
endwith
bgColor = "white"
rowSelect = true
height = 10.5
left = 3.0
top = 7.0
width = 62.0
endwith
this.SEEKERSQL1 = new SEEKERSQL(this)
with (this.SEEKERSQL1)
height = 1.0
left = 6.0
top = 5.5
width = 50.0
colorNormal = "WindowText/0xe0e0e0"
borderStyle = 4 // Single
endwith
this.XCLOSE_BTN = new PUSHBUTTON(this)
with (this.XCLOSE_BTN)
onClick = class::XCLOSE_BTN_ONCLICK
height = 1.0909
left = 42.0
top = 18.0
width = 15.2857
text = "EXIT Build"
fontBold = true
colorNormal = "Red/gainsboro"
endwith
this.XBLD_BTN = new PUSHBUTTON(this)
with (this.XBLD_BTN)
onClick = class::XBLD_BTN_ONCLICK
height = 1.0909
left = 12.0
top = 18.0
width = 15.2857
text = "Build Data"
colorNormal = "Black/gainsboro"
endwith
this.rowset = this.alph_lst1.rowset
function XBLD_BTN_onClick
PUBLIC Hors_Nam
Hors_Nam=form.rowset.fields["Name"].value
DO X_Build.prg
form.close()
return
function XCLOSE_BTN_onClick
form.close()
return
endclass
HELP PLEASE
Wayne
|
|