Page 2 of 2
Re: Harbour Ole error
Posted: Wed Apr 17, 2013 7:37 am
by hua
Maurizio,
This is just pure hunch but could you test with oPdfApp:cOption:AutoSaveDirectory := "C:\TEMP"
Re: Harbour Ole error
Posted: Wed Apr 17, 2013 8:11 am
by Enrico Maria Giordano
Antonio Linares wrote:Richard,
Przemek talked (in his usual style

)
That attitude is exactly the reason why I dropped Harbour.
EMG
Re: Harbour Ole error
Posted: Wed Apr 17, 2013 8:17 am
by Richard Chidiak
Antonio
it is working with xharbour since 2 years
oevent:CustomProperties:Property( "id", cid ) this is the xharbour syntax
with this we set the property of ("id") to the value CID
In theory wirh Harbour we should write oevent:CustomProperties:Property( "id") = cid but the compiler does not allow..
at the moment i have no way of doing the same in harbour
still searching for an alternative way , unfortunately this information (event id) is the key of all the control....
Thanks for help,
Richard
Re: Harbour Ole error
Posted: Wed Apr 17, 2013 8:21 am
by Antonio Linares
Richard,
What error do you get with this in Harbour ?
oevent:CustomProperties:Property( "id", cid )
Re: Harbour Ole error
Posted: Wed Apr 17, 2013 8:26 am
by Richard Chidiak
Antonio
This is the error
Error description: (DOS Error -2147352562) WINOLE/1007 Argument error: PROPERTY
Args:
[ 1] = C id
[ 2] = C 000000000342
Stack Calls
===========
Called from: => TOLEAUTO:PROPERTY( 0 )
Richard
Re: Harbour Ole error
Posted: Wed Apr 17, 2013 11:41 am
by ADutheil
Richard,
Have a try this way:
Re: Harbour Ole error
Posted: Wed Apr 17, 2013 12:27 pm
by Richard Chidiak
I had tried it , it does not work
Error description: (DOS Error -2147352570) WINOLE/1008 No exported variable: ID
Args:
[ 1] = C 000000000342
it really is looking for the properties of "id"
Thanks for the suggestion,
Re: Harbour Ole error
Posted: Wed Apr 17, 2013 12:35 pm
by Lautaro
Hello,
This doc is in olecore.c in harbour/contrib/hbwin :
-------------------------------------------------
VBScript and Harbour syntax and IDispatch:Invoke() usage differences
VBScript syntax dispid DISPATCH_* flags argcnt | Harbour syntax :Invoke parameters
================================================================+=======================================
obj DISPID_VALUE METHOD+PROPERTYGET 0 | Same :Invoke is not used
obj() DISPID_VALUE METHOD 0 | Not supported
obj(param) DISPID_VALUE METHOD+PROPERTYGET 1 | obj[param] Same
obj.name name METHOD+PROPERTYGET 0 | Same, =obj.name() Same
obj.name() name METHOD 0 | Same, =obj.name flags=METHOD+PROPERTYGET
obj.name(param) name METHOD+PROPERTYGET 1 | Same Same
|
obj = value obj reassigned, :Invoke is not used | Same
obj() = value DISPID_VALUE PROPERTYPUT 1 | Not supported
obj(param) = value DISPID_VALUE PROPERTYPUT 2 | obj[param] = value
obj.name = value name PROPERTYPUT 1 | Same Same
obj.name() = value name PROPERTYPUT 1 | Not supported, use obj.name = value
obj.name(param) = value name PROPERTYPUT 2 | Not supported, workaround obj._name(param, value)
------------------------------------------------------------------
bye,
Lautaro
Re: Harbour Ole error
Posted: Wed Apr 17, 2013 12:50 pm
by Antonio Linares
Richard,
Have you tried this ?
obj.name(param) = value name PROPERTYPUT 2 | Not supported, workaround obj._name(param, value)
this one: Notice the "_"
obj:_name(param, value)
Re: Harbour Ole error
Posted: Wed Apr 17, 2013 1:00 pm
by Maurizio
obj.name(param) = value name PROPERTYPUT 2 | Not supported, workaround obj._name(param, value)
In effects
I found this in : C:\Harbour\contrib\hbwin\tests\pdfcreat.prg
with Harbour
oPC:_cOption( "AutosaveDirectory", "c:\temp" )
oPC:_cOption( "AutosaveFilename", "pdfcreat.pdf" )
with xHarbour
oPC:cOption( "AutosaveDirectory", "c:\temp" )
oPC:cOption( "AutosaveFilename", "pdfcreat.pdf" )
Maurizio
Re: Harbour Ole error
Posted: Wed Apr 17, 2013 1:05 pm
by Richard Chidiak
Lautaro
Thanks a lot, now i have it working
the correct syntax is
oevent:customproperties:_Property("id",CID)Thanks to all who helped and a big thank to Antonio as usual
Richard