Problem with datepick - Resolved -

Problem with datepick - Resolved -

Postby Silvio.Falconi » Tue Mar 26, 2024 12:42 pm

give me an error when I try to select a date



Code: Select all  Expand view
@ nRow, 70 DTPICKER  aGet[1] VAR ddatacambio OF oDlgSub SIZE 198, 25 PIXEL ;
      FONT oFont UPDATE PICTURE "ddd dd mmm yyyy"  ;
     VALID ( DoSwitch( ddatacambio, oBtnGetExchange) ) STYLE DTS_SHOWNONE

 @ nRow-0.2,  320 BTNBMP oBtnGetExchange ;
              PROMPT "Aggiorna on line"  OF oDlgSub;
              SIZE 120, 24 PIXEL FLAT GDIPLUS ;
              BITMAP "BTN_INTERNET"    LEFT NOROUND ;
              ACTION nil

STATIC FUNCTION DoSwitch( ddatacambio, oBtnGetExchange  )
LOCAL dDate := ddatacambio:GetDate()
LOCAL cDate := DTOC(dDate)

   IF EMPTY(cDate)
      oBtnGetExchange:Disable()
   ELSE
      oBtnGetExchange:enable()
   ENDIF
   oBtnGetExchange:Refresh()
RETURN .T.


I must activate a btnbmp if the date is valid

the error

Code: Select all  Expand view
  Time from start: 0 hours 0 mins 10 secs
   Error occurred at: 26-03-2024, 13:35:13
   Error description: Error BASE/1004  Metodo non disponibile: GETDATE
   Args:
     [   1] = D   26-03-2024

Stack Calls
===========
   Called from: source\Pvalute.prg => GETDATE( 0 )
   Called from: source\Pvalute.prg => DOSWITCH( 1134 )
   Called from: source\Pvalute.prg => (b)EDIT_STORICO( 1085 )
Last edited by Silvio.Falconi on Tue Mar 26, 2024 4:21 pm, edited 3 times in total.
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6768
Joined: Thu Oct 18, 2012 7:17 pm

Re: Problem with datepick

Postby nageswaragunupudi » Tue Mar 26, 2024 12:47 pm

Code: Select all  Expand view
LOCAL dDate := ddatacambio:GetDate()
 



Here is the mistake.
"ddatacambio" is a date value and date value can not have any method.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Problem with datepick

Postby Silvio.Falconi » Tue Mar 26, 2024 1:07 pm

nageswaragunupudi wrote:
Code: Select all  Expand view
LOCAL dDate := ddatacambio:GetDate()
 



Here is the mistake.
"ddatacambio" is a date value and date value can not have any method.


opps - corrected
STATIC FUNCTION DoSwitch( ddatacambio, oBtnGetExchange,aGet )
LOCAL dDate := aget[1]:GetDate()
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 6768
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 60 guests