--- In [email protected], "Sheri" <sheri...@...> wrote:
> > now FLOAT or DOUBLE returned as a handle to a real, needing ftos
> > to decode:
> > 
> > objApp.width = 730
> > win.debug(ftos(objApp.width))
> > objApp.width = 630.5
> > win.debug(ftos(objApp.width))
> > 
> > However, is that a good idea? In some cases stuff coming back as
> > double/float might mostly be integers (e.g. 34.0), in which case
> > let user decide if they want to convert to real or not? 
> 
> I don't think com has any type called FLOAT. Otherwise which app and property 
> uses it?

No idea, but the releavant value of a VARIANT's vt member is VT_R4 (4-byte 
real): 

http://msdn.microsoft.com/en-us/library/ms221170.aspx
 
> With comPlugin0.72_091211 I can generally set and get the same value for 
> InDesign.ScriptPreference.Version property. Prior to this version I could 
> not. 

Good.

Not all values work. E.g., 4.0, 4.5 and 4.25 work; 4.01 does not -- setting to 
4.01 gives ERROR: com.set_property: Invoke failed  (sys code 80020009: 
"Exception occurred."

That's odd.
 
> Maybe Excel is just weird (I tried the following using VBScript and got 
> similar results). With Excel, I can't seem to get back what I put in for 
> Doubles.
> 
> width set to 730, retrieves after ftos: 729.6
> width set to 630.5, retrieves after ftos: 630

Yeah, I got similar results.
 
> After changing Excel's StandardFontSize, docs say you need to restart Excel 
> before change takes effect. After restarting and creating a new workbook, it 
> is apparent that the StandardFontSize did change to the exact size that was 
> set (as long as it was xx.0 or xx.5), and the size is visible in the Toolbar 
> Font Size. But if I retrieve and ftos the StandardFontSize, it is only 
> correct if it was set to an even number. If set to xx.5 it consistently 
> returns as 2! But, same with VBScript and via msgbox executed in Excel's VBA 
> Immediate window.

Guess it's broken.

I'll continue fiddling with default get/set methods next week.




Reply via email to