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
@@ -5109,6 +5109,27 @@ private on __setPropertyOfObject pObject, pProperty, pValue
5109
5109
5110
5110
end__setPropertyOfObject
5111
5111
5112
+
functionideCheckStackName pName
5113
+
ifchar1to3ofpNameis"rev"then
5114
+
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")
5115
+
ifitis revIDELocalise("Cancel") then
5116
+
return false
5117
+
end if
5118
+
end if
5119
+
ifpNameis anumberthen
5120
+
beep
5121
+
answer error revIDELocalise("You cannot set the name of a stack to a number.")
5122
+
return false
5123
+
end if
5124
+
ifpNamecontainsquotethen
5125
+
beep
5126
+
answer error revIDELocalise("The name of the stack cannot contain quotes")
@@ -5130,27 +5151,14 @@ on revIDEPropertySet pObjectList, pProperty, pValue, pLockUpdates
5130
5151
5131
5152
# If stack name is changed, use new name when setting edited
5132
5153
iftStackistObjectandpPropertyis"name"then
5133
-
localtOldName
5134
-
puttheshort name oftStackintotOldName
5135
-
ifchar1to3ofpValueis"rev"then
5136
-
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")
5137
-
ifitis revIDELocalise("Cancel") then
5138
-
setthe name oftStacktotOldName
5139
-
exit revIDEPropertySet
5140
-
end if
5141
-
end if
5142
-
ifpValueis anumberthen
5143
-
beep
5144
-
answer error revIDELocalise("You cannot set the name of a stack to a number.")
5145
-
setthe name oftStacktotOldName
5146
-
exit revIDEPropertySet
5147
-
end if
5148
-
ifpValuecontainsquotethen
5149
-
beep
5150
-
answer error revIDELocalise("The name of the stack cannot contain quotes")
0 commit comments