Get anomaly

Get anomaly

Postby reds » Tue Feb 20, 2018 12:43 pm

When entering data via gets in a Window the SETFOCUS seems to be ignored
if the variable is completely filled (not requiring an enter key) but works
OK when partially filled (requiring an enter key to continue)

It's the same result for character and numerical variables,adding SysRefresh didn't change it

Yet when using a Dialog it works fine !

What am I missing ?

Code: Select all  Expand view  RUN

#include "FWCE.ch"
STATIC oGet[4]
function Main()
     
  local  cVar1 := cvar2 := cvar3 := cvar4 := space(4)

  local oDlg
 
   DEFINE WINDOW oDlg TITLE "get via window"
       
  @ 0,1 SAY "enter values"
 
  @ 2,1 GET oGet[1]    VAR cVar1 OF oDlg        size 60,30

  @ 2,15 GET oGet[2]    VAR cVar2 OF oDlg                  UPDATE VALID  Reset(cVar2)     size 60,30

  @ 6,1 GET oGet[3]    VAR cVar3 OF oDlg                   UPDATE VALID  Reset(cVar3)     size 60,30

  @ 6,15 GET oGet[4]    VAR cVar4 OF oDlg                  UPDATE VALID  Reset(cVar4)     size 60,30
   
   @ 8, 2 BUTTON "End" ACTION oDlg:End() SIZE 80, 40

   ACTIVATE WINDOW oDlg   VALID MsgYesNo( "end ?" )
     
   Function Reset(var)

   oGet[1]:Setfocus()
SysRefresh()
   return .t.

 



Code: Select all  Expand view  RUN

#include "FWCE.ch"
STATIC oGet[4]
function Main()
     
  local  cVar1 := cvar2 := cvar3 := cvar4 := space(4)
  local oDlg
 

   DEFINE DIALOG oDlg TITLE "get via dialog" SIZE 150,200    
   
  @ 0,1 SAY "enter values"
 
  @ 3,1 GET oGet[1]    VAR cVar1 OF oDlg        size 20,10

  @ 3,5 GET oGet[2]    VAR cVar2 OF oDlg                  UPDATE VALID  Reset(cVar2)   size  20,10

  @ 4,1 GET oGet[3]    VAR cVar3 OF oDlg                   UPDATE VALID  Reset(cVar3)     size  20,10

  @ 4,5 GET oGet[4]    VAR cVar4 OF oDlg                  UPDATE VALID  Reset(cVar4)     size  20,10
   
   @ 4.5, 2 BUTTON "End" ACTION oDlg:End() SIZE 25, 15

   ACTIVATE DIALOG  oDlg  CENTERED  VALID MsgYesNo( "end ?" )
     
   Function Reset(var)

   oGet[1]:Setfocus()

   return .t.


 
reds
 
Posts: 50
Joined: Tue May 16, 2017 12:19 pm
Location: North London

Re: Get anomaly

Postby Antonio Linares » Tue Feb 20, 2018 3:32 pm

Please try using:

SET CONFIRM ON | OFF
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42127
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Get anomaly

Postby reds » Tue Feb 27, 2018 9:10 am

Thanks Antonio

I was hoping to avoid that to save user having to move cursor but it's not a big deal

Regards
Peter
reds
 
Posts: 50
Joined: Tue May 16, 2017 12:19 pm
Location: North London


Return to FiveWin for Pocket PC

Who is online

Users browsing this forum: No registered users and 8 guests