How do I read CFBundleVersion

In my applescript studio app i have this code - can anyone shed some light on how I do the same using the new ApplescriptObjC thanks…

if thename is “about” then
set the_main_bundle to call method “mainBundle” of class “NSBundle”
set app_version to call method “objectForInfoDictionaryKey:” of the_main_bundle with parameters {“CFBundleShortVersionString”}
set app_subversion to call method “objectForInfoDictionaryKey:” of the_main_bundle with parameters {“CFBundleVersion”}
set app_copyright to call method “objectForInfoDictionaryKey:” of the_main_bundle with parameters {“NSHumanReadableCopyright”}
set contents of text field “AppNameVersion” of window “about” to ((“Version " & app_version as string) & " (” & app_subversion as string) & “)”
set contents of text field “AppCopyright” of window “about” to app_copyright as string
show window “about”
end if

The easiest way is to make up a file called "Credits.rtf’ and include it in the bundle – the rest happens automatically. Otherwise you’re going to have to connect all the text fields to properties and use something like:

		set mainBundle to current application's class "NSBundle"'s mainBundle()
		set appVersion to mainBundle's objectForInfoDictionaryKey_("CFBundleShortVersionString")
                [...]
		someTextField's setStringValue_(appVersion)
                [...]

But is there some reason you’re not using the default about dialog? That doesn’t need any code, and includes all the strings your code is getting.

Thanks Shane that did the job,
The reason i’m displaying my own about box is I just wanted something a little fancier than the rtf file.