FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Harbour Ole syntax
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
Harbour Ole syntax
Posted: Mon Jun 03, 2013 02:22 PM

Hello

I have a problem with Ole syntax concerning Harbour

with xharbour the syntax is

       <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->ayView:Showday(::TPAR[04])

This works ok, with Harbour , compile Ok but the action is not fired

i have tried

ayView:Showday = ::TPAR[04] but i get an error (ole error)

really puzzling how Harbour interacts with ole syntax...

as an example

:ViewType = PLANPREF->VUEDEBUT this is OK in harbour the above should in theory be the same .....

:TimeLineView:BackgroundColor = ( RGB(176, 216, 255) ) works ok also

Antonio any idea ?

Thanks

Richard

:D

http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Harbour Ole syntax
Posted: Mon Jun 03, 2013 03:21 PM

Richard,

The Harbour OLE implementation invokes different code in these cases:

oDayView:Showday(::TPAR[04]) // this invokes a method

oDayView:Showday = ::TPAR[04] but i get an error (ole error) // This assign a data

So first of all we need to know it is is a data or a method. Whats the ProgId of this activex ? Once you tell me, I can inspect it here using the utility that I recently published here.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
Re: Harbour Ole syntax
Posted: Mon Jun 03, 2013 04:03 PM

Antonio

it is not a method

it is a property (data)

Richard

http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Harbour Ole syntax
Posted: Mon Jun 03, 2013 04:15 PM

Richard,

Then you should use:

oDayView:Showday = ::TPAR[04] but i get an error (ole error)

what Ole error you get ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
Re: Harbour Ole syntax
Posted: Mon Jun 03, 2013 04:19 PM

This is the error

Error description: (DOS Error -2147352571) WINOLE/1006 Argument error: _SHOWDAY
Args:
[ 1] = D 03/06/2013

Stack Calls

Called from: => WIN_OLEAUTO:_SHOWDAY( 0 )

Richard

http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Harbour Ole syntax
Posted: Mon Jun 03, 2013 06:19 PM

What type of argument does it expect ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
Re: Harbour Ole syntax
Posted: Mon Jun 03, 2013 06:31 PM
2 arguments

first one date and the second boolean (default to set)

Public Sub ShowDay( _
ByVal Day As Date, _
Optional ByVal Select As Boolean = True _
)

Parameters
Day
[in] Date\DteTime object specifying the date to show in the current view.
Select
[in] True to select\highlight the date after showing the date. False to ow the date, but not select it.
Remarks

Example
[ShowDay Sample (Visual Basic)] This sample illustrates how to show a date it both day view and month view.

Dim d As Date
d = #10/10/2004#

'Show a date in Day view
CalendarControl.DayView.ShowDay d, True

'Show a date in Month View
CalendarControl.ViewType = xtpCalendarMonthView
CalendarControl.MonthView.ShowDay d, False
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Harbour Ole syntax
Posted: Mon Jun 03, 2013 08:32 PM

Richard,

Have you tried it this way ?

oDayView:Showday( ::TPAR[ 04 ], .F. )

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
Re: Harbour Ole syntax
Posted: Mon Jun 03, 2013 08:38 PM

Antonio

oDayView:Showday( ::TPAR[ 04 ], .F. )

oDayView:Showday( ::TPAR[ 04 ], .t. )

Both have no effect as if they were completely ignored

Richard

http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Harbour Ole syntax
Posted: Tue Jun 04, 2013 02:03 AM
Richard,

Parameters
Day
[in] Date\DteTime object specifying the date to show in the current view.


This says it is an object, not a date format. Can you find any info on a Date/time object?

James
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Harbour Ole syntax
Posted: Tue Jun 04, 2013 05:24 AM

Does this work?
oDayView:ShowDay( '#2013-10-10#' )

Note:
'#' + Transform( SToD( dDate ), "@R 9999-99-99" ) + '#' --> converts date to format accepted in ado / odbc

Regards



G. N. Rao.

Hyderabad, India
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
Re: Harbour Ole syntax
Posted: Tue Jun 04, 2013 05:32 AM

unfortunately no

it definitely is expectig a "date format" , here we send a character string

Error description: (DOS Error -2147352571) WINOLE/1007 Argument error: SHOWDAY
Args:
[ 1] = C #2013-10-10#

http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
Re: Harbour Ole syntax
Posted: Tue Jun 04, 2013 05:34 AM

James

I have tried to set it as a date/time but no result

TTOS((STOT(DTOS(::TPAR[04]) + ::TPAR[03])) does not work

Richard

http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Harbour Ole syntax
Posted: Tue Jun 04, 2013 05:42 AM

May I ask, if this is working with xHarbour ?

Regards



G. N. Rao.

Hyderabad, India
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
Re: Harbour Ole syntax
Posted: Tue Jun 04, 2013 05:47 AM

yes working perfect with xharbour

ayView:Showday(::TPAR[04]) tpar[04] is a date format

:D

http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013