FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour simulate a read
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
simulate a read
Posted: Thu Nov 13, 2014 05:48 PM

How can I simulate a READ (as we made with CLIPPER) to force the final user to enter the data before proceeding with the procedure?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: simulate a read
Posted: Thu Nov 13, 2014 10:07 PM

Silvio,

Using VALIDs :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: simulate a read
Posted: Fri Nov 14, 2014 08:45 AM

Antonio allready tried before !!!...
can I set the valid clausole on second moment on another function when show() the get ?

I tried with

aGet[11]:bvalid :={|o| ! Empty(o:varGet()) }

but make error the user can use the xbrowse ( the obrw is on up) or the other buttons

allready tried with bPostKey

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: simulate a read
Posted: Fri Nov 14, 2014 09:23 AM

Silvio,

try it this way:

aGet[ 11 ]:bValid := { | o | ! Empty( o:GetText() ) }

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: simulate a read
Posted: Fri Nov 14, 2014 09:25 AM
I tried with

aGet[11]:Show()
aGet[11]:SetFocus()
aGet[11]:bvalid :={|| ValEmpty( CodBarreArt, aGet[11] ) }

If the final user press the other get the func ValEmpty run ok

if the final user resize the dialog or use ( press) the oBrw the func valid not run





FUNCTION ValEmpty( cDato, oGet )

IF empty( cDato )
MsgStop( i18n( "E' obbligatorio riempire questo campo." ) )
oGet:setFocus()
RETURN .F.
END IF

RETURN .T.
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: simulate a read
Posted: Fri Nov 14, 2014 09:26 AM

Silvio,

Please try it as I have told you :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: simulate a read
Posted: Fri Nov 14, 2014 09:35 AM

I made also :
aGet[11]:Show()
aGet[11]:SetFocus()
aGet[ 11 ]:bValid := { | o | ! Empty( o:GetText() ) }

the final use cannot use combobox and other gets controls

but if press on xbrowse ( edit_get) columns the aget[11] lose the setfocus and the final user can edit the xbrowse columns ( also the combo) and then can use the other get controls and combobox there are on dialog

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: simulate a read
Posted: Fri Nov 14, 2014 02:04 PM

Silvio,

You can always disable a control to avoid the control from gaining the focus:

oBrowse:Disable()

and later on

oBrowse:Enable()

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: simulate a read
Posted: Fri Nov 14, 2014 04:37 PM

THIS IS A GOOD IDEA !!!!

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: simulate a read
Posted: Fri Nov 14, 2014 04:47 PM

yes :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: simulate a read
Posted: Fri Nov 14, 2014 05:19 PM

we allready block together the final User :)

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion