Harbour Ole syntax

Harbour Ole syntax

Postby Richard Chidiak » Mon Jun 03, 2013 2:22 pm

Hello

I have a problem with Ole syntax concerning Harbour

with xharbour the syntax is

:DayView:Showday(::TPAR[04])

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

i have tried

:DayView: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
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: Harbour Ole syntax

Postby Antonio Linares » Mon Jun 03, 2013 3: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41366
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Harbour Ole syntax

Postby Richard Chidiak » Mon Jun 03, 2013 4: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
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: Harbour Ole syntax

Postby Antonio Linares » Mon Jun 03, 2013 4: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
User avatar
Antonio Linares
Site Admin
 
Posts: 41366
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Harbour Ole syntax

Postby Richard Chidiak » Mon Jun 03, 2013 4: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
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: Harbour Ole syntax

Postby Antonio Linares » Mon Jun 03, 2013 6:19 pm

What type of argument does it expect ?
regards, saludos

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

Re: Harbour Ole syntax

Postby Richard Chidiak » Mon Jun 03, 2013 6: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
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: Harbour Ole syntax

Postby Antonio Linares » Mon Jun 03, 2013 8:32 pm

Richard,

Have you tried it this way ?

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

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

Re: Harbour Ole syntax

Postby Richard Chidiak » Mon Jun 03, 2013 8: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
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: Harbour Ole syntax

Postby James Bott » Tue Jun 04, 2013 2: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Harbour Ole syntax

Postby nageswaragunupudi » Tue Jun 04, 2013 5: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
User avatar
nageswaragunupudi
 
Posts: 10295
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Harbour Ole syntax

Postby Richard Chidiak » Tue Jun 04, 2013 5: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
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: Harbour Ole syntax

Postby Richard Chidiak » Tue Jun 04, 2013 5: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
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Re: Harbour Ole syntax

Postby nageswaragunupudi » Tue Jun 04, 2013 5:42 am

May I ask, if this is working with xHarbour ?
Regards

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

Re: Harbour Ole syntax

Postby Richard Chidiak » Tue Jun 04, 2013 5:47 am

yes working perfect with xharbour

:DayView:Showday(::TPAR[04]) tpar[04] is a date format
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Enrico Maria Giordano and 35 guests