Page 2 of 2
Re: Make Stack Name = New Stack FileName
Posted: Sat Dec 28, 2024 5:30 pm
by richmond62
Great Compromise!

Re: Make Stack Name = New Stack FileName
Posted: Sat Dec 28, 2024 5:35 pm
by tperry2x
Okay, glad that's worked out.
If you manually check for updates and re-download last update, it'll be the new version.

Re: Make Stack Name = New Stack FileName
Posted: Sat Dec 28, 2024 5:48 pm
by TerryL
After a trial, I don't care for the naming dialog. Count me in the "no" column.
The revIDELibrary method names the file and stack simultaneously ensuring they're the same with a 6-line fix that's fast and effective, eliminating the need for an extra naming dialog. It's what other programs do. Give it a try.
in stack "RevIDELibrary", at about line 7597, in Toolset > Libraries:
Code: Select all
# Check if the stack has a filename. IF not, redirect to save as
if the effective filename of stack tStackName is empty then
revIDEActionSaveStackAs the long ID of stack tStackName
--add the following code--------------
set the itemDel to slash
get item -1 of the effective filename of stack tStackName --short name.extention
if it <> empty then --user entered a name
set the itemDel to "."
set the name of stack tStackName to item 1 of it --short name
end if
--end add---------------------
exit revIDESaveStack
end if
Re: Make Stack Name = New Stack FileName
Posted: Sat Dec 28, 2024 6:32 pm
by tperry2x
TerryL wrote: ↑Sat Dec 28, 2024 5:48 pm
After a trial, I don't care for the naming dialog. Count me in the "no" column.
in stack "RevIDELibrary", at about line 7597, in Toolset > Libraries
Edit: Got you, and I added a couple of small tweaks (credited you for this though):
Code: Select all
-- terryL's script for renaming the stack on save
put the itemDelimiter into tOldDelim
set the itemDelimiter to slash
get item -1 of the effective filename of stack tStackName --short name.extention
if it <> empty then --user entered a name
set the itemDel to "."
if the title of stack tStackName is "" then set the title of stack tStackName to item 1 of it
set the name of stack tStackName to item 1 of it --short name
end if
set the itemDelimiter to tOldDelim
-- end terryL's script (28-12-24)
This way, it sets the title of the stack too (if it's empty) - no more * on stack titles (if the user hasn't set one).
It also restores the itemDelimiter to whatever it was before this bit of script runs.
Re: Make Stack Name = New Stack FileName
Posted: Sat Dec 28, 2024 9:38 pm
by tperry2x
I've also made the rename on new stack a prefs setting. So those who like it can turn it on, those who don't can leave it off. (default is off)

- prompt-rename.png (36.63 KiB) Viewed 613 times
If you manually check for updates and re-download last update, it'll be the new version.
Oh, almost forgot: I also added the check for curl (in case you run the updater on a linux distro without it). Thanks Richmond. (Still can't work out why Xubuntu doesn't include this).
Re: Make Stack Name = New Stack FileName
Posted: Tue Dec 31, 2024 8:16 pm
by TerryL
Herding cats would be easier than satisfying opinionated puds like me. I don't know how you do it. Thanks tperry.