summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-01-27 10:29:52 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-01-27 10:29:52 +0100
commit9b1f85fe575497c276551e2be7a8d5b45406745e (patch)
tree5794586b8bae3ea1025408b4e9a0a0500013577c /doc
parent1a3b537bc7b53a647021bc7f77106edf1c4e920f (diff)
parentabe6d6723219b592829fd9ba2a2c78950c83d64e (diff)
Merge pull request #71845 from vonagam/fix-read-only
GDScript: Fix test for read-only state of constants
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/Array.xml15
-rw-r--r--doc/classes/Dictionary.xml12
2 files changed, 19 insertions, 8 deletions
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml
index ce4d7693d8..1ac1c0745e 100644
--- a/doc/classes/Array.xml
+++ b/doc/classes/Array.xml
@@ -392,7 +392,7 @@
<method name="is_read_only" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if the array is read-only. See [method set_read_only]. Arrays are automatically read-only if declared with [code]const[/code] keyword.
+ Returns [code]true[/code] if the array is read-only. See [method make_read_only]. Arrays are automatically read-only if declared with [code]const[/code] keyword.
</description>
</method>
<method name="is_typed" qualifiers="const">
@@ -401,6 +401,12 @@
Returns [code]true[/code] if the array is typed. Typed arrays can only store elements of their associated type and provide type safety for the [code][][/code] operator. Methods of typed array still return [Variant].
</description>
</method>
+ <method name="make_read_only">
+ <return type="void" />
+ <description>
+ Makes the array read-only, i.e. disabled modifying of the array's elements. Does not apply to nested content, e.g. content of nested arrays.
+ </description>
+ </method>
<method name="map" qualifiers="const">
<return type="Array" />
<param index="0" name="method" type="Callable" />
@@ -524,13 +530,6 @@
Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array.
</description>
</method>
- <method name="set_read_only">
- <return type="void" />
- <param index="0" name="enable" type="bool" />
- <description>
- Makes the [Array] read-only, i.e. disabled modifying of the array's elements. Does not apply to nested content, e.g. content of nested arrays.
- </description>
- </method>
<method name="set_typed">
<return type="void" />
<param index="0" name="type" type="int" />
diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml
index 03e5b5d1d8..ea0bcc5cbb 100644
--- a/doc/classes/Dictionary.xml
+++ b/doc/classes/Dictionary.xml
@@ -271,12 +271,24 @@
Returns [code]true[/code] if the dictionary is empty (its size is [code]0[/code]). See also [method size].
</description>
</method>
+ <method name="is_read_only" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if the dictionary is read-only. See [method make_read_only]. Dictionaries are automatically read-only if declared with [code]const[/code] keyword.
+ </description>
+ </method>
<method name="keys" qualifiers="const">
<return type="Array" />
<description>
Returns the list of keys in the dictionary.
</description>
</method>
+ <method name="make_read_only">
+ <return type="void" />
+ <description>
+ Makes the dictionary read-only, i.e. disabled modifying of the dictionary's contents. Does not apply to nested content, e.g. content of nested dicitonaries.
+ </description>
+ </method>
<method name="merge">
<return type="void" />
<param index="0" name="dictionary" type="Dictionary" />