Page 1 of 2
Harbour Ole error
Posted:
Tue Apr 16, 2013 10:40 am
by Richard Chidiak
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,
Re: Harbour Ole error
Posted:
Tue Apr 16, 2013 10:54 am
by Antonio Linares
Richard,
Please try this:
Oevent:CustomProperties:Property:ID = anyvalue
Re: Harbour Ole error
Posted:
Tue Apr 16, 2013 11:04 am
by Richard Chidiak
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
Richard
Re: Harbour Ole error
Posted:
Tue Apr 16, 2013 11:07 am
by Antonio Linares
Richard,
What compiler error you get when compiling this ?
Oevent:CustomProperties:Property("ID") = anyvalue
Have you tried this ?
Oevent:CustomProperties:Property[ "ID" ] = anyvalue
thanks
Re: Harbour Ole error
Posted:
Tue Apr 16, 2013 11:13 am
by Richard Chidiak
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
Re: Harbour Ole error
Posted:
Tue Apr 16, 2013 11:28 am
by Antonio Linares
Richard,
I already made the question in the Harbour devel list on Google groups:
https://groups.google.com/forum/?fromgroups=#!topic/harbour-devel/zAwtkXC12Y4Lets see what they say
thanks
Re: Harbour Ole error
Posted:
Tue Apr 16, 2013 11:31 am
by Richard Chidiak
Antonio,
Thank you
Keep us posted with the result,
Tim and i are very interested
Regards,
Re: Harbour Ole error
Posted:
Tue Apr 16, 2013 11:45 am
by ADutheil
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
Re: Harbour Ole error
Posted:
Tue Apr 16, 2013 12:04 pm
by Richard Chidiak
André
oTemp1:Property("ID") won't compile , it is a problem with harbour, as soon as there is
xxx(" ") 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
Re: Harbour Ole error
Posted:
Tue Apr 16, 2013 4:02 pm
by Antonio Linares
Richard,
Have you tried it this way ?
Oevent:CustomProperties:ID = anyvalue
Re: Harbour Ole error
Posted:
Tue Apr 16, 2013 5:43 pm
by Richard Chidiak
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
Re: Harbour Ole error
Posted:
Wed Apr 17, 2013 4:26 am
by Antonio Linares
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
Re: Harbour Ole error
Posted:
Wed Apr 17, 2013 6:42 am
by Richard Chidiak
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
Re: Harbour Ole error
Posted:
Wed Apr 17, 2013 7:01 am
by Antonio Linares
Richard,
So that code never worked with xHarbour, right ?
Re: Harbour Ole error
Posted:
Wed Apr 17, 2013 7:02 am
by Maurizio
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