Problem FW 12.01 with date()

Problem FW 12.01 with date()

Postby Maurizio » Wed Feb 15, 2012 5:52 pm

Antonio
in this sample
Code: Select all  Expand view
#Include "FiveWin.Ch"


Function Main()
   Local oDlg
   Local oGet1,oGet2
   local nVar2 := 0
   local dVar4 := ctod('  -  -    ')
   
   SET DATE ITALIAN
   SET CENTURY ON
   SET EPOCH TO 1960
   

   DEFINE DIALOG oDlg from 0,0 to 200,400 pixel

   @ 1,5 get oGet1 var dVar4
   
   @ 4,5 get oGet2 var nVar2 picture "99999"
   
   ACTIVATE DIALOG oDlg
 
 return nil


In the date I insert 02-02-12 when I confirm the get I have "02-02-12" , if I return on the get with the arrow key I have "02-02-2012"
the refresh doesn't working properly

Regard Maurizio
FWH 12.01 + Harbour
User avatar
Maurizio
 
Posts: 796
Joined: Mon Oct 10, 2005 1:29 pm

Re: Problem FW 12.01 with date()

Postby Antonio Linares » Wed Feb 15, 2012 9:49 pm

Maurizio,

In FWH\sources\classes\tget.prg line 1227 please insert this:

Code: Select all  Expand view

   ::oGet:KillFocus()  // new
   ::oGet:SetFocus()  // new
   ::DispText()
 
regards, saludos

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

Re: Problem FW 12.01 with date()

Postby Antonio Linares » Wed Feb 15, 2012 9:53 pm

Better this way to avoid conflicts with other data types:

Code: Select all  Expand view

   if ::oGet:Type == "D"
      ::oGet:KillFocus()
      ::oGet:SetFocus()
   endif  
   ::DispText()
 
regards, saludos

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

Re: Problem FW 12.01 with date()

Postby Maurizio » Thu Feb 16, 2012 7:31 am

Thanks Antonio :D

Maurizio
www.nipeservice.com
User avatar
Maurizio
 
Posts: 796
Joined: Mon Oct 10, 2005 1:29 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Ask Jeeves [Bot] and 74 guests