• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
System Events version bug
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

System Events version bug


  • Subject: System Events version bug
  • From: Luther Fuller <email@hidden>
  • Date: Tue, 14 Oct 2008 16:21:29 -0500

There seems to be a bug with System Events 'version' property. (10.5.5)
Using this source code, compile an application bundle with version = 1 in the bundle's Get Info window.
Place the bundle in a sub-folder named "version 1"


on run
	display dialog my titleAndVersion()
end run ----------------------------------------------------

on titleAndVersion()
set selfRef to (path to me)
set AppleScript's text item delimiters to {"."}
tell application "System Events"
(text item 1 of ((get name of selfRef) as text)) & space & (get version of selfRef)
end tell
return the result
end titleAndVersion ---------------------------------------------


Do it again, but with version = 2, then place the bundle in a sub- folder named "version 2".

The System Events dictionary says ...

alias n, pl aliases [inh. disk item > item] : An alias in the file system
elements
contains aliases, disk items, files, file packages, folders, items; contained by aliases, disks, file packages, folders, application.
properties
...
version text, r/o : the version of the application bundle referenced by the alias (visible at the bottom of the "Get Info" window)


So we can expect that '(get version of selfRef)' will return the data in the Get Info window.

Perform this experiment:
1. Option-drag (copy) version 1 into the outer folder; Double-click it; The dialog should say version 1.
2. Option-drag (copy) version 2 into the outer folder; Click Replace; Double-click it;
The dialog should say version 2 ... but it doesn't. It says version 1.
3. Restart
4. Now the version 2 dialog correctly says version 2.


If you run the bundles in the sub-folders, you will always get the correct result.
You HAVE to copy and replace to get this bug.


_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Prev by Date: Re: Read for 1000 until nearest space? - Almost
  • Next by Date: "To the power of"
  • Previous by thread: Re: Read for 1000 until nearest space? - Almost
  • Next by thread: "To the power of"
  • Index(es):
    • Date
    • Thread