Hi Raju,

I don't see any evidence (in OL code or examples) that 
LzBrowserKernel.getVersion() is ever used as a floating point number.  In 
general, it's a string, it only happens to look like a floating point number 
for SWF.  And I agree with you, we should return all the numbers.

- Don

On Jul 21, 2011, at 12:09 PM, Raju Bitter wrote:

> One additional question: do you use the value of
> LzBrowserKernel.getVersion() as a floating point number? If that's the
> case, the change might break some functionality.
> 
> On Thu, Jul 21, 2011 at 1:51 PM, Raju Bitter
> <[email protected]> wrote:
>> With that change, you would LzBrowserKernel.getVersion() would return
>> '10.3.181.34'
>> 
>> You need to return the last digits ".34" as well, since the first
>> three version numbers ("10.3.181") are not sufficient to identify the
>> version of Flash Player used.
>> 
>> List of Flash Player releases matching the string "10.3.181":
>> Flash Player 10.3.181.34 (75.7 MB)
>> Flash Player 10.3.181.26 (75.6 MB)
>> Flash Player 10.3.181.22 (75.7 MB)
>> Flash Player 10.3.181.16 (6.3 MB)
>> Flash Player 10.3.181.14 (70.5 MB)
>> 
>> http://kb2.adobe.com/cps/142/tn_14266.html
>> 
>> On Thu, Jul 21, 2011 at 1:47 PM, Raju Bitter
>> <[email protected]> wrote:
>>> The Flash Player I have installed on my system has the version number
>>> "MAC 10,3,181,34". That's the value of
>>> flash.system.Capabilities.version.
>>> 
>>> LzBrowserKernel.getVersion() returns '10.181', which means the minor
>>> version is not returned. The code to parse the version information is:
>>> 
>>> /**
>>>  * Returns version information about the browser
>>>  */
>>> static function getVersion () :String {
>>>    if (!LzBrowserKernel._ver) {
>>>        var o:Array = Capabilities.version.split(' ');
>>>        LzBrowserKernel._os = o[0];
>>>        o = o[1].split(',');
>>>        LzBrowserKernel._ver = String(Number(o[0] + '.' + o[2]));
>>>    }
>>>    return LzBrowserKernel._ver;
>>> }
>>> 
>>> When assembling the version number, the send item of the array "o" is
>>> not added to the string.
>>>  LzBrowserKernel._ver = String(Number(o[0] + '.' + o[2]));
>>> 
>>> Instead you should do:
>>> /**
>>>  * Returns version information about the browser
>>>  */
>>> static function getVersion () :String {
>>>    if (!LzBrowserKernel._ver) {
>>>        var o:Array = Capabilities.version.split(' ');
>>>        LzBrowserKernel._os = o[0];
>>>        LzBrowserKernel._ver = o[1].replace( new RegExp(",", "g"), ".");
>>>    }
>>>    return LzBrowserKernel._ver;
>>> }
>>> 
>> 
> 


--

Don Anderson
Java/C/C++, Berkeley DB, systems consultant

voice: 617-306-2057
email: [email protected]
www: http://www.ddanderson.com
blog: http://libdb.wordpress.com





Reply via email to