FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Harbour Ole error
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
Harbour Ole error
Posted: Tue Apr 16, 2013 10:40 AM

Good morning Antonio

Moving from xharbour to Harbour i still have one important problem that i can not fix related to Codejock.

As far as i can see , it is a Harbour problem,

I need to write the following :

Oevent:CustomProperties:Property("ID") = anyvalue

The compiler sadly rejects the syntax and i beleive it is a bug

Could you please raise to the harbour developpers ?

Thank you

Richard

PS : Harbour is much closer in Ole syntax to Vb or C and this is a good thing, still missing this compatibility

From Codejock documentation , we can write

NewEvent.CustomProperties.Property("String Value") = "Hello"

This should be possible with Harbour,

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 error
Posted: Tue Apr 16, 2013 10:54 AM

Richard,

Please try this:

Oevent:CustomProperties:Property:ID = anyvalue

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
Re: Harbour Ole error
Posted: Tue Apr 16, 2013 11:04 AM

Antonio

it does not work , i had tried it , it errors at execution

Error description: (DOS Error -2147352561) WINOLE/1007 Argument error: PROPERTY

Stack Calls

Called from: => TOLEAUTO:PROPERTY( 0 )

Unfortunately I think we need to write the code as mentionned Oevent:CustomProperties:Property("ID") = anyvalue

I have not found another solution :oops:

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 error
Posted: Tue Apr 16, 2013 11:07 AM

Richard,

What compiler error you get when compiling this ?

Oevent:CustomProperties:Property("ID") = anyvalue

Have you tried this ?

Oevent:CustomProperties:Property[ "ID" ] = anyvalue

thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
Re: Harbour Ole error
Posted: Tue Apr 16, 2013 11:13 AM

Antonio

Oevent:CustomProperties:Property("ID") = anyvalue gives the following error

C:\CBATI32\planninghrb.prg(838) Error E0022 Invalid lvalue ':'

Oevent:CustomProperties:Property[ "ID" ] = anyvalue errors at execution

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 error
Posted: Tue Apr 16, 2013 11:28 AM
Richard,

I already made the question in the Harbour devel list on Google groups:

https://groups.google.com/forum/?fromgroups=#!topic/harbour-devel/zAwtkXC12Y4

Lets see what they say :-)

thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
Re: Harbour Ole error
Posted: Tue Apr 16, 2013 11:31 AM

Antonio,

Thank you

Keep us posted with the result,

Tim and i are very interested

Regards, :D

http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
Posts: 368
Joined: Sun May 31, 2009 06:25 PM
Re: Harbour Ole error
Posted: Tue Apr 16, 2013 11:45 AM

I remember I had the same kind of problem with OLE+Excel. I solved by using intermediary objects. Something like:

oTemp1 := Oevent:CustomProperties
oTemp1:Property("ID") := anyvalue

Regards,



André Dutheil

FWH 13.04 + HB 3.2 + MSVS 10
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
Re: Harbour Ole error
Posted: Tue Apr 16, 2013 12:04 PM

André

oTemp1:Property("ID") won't compile , it is a problem with harbour, as soon as there is :xxxx(" ") the brackets cause the problem

i have a small work around but i prefer the fix , can hide other problems

my actual work around

Did := oevent + ':CustomProperties:Property("id")'
DID = anyvalue

but again you have to do this when retreiving the same data..... and this data is retreived in a lot of places...

A Harbour fix will be the best solution,

Merci quand même,

Regards

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 error
Posted: Tue Apr 16, 2013 04:02 PM

Richard,

Have you tried it this way ?

Oevent:CustomProperties:ID = anyvalue

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
Re: Harbour Ole error
Posted: Tue Apr 16, 2013 05:43 PM

Antonio

Yes

It does not work

i have tried almost all combinations , unfortunately not too much success

I guess we have to wait for harbour's dev team reply.

Setting a property for an element is an elementary option that will occur in many components.

it is a bug in the compiler, i am sure they will fix it (hopefully).

Last problem pending....

Regards,

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 error
Posted: Wed Apr 17, 2013 04:26 AM
Richard,

Przemek talked (in his usual style :-) ) and literaly said:

Oevent:CustomProperties:Property("ID") = anyvalue
it's the same as:
Oevent:CustomProperties:Property = anyvalue


Here you have his complete answer:
https://groups.google.com/d/msg/harbour-devel/zAwtkXC12Y4/bXJfQcc2dGMJ
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 946
Joined: Thu Oct 06, 2005 07:05 PM
Re: Harbour Ole error
Posted: Wed Apr 17, 2013 06:42 AM

Antonio

Despite Prezmek's clarification, unfortunately it does not work

Oevent:CustomProperties:Property = anyvalue compiles ok but gives an error at run time

Error description: (DOS Error -2147352561) WINOLE/1006 Argument error: _PROPERTY
Args:
[ 1] = C 000000000342

Stack Calls

Called from: => TOLEAUTO:_PROPERTY( 0 )

writing Oevent:CustomProperties:Property(anyvalue) does not give an error but does not set the property.... no way to retreive it

Richard

:oops:

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 error
Posted: Wed Apr 17, 2013 07:01 AM

Richard,

So that code never worked with xHarbour, right ? :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 842
Joined: Mon Oct 10, 2005 01:29 PM
Re: Harbour Ole error
Posted: Wed Apr 17, 2013 07:02 AM

Antonio
I have the same problem ( in xharbour it Works )

oPdfApp := CreateObject("PDFCreator.clsPDFCreator")
oPdfApp:cOption("AutoSaveDirectory", "C:\TEMP" )

Error description: (DOS Error -2147352562) WINOLE/1007 Parametro errato: COPTION

Maurizio