dbTalk Databases Forums  

How to prevent user from locking a field

comp.databases.paradox comp.databases.paradox


Discuss How to prevent user from locking a field in the comp.databases.paradox forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Werking
 
Posts: n/a

Default How to prevent user from locking a field - 07-03-2003 , 01:54 PM






On a table frame on my form I have a field on the right most column designed
for users to left click on and then slide the mouse down over as many
records as they wish to select. The field is logical. As they slide the
mouse down the color of the field changes and the value is turned to False.
I then use this field to setGenFilter the table when the user clicks a
button.

My question is how can I prevent users from locking a record when they click
on the field.

Here is the code I am using so far:

In the built in action method of the field:
;--------------------------------------------------------------
method action(var eventInfo ActionEvent)
id = eventInfo.id()
if id = DataLockRecord then
disableDefault
endif
if self.value = True then
Self.Color = Blue
else
Self.color = Gray
endif
endMethod
;----------------------------------------------------
In the built in mouseDown method of the field:
;------------------------------------------------------
method mouseDown(var eventInfo MouseEvent)
moveto(self)
if select.recordStatus("Locked") then
select.unlockRecord()
endIf
if self.value = False then
self.value = True
else
self.value = False
endif
endMethod
;------------------------------------------------
In the built in mouseEnter method of the field:
;------------------------------------------------
method mouseEnter(var eventInfo MouseEvent)
var
TopLeft,
BotRight Point
endVar
disabledefault
if eventInfo.isLeftDown() then
moveto(self)
if select.recordStatus("Locked") then
select.unlockRecord()
endIf
if self.value = False then
self.value = True
else
self.value = False
endif
self.action(MoveScrollDown)
else
endif
endMethod

Thanks for your help in advance!

-Bruce




Reply With Quote
  #2  
Old   
Werking
 
Posts: n/a

Default Re: How to prevent user from locking a field - 07-03-2003 , 03:15 PM






Quote:
the simplest way would be to not let them do this is Edit Mode.. clicking
on a
field doesn't lock the record.. clicking on a field *in Edit Mode* locks
the
record..
Thanks for the reply. Yes, that would be the easiest way to do it, keep the
user from entering edit mode, but I need to change the value of the field
from true to false as the user passes their cursor over the field. The form
has to be in edit mode to do this I think?

I wonder if there is some way to filter the table based on the color, alone,
of the field object? Then I would not need to change the value of the field
and I could avoid edit mode.

-Bruce




Reply With Quote
  #3  
Old   
Steven Green
 
Posts: n/a

Default Re: How to prevent user from locking a field - 07-03-2003 , 03:24 PM



Werking wrote:

Quote:
My question is how can I prevent users from locking a record when they click
on the field.
the simplest way would be to not let them do this is Edit Mode.. clicking on a
field doesn't lock the record.. clicking on a field *in Edit Mode* locks the
record..


--

Steve Green - Diamond Software Group, Inc - Waldorf Maryland USA
Corel CTech Paradox - http://www.diamondsg.com - Support/Downloads/Links
---------------------------------------------------------------------------------

Do you need a Sanity Check? http://www.diamondsg.com/sanity.htm
Upgrade/Downgrade versions? http://www.diamondsg.com/upgrade.htm
-------------------------------------------------------------------------




Reply With Quote
  #4  
Old   
Tony McGuire
 
Posts: n/a

Default Re: How to prevent user from locking a field - 07-03-2003 , 04:21 PM




You could use a tcursor in the background, keeping it open and in edit mode.

The form would NOT have to be in edit mode to do this.

--
--
Tony

"I woke up and was able to get myself out of bed.
Being that fortunate, what's to complain about?"
_____________




Reply With Quote
  #5  
Old   
Liz
 
Posts: n/a

Default Re: How to prevent user from locking a field - 07-03-2003 , 05:40 PM



Rather than keeping them from locking it, why not unlock it the
instant the change is done. Also, you can't lock a field, only a
record.

Liz


Werking wrote:
Quote:
On a table frame on my form I have a field on the right most column designed
for users to left click on and then slide the mouse down over as many
records as they wish to select. The field is logical. As they slide the
mouse down the color of the field changes and the value is turned to False.
I then use this field to setGenFilter the table when the user clicks a
button.

My question is how can I prevent users from locking a record when they click
on the field.

Here is the code I am using so far:

In the built in action method of the field:
;--------------------------------------------------------------
method action(var eventInfo ActionEvent)
id = eventInfo.id()
if id = DataLockRecord then
disableDefault
endif
if self.value = True then
Self.Color = Blue
else
Self.color = Gray
endif
endMethod
;----------------------------------------------------
In the built in mouseDown method of the field:
;------------------------------------------------------
method mouseDown(var eventInfo MouseEvent)
moveto(self)
if select.recordStatus("Locked") then
select.unlockRecord()
endIf
if self.value = False then
self.value = True
else
self.value = False
endif
endMethod
;------------------------------------------------
In the built in mouseEnter method of the field:
;------------------------------------------------
method mouseEnter(var eventInfo MouseEvent)
var
TopLeft,
BotRight Point
endVar
disabledefault
if eventInfo.isLeftDown() then
moveto(self)
if select.recordStatus("Locked") then
select.unlockRecord()
endIf
if self.value = False then
self.value = True
else
self.value = False
endif
self.action(MoveScrollDown)
else
endif
endMethod

Thanks for your help in advance!

-Bruce


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.