Harbour Ole syntax
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Harbour Ole syntax
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
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
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Harbour Ole syntax
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.
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.
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Re: Harbour Ole syntax
Antonio
it is not a method
it is a property (data)
Richard
it is not a method
it is a property (data)
Richard
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Harbour Ole syntax
Richard,
Then you should use:
oDayView:Showday = ::TPAR[04] but i get an error (ole error)
what Ole error you get ?
Then you should use:
oDayView:Showday = ::TPAR[04] but i get an error (ole error)
what Ole error you get ?
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Re: Harbour Ole syntax
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
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
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Harbour Ole syntax
What type of argument does it expect ?
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Re: Harbour Ole syntax
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
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
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Harbour Ole syntax
Richard,
Have you tried it this way ?
oDayView:Showday( ::TPAR[ 04 ], .F. )
Have you tried it this way ?
oDayView:Showday( ::TPAR[ 04 ], .F. )
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Re: Harbour Ole syntax
Antonio
oDayView:Showday( ::TPAR[ 04 ], .F. )
oDayView:Showday( ::TPAR[ 04 ], .t. )
Both have no effect as if they were completely ignored
Richard
oDayView:Showday( ::TPAR[ 04 ], .F. )
oDayView:Showday( ::TPAR[ 04 ], .t. )
Both have no effect as if they were completely ignored
Richard
- James Bott
- Posts: 4654
- Joined: Fri Nov 18, 2005 4:52 pm
- Location: San Diego, California, USA
- Contact:
Re: Harbour Ole syntax
Richard,
James
This says it is an object, not a date format. Can you find any info on a Date/time object?Parameters
Day
[in] Date\DteTime object specifying the date to show in the current view.
James
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: Harbour Ole syntax
Does this work?
oDayView:ShowDay( '#2013-10-10#' )
Note:
'#' + Transform( SToD( dDate ), "@R 9999-99-99" ) + '#' --> converts date to format accepted in ado / odbc
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
G. N. Rao.
Hyderabad, India
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Re: Harbour Ole syntax
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#
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#
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Re: Harbour Ole syntax
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
I have tried to set it as a date/time but no result
TTOS((STOT(DTOS(::TPAR[04]) + ::TPAR[03])) does not work
Richard
- nageswaragunupudi
- Posts: 8017
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: Harbour Ole syntax
May I ask, if this is working with xHarbour ?
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- Richard Chidiak
- Posts: 946
- Joined: Thu Oct 06, 2005 7:05 pm
- Location: France
- Contact:
Re: Harbour Ole syntax
yes working perfect with xharbour
:DayView:Showday(::TPAR[04]) tpar[04] is a date format
:DayView:Showday(::TPAR[04]) tpar[04] is a date format