Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Editing a memo field

0 views
Skip to first unread message

Brian Johnson

unread,
Mar 13, 2000, 3:00:00 AM3/13/00
to
Problem After editing a memo field and saving it is possible to go back
into it, and edit, even though the rowset state is 1. Furthermore on the
editor losing focus, the rowset state changes to 2, and you can now edit all
the other fields.

The following file shows the problem.
When the form is first opened the rowset is in state 1 and you cannot get
access to change either the entryfield or the editor. If you click on the
edit button the rowset state changes to 2. Now _just_ edit the entryfield
and save.
The rowset state changes to 1 and neither field can be edited.
Now repeat but change both fields and save. I find that I can not get access
to edit the entryfield but I can edit the memo field. After modifiying this
field you will see the rowset state change to 2 and I now have access to the
other field.

Bug or me missing something?

Brian Johnson

Save the following code as test75.prg
// test75.prg
*---------Code for creating test75.dbf
if .not. file ( "TEST75.DBF" )
create table "TEST75.DBF" ( ;
test75.'Detail' CHAR(20),;
test75.'note1' BLOB(10,1))
t = new query()
t.sql = "select * from test75.dbf"
t.active = true
t.rowset.beginappend()
t.rowset.fields["detail"].value = "Entry 1"
t.rowset.fields["Note1"].value = "Just testing"
t.rowset.save()
endif
*---------End test75.dbf

** END HEADER -- do not remove this line
//
// Generated on 13/03/2000
//
parameter bModal
local f
f = new test752Form()
if (bModal)
f.mdi = false // ensure not MDI
f.readModal()
else
f.open()
endif

class test752Form of FORM
with (this)
canClose = class::FORM_CANCLOSE
onOpen = class::FORM_ONOPEN
height = 12.7273
left = 38.4286
top = 0.1818
width = 40
text = ""
endwith

this.TEST751 = new QUERY()
this.TEST751.parent = this
with (this.TEST751)
left = 3.2857
top = 9.9545
sql = 'select * from "test75.dbf"'
active = true
endwith

this.ENTRYFIELDDETAIL1 = new ENTRYFIELD(this)
with (this.ENTRYFIELDDETAIL1)
dataLink = form.test751.rowset.fields["detail"]
height = 1
left = 8.8571
top = 0.9091
width = 22
endwith

this.EDITORNOTE11 = new EDITOR(this)
with (this.EDITORNOTE11)
height = 3.4545
left = 1.8571
top = 2.7727
width = 37.4286
dataLink = form.test751.rowset.fields["note1"]
endwith


this.TEXTLABEL1 = new TEXTLABEL(this)
with (this.TEXTLABEL1)
height = 1
left = 11.7143
top = 7.0909
width = 15.2857
text = "Textlabel1"
endwith


this.TEXTLABEL2 = new TEXTLABEL(this)
with (this.TEXTLABEL2)
height = 1
left = 11.7143
top = 8.1818
width = 15.2857
text = "Textlabel1"
endwith


this.PUSHBUTTON2 = new PUSHBUTTON(this)
with (this.PUSHBUTTON2)
onClick = class::PUSHBUTTON2_ONCLICK
height = 1.0909
left = 12.4286
top = 9.3182
width = 15.2857
text = "&Begin Edit"
endwith


this.PUSHBUTTON1 = new PUSHBUTTON(this)
with (this.PUSHBUTTON1)
onClick = class::PUSHBUTTON1_ONCLICK
height = 1.0909
left = 12.2857
top = 10.5455
width = 15.2857
text = "&Save"
endwith


this.rowset = this.test751.rowset

function PUSHBUTTON1_onClick
form.test751.rowset.save()
return

function PUSHBUTTON2_onClick
form.test751.rowset.beginEdit()
return

function form_onOpen
form.test751.rowset.autoEdit = false
form.t1 = new timer()
form.t1.form = form
form.t1.interval := 0.25
form.t1.ontimer := class::t1_ontimer
form.t1.enabled := true
return

function form_canClose
form.t1.enabled := false
return true

function t1_ontimer
this.form.textlabel1.text = "Rowstate = " +
str(this.form.test751.rowset.state,1)
if this.form.test751.rowset.autoEdit
this.form.textlabel2.text= "autoEdit = true"
else
this.form.textlabel2.text= "autoEdit = false"
endif
return
endclass
// eof

Ken Mayer [dBASE, Inc.]

unread,
Mar 13, 2000, 3:00:00 AM3/13/00
to
"Brian Johnson" <Council...@ukgateway.net> wrote:

>Problem After editing a memo field and saving it is possible to go back
>into it, and edit, even though the rowset state is 1. Furthermore on the
>editor losing focus, the rowset state changes to 2, and you can now edit all
>the other fields.

This is a known bug. Thanks ...

Ken
---
Ken Mayer [dBASE, Inc.]
** Please respond ONLY in the newsgroups **

*** VdBASE7 Tutorial, HOW TOs, and dUFLP library:
Ken's dBASE page:
http://users.megapathdsl.net/~kmayer/dbase/dbase.htm
US Mirror: http://www.apptools.com/dbase/kenstuff
South African Mirror: http://www.dbase.co.za
German Mirror: http://www.tnm.de/dbase/km/dbase.html

*** dBASE, Inc. website: http://www.dbase2000.com

0 new messages