Jump to content
  • 0

Get ( SystemVersion ) -> fout


Peter Wagemans

Question

Posted

Ik gebruik

Substitute ( Get ( SystemVersion ) ; "," ; "." )

om in het login script een sessie record te maken, maar blijkbaar rapporteert FileMaker nog steeds OS X 10.4.9, terwijl die systemen al op 10.4.10 zitten.

 

Zowel op 9 als op oudere versies, dus ik veronderstel dat het een systeemsoftware bug is.

4 answers to this question

Recommended Posts

  • 0
Posted

Er is meer software dat hier een probleem mee heeft, geen enkele developer had ooit verwacht dat we verder zouden komen dan een .9 versie ;-)

 

Verdere uitleg, gevonden op internet:

 

"The initial three digits for "10.4.10" are the same as "10.4.1," an earlier release of Mac OS X 10.4 (Tiger). Since the "MAC_OS_X_VERSION_ACTUAL" string (used by Cocoa applications to determine the current OS version) can carry a maximum of four digits, Mac OS X 10.4.10 and and 10.4.1 are both labeled "1041."

  • 0
Posted

:lol:

Theorie: ik krijg "10.4.9" terug, dus hebben ze het maar op die manier voorlopig opgelost?

 

Via AppleScript is het al even erg:

tell application "Finder" to get system attribute "sysv"

-> 4169

 

4169 is een decimale vorm van 1049 in hex, en voila, hier zit 'm weer.

4170 had OK geweest, maar dan kreeg je 104A in hex, en misschien zit daar het probleem weer, dat kan je natuurlijk weer niet meer goed lezen.

Het probleem van de "digits" die geen letters kunnen zijn? Misschien.

 

Als je zo zit te prutsen met je versienummer, hoe is dan de rest van de software...? Grapje.

  • 0
Posted

Wacht, blijkbaar is het gedocumenteerd:

 

http://developer.apple.com/documentation/Carbon/Reference/Gestalt_Manager/Reference/reference.html

 

If the values of the minor or bug fix revision are larger than 9, then gestaltSystemVersion will substitute the value 9 for them. For example, Mac OS X 10.3.15 will be returned as 0x1039, and Mac OS X 10.10.5 will return 0x1095.

 

A better way to obtain version information in Mac OS X is to read the system version information from the following file:

 

/System/Library/CoreServices/SystemVersion.plist

 

 

Dus, als je de systeemversie correct wil weten, doe je:

defaults read /System/Library/CoreServices/SystemVersion ProductVersion

vanuit de command prompt, of je execute het via 1 of andere plug-in vanuit je FileMaker, bijvoorbeeld:

TrFile_ExecuteShell( "" ; "defaults read /System/Library/CoreServices/SystemVersion ProductVersion" )

 

Als je dan een mooie functie wil die het multiplatform doet:

Case (
Abs ( Get ( SystemPlatform ) ) = 2 ; Substitute ( Get ( SystemVersion ) ; "," ; "." ) ;
GetValue ( TrFile_ExecuteShell( "" ; "defaults read /System/Library/CoreServices/SystemVersion ProductVersion" ) ; 1 )
)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...