newsgroups-index (beta)

Current group: dbase.wishlist

form.allowedit

form.allowedit  
Dave
 Re: form.allowedit  
Dave
 Re: form.allowedit  
Ken Mayer [dBVIPS]
 Re: form.allowedit  
Dave
 Re: form.allowedit  
Ken Mayer [dBVIPS]
 Re: form.allowedit  
David Stone
 Re: form.allowedit  
Ken Mayer [dBVIPS]
 Re: form.allowedit  
Marc Hamelin
 Re: form.allowedit  
Michael Nuwer [dBVIPS]
 Re: form.allowedit  
Ken Mayer [dBVIPS]
 Re: form.allowedit  
Dave
 Re: form.allowedit  
Ken Mayer [dBVIPS]
 Re: form.allowedit  
Rick Gearardo
From:Dave
Subject:form.allowedit
Date:Thu, 16 Dec 2004 08:47:05 -0500
i have many programs and forms that contain a user info table that allows
one entry.
when a person uses the program for the first time they enter user info by
clicking and form....beginappend()

then enabling all entryfields for new information.

can a

form.allowedit = .t.

function be done to enable all entryfields for editing and then
form.allowedit = .f.
to disable the fields instead of haveing to do each one independently?


regards

Dave Titus



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.806 / Virus Database: 548 - Release Date: 12/5/2004
From:Dave
Subject:Re: form.allowedit
Date:Thu, 16 Dec 2004 18:27:19 -0500
function PUSHBUTTON3_onClick
if this.text = 'Edit'
form.co_info1.rowset.autoedit = .t.
this.text = 'Save'
else
form.co_info1.rowset.autoedit = .f.
this.text = 'Edit'
endif
return

works like never before...




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.806 / Virus Database: 548 - Release Date: 12/5/2004
From:Ken Mayer [dBVIPS]
Subject:Re: form.allowedit
Date:Fri, 17 Dec 2004 05:35:13 -0800
Dave wrote:
> function PUSHBUTTON3_onClick
> if this.text = 'Edit'
> form.co_info1.rowset.autoedit = .t.
> this.text = 'Save'
> else
> form.co_info1.rowset.autoedit = .f.
> this.text = 'Edit'
> endif
> return
>
> works like never before...
>

That's a very silly way to do that, but I suppose if it works ... there
are much better ways of handling this.

Ken

--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/

*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase
From:Dave
Subject:Re: form.allowedit
Date:Fri, 17 Dec 2004 09:43:12 -0500
question why is that ken? just a question. i've been programming for 25
years and always try to make it simple for me and the end user who i figure
needs as littlle clutter on a screen. if one button works why would that be
silly? Not mad I always want to learn no matter how old i am and I do
thank you very much for all the help you have given me over the last 5 years
thru the newsgroups.
what would be a better way?

the form is for company info only to put on all reports. it will never have
more than one record in it.


1. it saves on foot print on the form
2. one button instead ot two
3. only one record in the database never two
4. makes life simple

regards

dave t
:)

"Ken Mayer [dBVIPS]" wrote in message
news:bWXoB4D5EHA.1644@news-server...
> Dave wrote:
>> function PUSHBUTTON3_onClick
>> if this.text = 'Edit'
>> form.co_info1.rowset.autoedit = .t.
>> this.text = 'Save'
>> else
>> form.co_info1.rowset.autoedit = .f.
>> this.text = 'Edit'
>> endif
>> return
>>
>> works like never before...
>>
>
> That's a very silly way to do that, but I suppose if it works ... there
> are much better ways of handling this.
>
> Ken
>
> --
> /(Opinions expressed are purely my own, not those of dataBased
> Intelligence, Inc.)/
>
> *Ken Mayer* [dBVIPS]
> /Golden Stag Productions/
> dBASE at goldenstag dot net
> http://www.goldenstag.net/GSP
> http://www.goldenstag.net/dbase


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.806 / Virus Database: 548 - Release Date: 12/5/2004
From:Ken Mayer [dBVIPS]
Subject:Re: form.allowedit
Date:Fri, 17 Dec 2004 08:38:24 -0800
Dave wrote:
> question why is that ken? just a question. i've been programming for 25
> years and always try to make it simple for me and the end user who i figure
> needs as littlle clutter on a screen. if one button works why would that be
> silly? Not mad I always want to learn no matter how old i am and I do
> thank you very much for all the help you have given me over the last 5 years
> thru the newsgroups.
> what would be a better way?
>
> the form is for company info only to put on all reports. it will never have
> more than one record in it.
>
>
> 1. it saves on foot print on the form
> 2. one button instead ot two
> 3. only one record in the database never two
> 4. makes life simple

It isn't the way the property was designed, that's why. I much
prefer an application that has Append, Edit, Save, Abandon, and Delete
buttons, which are clearly defined for the user ... I've never had
complaints about this kind of behavior, and it is more intuitive.

That fact that it works is great, and I am not saying "Don't do it", but
what you're doing is not very intuitive and is an odd design at best.

Ken

--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/

*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase
From:David Stone
Subject:Re: form.allowedit
Date:Fri, 17 Dec 2004 20:14:28 -0800
"Ken Mayer [dBVIPS]" wrote:

> That fact that it works is great, and I am not saying "Don't do it", but
> what you're doing is not very intuitive and is an odd design at best.

Surprised you're saying this...I could swear I first saw that approach (button
re-use) in samples from Borland. I thought it was clever and pretty slick. Re
intuitiveness, the simplicity of fewer buttons may offset the mind-boggling
(slightly, and on 1st use only, assuming absence of brain-death in user) effect of
having a button change its stripes.

David
From:Ken Mayer [dBVIPS]
Subject:Re: form.allowedit
Date:Mon, 20 Dec 2004 05:35:59 -0800
David Stone wrote:
> "Ken Mayer [dBVIPS]" wrote:
>
>
>>That fact that it works is great, and I am not saying "Don't do it", but
>>what you're doing is not very intuitive and is an odd design at best.
>
>
> Surprised you're saying this...I could swear I first saw that approach (button
> re-use) in samples from Borland. I thought it was clever and pretty slick. Re
> intuitiveness, the simplicity of fewer buttons may offset the mind-boggling
> (slightly, and on 1st use only, assuming absence of brain-death in user) effect of
> having a button change its stripes.

If it was in the samples from Borland, and I would be surprised if it
were, it's a dumb example of how things work.

Ken

--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/

*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase
From:Marc Hamelin
Subject:Re: form.allowedit
Date:Fri, 17 Dec 2004 11:43:29 -0500
I guess what he meant was that you could have set autoEdit to false from the
start (and keep it that way) and then do something like this instead:

function PUSHBUTTON3_onClick
if this.text = 'Edit'
form.co_info1.rowset.beginEdit()
this.text = 'Save'
else
form.co_info1.rowset.save()
this.text = 'Edit'
endif
return

Marc Hamelin
From:Michael Nuwer [dBVIPS]
Subject:Re: form.allowedit
Date:Thu, 16 Dec 2004 09:03:47 -0500
Dave wrote:
> i have many programs and forms that contain a user info table that allows
> one entry.
> when a person uses the program for the first time they enter user info by
> clicking and form....beginappend()
>
> then enabling all entryfields for new information.
>
> can a
>
> form.allowedit = .t.
>
> function be done to enable all entryfields for editing and then
> form.allowedit = .f.
> to disable the fields instead of haveing to do each one independently?

Yes, this can be done. An example follows.

Note: Sometimes this type of thing works best when you use a system for
naming your controls such that the FOR loop can easily test the
"ClassName" property. (The example below tests the "baseClassName"). I
use xEF_???????, then test for class names that begin with "x"; other
class names are ignored -- inside the loop, that is.

local f
f = new enableDemoForm()
f.allowEdit = false
f.open()
return

** END HEADER -- do not remove this line
//
// Generated on 12/16/2004
//
parameter bModal
local f
f = new enableDemoForm()
if (bModal)
f.mdi = false // ensure not MDI
f.readModal()
else
f.open()
endif

class enableDemoForm of FORM
with (this)
height = 11.2273
left = 45.2857
top = 0.0
width = 40.0
text = ""
endwith

this.ENTRYFIELD1 = new ENTRYFIELD(this)
with (this.ENTRYFIELD1)
height = 1.0
left = 9.0
top = 3.5
width = 8.0
value = "Entryfield1"
endwith

this.ENTRYFIELD2 = new ENTRYFIELD(this)
with (this.ENTRYFIELD2)
height = 1.0
left = 9.0
top = 5.0
width = 8.0
value = "Entryfield2"
endwith

this.ENTRYFIELD3 = new ENTRYFIELD(this)
with (this.ENTRYFIELD3)
height = 1.0
left = 9.0
top = 6.5
width = 8.0
value = "Entryfield3"
endwith

function open
for i=1 to this.elements.size
if this.elements[i].baseClassName == "ENTRYFIELD"
this.elements[i].enabled = this.allowEdit
endif
endfor
return super::open()

endclass
From:Ken Mayer [dBVIPS]
Subject:Re: form.allowedit
Date:Thu, 16 Dec 2004 07:25:40 -0800
Dave wrote:
> i have many programs and forms that contain a user info table that allows
> one entry.
> when a person uses the program for the first time they enter user info by
> clicking and form....beginappend()
>
> then enabling all entryfields for new information.
>
> can a
>
> form.allowedit = .t.
>
> function be done to enable all entryfields for editing and then
> form.allowedit = .f.
> to disable the fields instead of haveing to do each one independently?

Michael may have hit this, but take a look at rowset.autoEdit -- set
that to false. Then, when the user click's an edit button, they can call
the rowset's beginEdit() method, to add a row, beginAppend(), and so on.

All of this is covered in a knowledgebase article on working with OODML
and forms ...

Ken

--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/

*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase
From:Dave
Subject:Re: form.allowedit
Date:Thu, 16 Dec 2004 18:22:28 -0500
you hit it just what i needed..... what a time saver.

>
> Michael may have hit this, but take a look at rowset.autoEdit -- set that
> to false. Then, when the user click's an edit button, they can call the
> rowset's beginEdit() method, to add a row, beginAppend(), and so on.
>
> All of this is covered in a knowledgebase article on working with OODML
> and forms ...
>
> Ken
>


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.806 / Virus Database: 548 - Release Date: 12/5/2004
From:Ken Mayer [dBVIPS]
Subject:Re: form.allowedit
Date:Thu, 16 Dec 2004 15:27:30 -0800
Dave wrote:
> you hit it just what i needed..... what a time saver.
>

It's made my life a lot easier.

Ken

--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/

*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase
From:Rick Gearardo
Subject:Re: form.allowedit
Date:Thu, 16 Dec 2004 12:29:34 -0500
Have you looked at rowset.live?

Rick

> when a person uses the program for the first time they enter user info by
> clicking and form....beginappend()
>
> then enabling all entryfields for new information.
   

Copyright © 2006 newsgroups-index   -   All rights reserved   -   Impressum