Alaska Software Inc. - Re: Pickdate issue on Xbas++ 2.0
Username: Password:
AuthorTopic: Re: Pickdate issue on Xbas++ 2.0
Claudio Driussi Pickdate issue on Xbas++ 2.0
on Fri, 31 Aug 2018 17:08:13 +0200
I'm using the attached pickdate function from many years with
Xbase++ 1.9 and all works fine.

Now with Xbase++ 2.0 I get an error "Parameter has a wrong data type"
on XbpBrowse:down() method if the date don't falls in the first row.

But if I comment out the row 108 it works, but the cursor is not
positioned in the right cell.

Seems that the first time i call XbpBrowse:down() method some
internal data is not properly set.

Some one can help me?

P.S. Yes I know there is the XbpDatePicker class, but I used
the mine for many years and it works fine and it have less
dependences

Best regards.
Claudio


pickdate.zip
Andreas Gehrs-Pahl
Re: Pickdate issue on Xbas++ 2.0
on Fri, 31 Aug 2018 12:30:56 -0400
Claudio

The reason for the error is that the Browse is (still) hidden when you call 
the :Up() or :Down() methods. Either move your call to BrowSkip() below the 
oBrowse:Show() or put an oBrowse:Show() before that call.

Hope that helps,

Andreas

Andreas Gehrs-Pahl
Absolute Software, LLC

phone: (989) 723-9927
email: Andreas@AbsoluteSoftwareLLC.com
web:   http://www.AbsoluteSoftwareLLC.com
[F]:   https://www.facebook.com/AbsoluteSoftwareLLC
Andreas Gehrs-Pahl
Re: Pickdate issue on Xbas++ 2.0
on Fri, 31 Aug 2018 16:52:33 -0400
Claudio

Alternatively, you can add the following line to your "GetBrowse()" 
function, before you call "oBrowse:Create()":

	oBrowse:NavigationMode := XBPBRW_NAVIGATION_1XCOMPATIBLE

This will also fix it.

Andreas

Andreas Gehrs-Pahl
Absolute Software, LLC

phone: (989) 723-9927
email: Andreas@AbsoluteSoftwareLLC.com
web:   http://www.AbsoluteSoftwareLLC.com
[F]:   https://www.facebook.com/AbsoluteSoftwareLLC
Claudio Driussi Re: Pickdate issue on Xbas++ 2.0
on Sat, 01 Sep 2018 10:35:54 +0200
Il 31/08/2018 18:30, Andreas Gehrs-Pahl ha scritto:

> The reason for the error is that the Browse is (still) hidden when you call
> the :Up() or :Down() methods. Either move your call to BrowSkip() below the
> oBrowse:Show() or put an oBrowse:Show() before that call.

Thanks very much, it works!

Claudio


PickDate.png