View Single Post
Quote:
Originally Posted by amelchi View Post
"Non posso trasformare \"1.2\" nel tipo number." number -1700 from "1.2" to number
FT's version number string is "1.2" and Applescript is playing the innocent and claiming that it can only recognise "1,2" while its international settings are Italian :-)

Fair enough - a good Xmas puzzle ...

Perhaps we can gently explain to the Applescript interpreter that the "." is an exotic Anglo-Saxon translation of the second character in a decimal representation of Pi ?

Could you replace the IsDev() function with the code below and test it for me ?
If it works I'll put it into version 19, though I suppose that the numbers of those using FoldingText 1.0 are probably small now :-)

Have a good holiday !

Rob

Code:
on IsDev()
	set strLocalSeparator to (text 2 of (pi as string))
	
	tell application "FoldingText"
		set strVersion to version
		set {dlm, my text item delimiters} to {my text item delimiters, "."}
		set lstParts to text items of strVersion
		set my text item delimiters to strLocalSeparator -- local number separator
		set strVersion to lstParts as string
		set my text item delimiters to dlm
		
		return (strVersion as number) > 1
	end tell
end IsDev