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

Commit ce6b5d3

Browse files
committed
Merge remote-tracking branch 'origin/develop-9.0' into merge-develop-9.0-28.03.2019
2 parents c2cf1c2 + c4a3a28 commit ce6b5d3

21 files changed

+47
-37
lines changed

Toolset/home.livecodescript

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,7 @@ local sSavePreferencesMessage
907907

908908
command revInternal__SavePreferences
909909
cancel sSavePreferencesMessage
910-
send "__revInternal_SavePreferences" to me in 500 milliseconds
910+
send "__revInternal_SavePreferences" to me in 30 seconds
911911
put the result into sSavePreferencesMessage
912912
end revInternal__SavePreferences
913913

Toolset/libraries/revidelibrary.8.livecodescript

Lines changed: 31 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2280,9 +2280,11 @@ Example: set revIDEGetPreference("text size") to 12
22802280
Returns (Any): The value of the preference
22812281
*/
22822282
on revIDESetPreference pPreferenceName, pValue
2283-
set the pPreferenceName of stack "revpreferences" to pValue
2284-
revInternal__SavePreferences
2285-
ideMessageSend "idePreferenceChanged:" & pPreferenceName,pValue
2283+
if the pPreferenceName of stack "revpreferences" is not pValue then
2284+
set the pPreferenceName of stack "revpreferences" to pValue
2285+
revInternal__SavePreferences
2286+
ideMessageSend "idePreferenceChanged:" & pPreferenceName,pValue
2287+
end if
22862288
end revIDESetPreference
22872289

22882290
command revIDESetPreferenceOfSet pSetName, pPreferenceName, pValue
@@ -5109,6 +5111,27 @@ private on __setPropertyOfObject pObject, pProperty, pValue
51095111

51105112
end __setPropertyOfObject
51115113

5114+
function ideCheckStackName pName
5115+
if char 1 to 3 of pName is "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+
if it is revIDELocalise("Cancel") then
5118+
return false
5119+
end if
5120+
end if
5121+
if pName is a number then
5122+
beep
5123+
answer error revIDELocalise("You cannot set the name of a stack to a number.")
5124+
return false
5125+
end if
5126+
if pName contains quote then
5127+
beep
5128+
answer error revIDELocalise("The name of the stack cannot contain quotes")
5129+
return false
5130+
end if
5131+
5132+
return true
5133+
end ideCheckStackName
5134+
51125135
on revIDEPropertySet pObjectList, pProperty, pValue, pLockUpdates
51135136
local tThrottlePropertyChanged
51145137
put false into tThrottlePropertyChanged
@@ -5130,27 +5153,14 @@ on revIDEPropertySet pObjectList, pProperty, pValue, pLockUpdates
51305153

51315154
# If stack name is changed, use new name when setting edited
51325155
if tStack is tObject and pProperty is "name" then
5133-
local tOldName
5134-
put the short name of tStack into tOldName
5135-
if char 1 to 3 of pValue is "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-
if it is revIDELocalise("Cancel") then
5138-
set the name of tStack to tOldName
5139-
exit revIDEPropertySet
5140-
end if
5141-
end if
5142-
if pValue is a number then
5143-
beep
5144-
answer error revIDELocalise("You cannot set the name of a stack to a number.")
5145-
set the name of tStack to tOldName
5146-
exit revIDEPropertySet
5147-
end if
5148-
if pValue contains quote then
5149-
beep
5150-
answer error revIDELocalise("The name of the stack cannot contain quotes")
5156+
5157+
if not ideCheckStackName(pValue) then
5158+
local tOldName
5159+
put the short name of tStack into tOldName
51515160
set the name of tStack to tOldName
51525161
exit revIDEPropertySet
51535162
end if
5163+
51545164
put pValue into tStackName
51555165
else
51565166
put the short name of tStack into tStackName
Binary file not shown.
Binary file not shown.
Binary file not shown.
-52 Bytes
Binary file not shown.
-59 Bytes
Binary file not shown.
-36 Bytes
Binary file not shown.
-85 Bytes
Binary file not shown.
-44 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)