Harbour Ole error

Harbour Ole error

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

Re: Harbour Ole error

Postby Antonio Linares » Tue Apr 16, 2013 10:54 am

Richard,

Please try this:

Oevent:CustomProperties:Property:ID = anyvalue
regards, saludos

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

Re: Harbour Ole error

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

Re: Harbour Ole error

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

Re: Harbour Ole error

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

Re: Harbour Ole error

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

Re: Harbour Ole error

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

Re: Harbour Ole error

Postby ADutheil » 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
ADutheil
 
Posts: 368
Joined: Sun May 31, 2009 6:25 pm
Location: Salvador - Bahia - Brazil

Re: Harbour Ole error

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

Re: Harbour Ole error

Postby Antonio Linares » Tue Apr 16, 2013 4:02 pm

Richard,

Have you tried it this way ?

Oevent:CustomProperties:ID = anyvalue
regards, saludos

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

Re: Harbour Ole error

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

Re: Harbour Ole error

Postby Antonio Linares » Wed Apr 17, 2013 4: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42079
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Harbour Ole error

Postby Richard Chidiak » Wed Apr 17, 2013 6: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

:oops:

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 error

Postby Antonio Linares » Wed Apr 17, 2013 7:01 am

Richard,

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

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

Re: Harbour Ole error

Postby Maurizio » Wed Apr 17, 2013 7: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
User avatar
Maurizio
 
Posts: 824
Joined: Mon Oct 10, 2005 1:29 pm

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 72 guests