news |
info |
people |
software |
stuff |
Version XFCN. Version 1.1d1, by Sam Deane. Copyright ©1994 ULTRALAB. Compiled 16:59:30, 28/04/94.
The top of the info window looks something like this
<filename>
<about group of files>
Kind: <kind of file>
Size: <size of file>
Where: <full file path>
Created: <date that file was created>
Modified: <date that file was last updated>
Version: <about this file>
The Version XFCN allows you to get and set the value of the <about group of files> and <about this file> entries. It also allows you to get and set a number of other fields which exist within the VERS resources, but which are not directly used by the Finder.
The XFCN operates on the current stack.
To get the version number of a particular stack, you could use the following handler:
function StackVersion name
-- don't let anyone see where we're going!
lock screen
set the lockRecent to true
set the lockMessages to true
-- remember where we are and go to stack we're interested in
push this card
go stack name
-- do the version stuff...
get Version()
-- put things back as they were
pop card
set the lockMessages to false
set the lockRecent to false
unlock screen
-- return the version stuff
return theStuff
end StackVersion
A similar handler could be used to set the version number of a stack.
get Version("numbers",<place> { ,<value>})
The <place> parameter should be either "stack" or "group", depending on which resource you want to change.
If the XFCN is called without the optional <value> parameter, it sets the resource to the new value. If the XFCN is called without the <value> parameter, it just returns the current value of the resource.
Version numbers are specified in the standard apple format which I have interpreted as: <major>.<minor> {.<bug fix>} {<status> <build>}
For example:
1.0 release 1
1.1 release with minor changes from 1.0
1.1.1 release fixing bugs in 1.1
1.0d23 development build 23
1.0a21 alpha build 21
1.0b3 beta build 3
on mouseUp get Version(numbers,stack) answer "The version of this stack is:" & it end mouseUp
get Version("country",<place> { ,<value>})
The <place> parameter should be either "stack" or "group", depending on which resource you want to change.
If the XFCN is called without the optional <value> parameter, it sets the code to a new value. If the XFCN is called without the <value> parameter, it just returns the current value.
on mouseUp get Version(country,stack) answer "The country code for this stack is:" & it end mouseUp
get Version("about",<place> { ,<value>})
The <place> parameter should be either "stack" or "group", depending on which resource you want to change.
If the XFCN is called without the optional <value> parameter, it sets the resource to the new value. If the XFCN is called without the <value> parameter, it just returns the current value of the resource.
on mouseUp get Version(about,stack) answer "The about string for this stack is:" & it end mouseUp