Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit eaeeb3f

Browse files
committed
Ensure stack name cannot be set to a number via the Project Browser
1 parent fb260fc commit eaeeb3f

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

Toolset/palettes/project browser/behaviors/revideprojectbrowsercontainerrowbehavior.livecodescript

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,12 @@ end mouseDoubleUp
334334

335335
on CloseFieldEditor pFieldEditor, pRow, pKey, pClosingTriggeredBy
336336
# The text the user entered is different than the current value of the target field.
337+
if word 1 of the cObjectLongID of me is "stack" and \
338+
the text of pFieldEditor is a number then
339+
beep
340+
answer error revIDELocalise("You cannot set the name of a stack to a number.")
341+
exit CloseFieldEditor
342+
end if
337343
set the textColor of field "name" of me to revIDEColor("text_3")
338344
set the text of field "name" of me to the text of pFieldEditor
339345
updateProperty the cObjectLongID of me, "name", the text of pFieldEditor

notes/bugfix-21809.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Ensure stack name cannot be set to a number via the Project Browser

0 commit comments

Comments
 (0)