Code: Select all
create invisible stack "2"
PS
This happens in my code and could be a problem I create with some logical error in some statement.
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Code: Select all
create invisible stack "2"
Code: Select all
ask "which stack?"
-- user enters "2"
go stack "XYZ" && it
And they can also move the file...What's more the user can change the name of the stack in the Finder
Thank you Jacque, this solves the problem when the file is saved on disk, but remains a problem: I have not control over what the user does in Finder with its stack files...jacque wrote:The script can check the name the user enters and if it is a single integer, put up a second dialog telling them that the name must include at least one alphabetic character.
A second method would be for the script to add its own identifier. So if the user enters 2, the script would name the stack "file 2". If you want, you can also set the stack label to "2" so the user doesn't know about it.
The file name of a stack file need not be the same as the names of the mainstack and any substacks within it.Mag wrote:My problem is with documents that the user creates (which can be open it with a double click on the Finder)...
Thank you. Actually the stack names ar unique (I check and don't open two stacks files with the same name). The problem appears when I use a number as stack name. Can I refer to a stack with its fulmpath on disk to read its propertyes?FourthWorld wrote:The file name of a stack file need not be the same as the names of the mainstack and any substacks within it.Mag wrote:My problem is with documents that the user creates (which can be open it with a double click on the Finder)...
If you need to ensure unique names for stack objects within a stack file you might consider the UUID function.