Subject |
Editor Problem |
From |
Norman Snowden <duluth@msn.com> |
Date |
Sun, 07 Jul 2024 14:18:56 -0400 |
Newsgroups |
dbase.getting-started |
Mervyn provided this code for me a couple of years ago. It worked beautifully. It still works on my Laptop. I recently did some adjustments on the program working with my Desk Top. Now when I run it on the Desk Top the screen just flashes the program title and closes. I don't think I altered any of this code. Thanks, Mervyn for your help over the years. I think this was associated with Note Pad. Any ideas? PUSHBUTTON9_onClick()
Go Top
Clear
Count for relative = true to Rle
if Rle = 0
verdict = msgbox("There are no Relatives Listed")
return
endif
Declare Relt[rle,8]
Copy to Array Relt fields Lname, Fname, Mi, city, state, phone, birthday, lascontact For relative = true
Asort(Relt)
form.editor1.value = ''
fFile = new file()
fFile.create('plot_Relatives.txt')
crlf = chr(13)+chr(10)
* form.editor1.value += " " + crlf
* form.editor1.value += ' ' + '
form.editor1.value += " RELATIVES " + crlf
form.editor1.value += " LAST NAME"+ " " + "FIRST"+ " "+ "INITIAL"+ " " +"CITY"+ " "+ "STATE"+" "+ "PHONE"+" "+" BIRTHDAY"+ " "+"LAST CONTACT" + crlf //no crlf
form.editor1.value += " ________________________________________________________________________________________________________ "
* fFile.puts(form.editor1.value) //fFileputs() adds crlf in file automatically
* form.editor1.value += crlf //add crlf to editor contents for proper display
form.editor1.value += crlf
k = 1
DO WHILE k <= rle
A = Relt[rle-(rle-k),1]
if A = " "
A = " ? "
endif
B = Relt[rle-(rle-k),2]
if B = " "
B = " ? "
endif
C = Relt[rle-(rle-k),3]
if C = " "
C = " ? "
endif
D = Relt[rle-(rle-k),4]
if D = " "
D = " ? "
endif
E = Relt[rle-(rle-k),5]
if E = " "
E = " ? "
endif
F = Relt[rle-(rle-k),6]
if F = " "
F = " ? "
endif
G = Relt[rle-(rle-k),7]
if G = null &&" "
G = " 00/00/0000 "
endif
H = Relt[rle-(rle-k),8]
if H = null && " "
H = "00/00/0000" &&" 00/00/0000 ? "
endif
form.editor1.value += ' ' + A + ' ' +B + ' '+ C + ' ' + D + ' '+LTRIM(E) + ' '+ LTRIM(F)+ ' ' + G+ ' ' + H + crlf
fFile.puts ((A)+''+B+ ' '+ C+ ' ' + D + ' '+ LTRIM(E) + ' '+ LTRIM(F)+ ' ' + G+ ' ' + H)
* form.editor1.value += ' ' +Relt[rle-(rle-k),1] + ' ' +Relt[rle-(rle-k),2] + crlf && ' ' +Relt[rle-(rle-k),3] + ' ' +Relt[rle-(rle-k),4] + crlf &&' ' + Relt[rle-(rle-k),5]+ ' ' +Relt[rle-(rle-k),6]+ ' ' +Relt[rle-(rle-k),7]+ ' ' +Relt[rle-(rle-k),8] + crlf
* fFile.puts(' ' +Relt[rle-(rle-k),1] + ' ' +Relt[rle-(rle-k),2]) + ' ' +Relt[rle-(rle-k),3] + ' ' +Relt[rle-(rle-k),4] + ' ' + Relt[rle-(rle-k),5]+ ' ' +Relt[rle-(rle-k),6]+ ' ' +Relt[rle-(rle-k),7]+ ' ' +Relt[rle-(rle-k),8]) + crlf
* editor1.value += ' ' +Relt[rle-(rle-k),1] + ' ' +Relt[rle-(rle-k),2] + crlf &&' ' +Relt[rle-(rle-k),3] + ' ' +Relt[rle-(rle-k),4] + ' ' + Relt[rle-(rle-k),5]+ ' ' +Relt[rle-(rle-k),6]+ ' ' +Relt[rle-(rle-k),7]+ ' ' +Relt[rle-(rle-k),8] + crlf
k = k + 1
Enddo
* form.editor1.keyboard('{dnArrow}') //scroll down as values are added
* form.entryfield1.value = set('directory')+'\Plot_Relatives.txt'
fFile.close()
form.Pageno = 3
return
I would appreciate it if you think the code still looks correct.
|
|