You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 31, 2021. It is now read-only.
Copy file name to clipboardExpand all lines: Toolset/libraries/revidelibrary.8.livecodescript
+26-18Lines changed: 26 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -5111,6 +5111,27 @@ private on __setPropertyOfObject pObject, pProperty, pValue
5111
5111
5112
5112
end__setPropertyOfObject
5113
5113
5114
+
functionideCheckStackName pName
5115
+
ifchar1to3ofpNameis"rev"then
5116
+
answer warning revIDELocalise("Using rev in the first three characters of a stack name is reserved for use by the LiveCode development environment and advanced users creating Plug-ins. If you use these characters, your stack may not behave as expected.") with revIDELocalise("OK") and revIDELocalise("Cancel")
5117
+
ifitis revIDELocalise("Cancel") then
5118
+
return false
5119
+
end if
5120
+
end if
5121
+
ifpNameis anumberthen
5122
+
beep
5123
+
answer error revIDELocalise("You cannot set the name of a stack to a number.")
5124
+
return false
5125
+
end if
5126
+
ifpNamecontainsquotethen
5127
+
beep
5128
+
answer error revIDELocalise("The name of the stack cannot contain quotes")
@@ -5132,27 +5153,14 @@ on revIDEPropertySet pObjectList, pProperty, pValue, pLockUpdates
5132
5153
5133
5154
# If stack name is changed, use new name when setting edited
5134
5155
iftStackistObjectandpPropertyis"name"then
5135
-
localtOldName
5136
-
puttheshort name oftStackintotOldName
5137
-
ifchar1to3ofpValueis"rev"then
5138
-
answer warning revIDELocalise("Using rev in the first three characters of a stack name is reserved for use by the LiveCode development environment and advanced users creating Plug-ins. If you use these characters, your stack may not behave as expected.") with revIDELocalise("OK") and revIDELocalise("Cancel")
5139
-
ifitis revIDELocalise("Cancel") then
5140
-
setthe name oftStacktotOldName
5141
-
exit revIDEPropertySet
5142
-
end if
5143
-
end if
5144
-
ifpValueis anumberthen
5145
-
beep
5146
-
answer error revIDELocalise("You cannot set the name of a stack to a number.")
5147
-
setthe name oftStacktotOldName
5148
-
exit revIDEPropertySet
5149
-
end if
5150
-
ifpValuecontainsquotethen
5151
-
beep
5152
-
answer error revIDELocalise("The name of the stack cannot contain quotes")
0 commit comments