as you can see on this topic viewtopic.php?f=3&t=40344&sid=096b78133ff43210636e86df0f01f042#p240896
I inserted the piece of the two controls above a ribbonbar as created by Nages (changing only the position coordinates of the controls)
always makes me the same ERROR SETRANGE()
AT THIS LINE
@ 20,100 DTPICKER oDtpFirst VAR dFirst SIZE 200,28 PIXEL OF oGrS1 ;
PICTURE "ddd dd mmm yyyy" ;
ON CHANGE ( oDtpLast:SetRange( dFirst ), oGrS1:Update() ) UPDATE
oGrS1 ia group tab of the ribbonbar
- Code: Select all Expand view RUN
::oRebar := TRibbonBar():New(::oWndMain, aRbPrompts,,,,nAltezzaRibbon,30,,,,,,,,,,.T.,)
...
ADD GROUP oGrS1 RIBBON ::oRebar TO OPTION 1 WIDTH 625 PROMPT "Periodo da visualizzare"
@ 20,69 SAY "Dal:" SIZE 30,28 PIXEL OF oGrS1 FONT oFont TRANSPARENT
@ 20,310 SAY "al :" SIZE 30,28 PIXEL OF oGrS1 FONT oFont TRANSPARENT
@ 20,100 DTPICKER oDtpFirst VAR dFirst SIZE 200,28 PIXEL OF oGrS1 ;
PICTURE "ddd dd mmm yyyy" ;
ON CHANGE ( oDtpLast:SetRange( dFirst ), oGrS1:Update() ) UPDATE //
WITH OBJECT oDtpFirst
:lNoToday := .t.
:lNoTodayCircle := .t.
:SetRange( dStagioneMin, dStagioneMax )
END
@ 55, 100 ADD BUTTON oBtnDdate[1] ;
BITMAP aBtnfw[2] ;
GROUP oGrS1 SIZE 28,25;
ACTION ( dFirst--,oDtpFirst:refresh(), oDtpFirst:SetFocus() )
@ 55,275 ADD BUTTON oBtnDdate[2] ;
BITMAP aBtnfw[1] ;
GROUP oGrS1 SIZE 28,25;
ACTION ( dFirst++,oDtpFirst:refresh(), oDtpFirst:SetFocus() )
oBtnDdate[1]:ocursor :=oHand
oBtnDdate[2]:ocursor :=oHand
@ 20,340 DTPICKER oDtpLast VAR dLast SIZE 200,28 PIXEL OF oDlg ;
PICTURE "ddd dd mmm yyyy" UPDATE //ON CHANGE ( oDlg:Update(),oBrowse:refresh())
WITH OBJECT oDtpLast
:lNoToday := .t.
:lNoTodayCircle := .t.
:SetRange( dFirst,dStagioneMax )
END
@ 55,340 ADD BUTTON oBtnDdate[3] ;
BITMAP aBtnfw[2] ;
GROUP oGrS1 SIZE 28,25;
ACTION ( dLast--,oDtpLast:refresh(), oDtpLast:SetFocus() )
@ 55,515 ADD BUTTON oBtnDdate[4] ;
BITMAP aBtnfw[1] ;
GROUP oGrS1 SIZE 28,25;
ACTION ( dLast++,oDtpLast:refresh(), oDtpLast:SetFocus() )
oDtpLast:bchange := { || SetDates( dFirst, dLast, lShowNumeri, lshowPagamenti )}
oBtnDdate[3]:ocursor :=oHand
oBtnDdate[4]:ocursor :=oHand
I also check if there is an error on dates and I insert on source
dFirst := {^ 2021/04/08 }
dLast := {^ 2021/04/08 }
now I don't understand why in the dialog function and in the ribbonbar it doesn't work as is possible ??????
it is as if first it cannot bchange oDtpFirst exiting with an error to SetRange ()
the error.log
- Code: Select all Expand view RUN
- Application
===========
Path and name: C:\Work\Prg\Prenotazioni\WinBeach.Exe (32 bits)
Size: 7,182,848 bytes
Compiler version: Harbour 3.2.0dev (r1904111533)
FiveWin version: FWH 21.02
C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)
Windows version: 6.1, Build 7601 Service Pack 1
Time from start: 0 hours 0 mins 5 secs
Error occurred at: 13-05-2021, 09:03:18
Error description: Error BASE/1004 Metodo non disponibile: SETRANGE
Args:
[ 1] = U
[ 2] = D 08-04-2021
Stack Calls
===========
Called from: => SETRANGE( 0 )
Called from: source\sistema\main.prg => (b)TAPPLICATION_BUILDRIBBONBAR( 868 )
Called from: .\source\classes\TDTPICKE.PRG => TDATEPICK:CHANGE( 454 )
Called from: .\source\classes\TDTPICKE.PRG => TDATEPICK:_CTEXT( 396 )
Called from: .\source\classes\TDTPICKE.PRG => TDATEPICK:NEW( 180 )
Called from: source\sistema\main.prg => TAPPLICATION:BUILDRIBBONBAR( 868 )
Called from: source\sistema\main.prg => TAPPLICATION:NEW( 413 )
Called from: source\sistema\main.prg => MAIN( 64 )
If I rem that line I wrote above and insert this line
oDtpFirst:bchange := { ||( oDtpLast:SetRange( dFirst ), oGrS1:Update() ) }
at the end before of oDtpLast:bchange := { || SetDates( dFirst, dLast, lShowNumeri, lshowPagamenti )}
not make error , I's very very strange
a solution please