diff options
Diffstat (limited to 'doc/classes/Object.xml')
-rw-r--r-- | doc/classes/Object.xml | 55 |
1 files changed, 26 insertions, 29 deletions
diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml index 858bf5b635..a3faccae1a 100644 --- a/doc/classes/Object.xml +++ b/doc/classes/Object.xml @@ -23,7 +23,7 @@ <method name="_get" qualifiers="virtual"> <return type="Variant"> </return> - <argument index="0" name="property" type="String"> + <argument index="0" name="property" type="StringName"> </argument> <description> Virtual method which can be overridden to customize the return value of [method get]. @@ -58,7 +58,7 @@ <method name="_set" qualifiers="virtual"> <return type="bool"> </return> - <argument index="0" name="property" type="String"> + <argument index="0" name="property" type="StringName"> </argument> <argument index="1" name="value" type="Variant"> </argument> @@ -89,7 +89,7 @@ <method name="call" qualifiers="vararg"> <return type="Variant"> </return> - <argument index="0" name="method" type="String"> + <argument index="0" name="method" type="StringName"> </argument> <description> Calls the [code]method[/code] on the object and returns the result. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example: @@ -101,7 +101,7 @@ <method name="call_deferred" qualifiers="vararg"> <return type="void"> </return> - <argument index="0" name="method" type="String"> + <argument index="0" name="method" type="StringName"> </argument> <description> Calls the [code]method[/code] on the object during idle time. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example: @@ -113,7 +113,7 @@ <method name="callv"> <return type="Variant"> </return> - <argument index="0" name="method" type="String"> + <argument index="0" name="method" type="StringName"> </argument> <argument index="1" name="arg_array" type="Array"> </argument> @@ -134,17 +134,16 @@ <method name="connect"> <return type="int" enum="Error"> </return> - <argument index="0" name="signal" type="String"> - </argument> - <argument index="1" name="target" type="Object"> + <argument index="0" name="signal" type="StringName"> </argument> - <argument index="2" name="method" type="String"> + <argument index="1" name="callable" type="Callable"> </argument> - <argument index="3" name="binds" type="Array" default="[ ]"> + <argument index="2" name="binds" type="Array" default="[ ]"> </argument> - <argument index="4" name="flags" type="int" default="0"> + <argument index="3" name="flags" type="int" default="0"> </argument> <description> + [b]FIXME:[/b] The syntax changed with the addition of [Callable], this should be updated. Connects a [code]signal[/code] to a [code]method[/code] on a [code]target[/code] object. Pass optional [code]binds[/code] to the call as an [Array] of parameters. These parameters will be passed to the method after any parameter used in the call to [method emit_signal]. Use [code]flags[/code] to set deferred or one-shot connections. See [enum ConnectFlags] constants. A [code]signal[/code] can only be connected once to a [code]method[/code]. It will throw an error if already connected, unless the signal was connected with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method is_connected] to check for existing connections. If the [code]target[/code] is destroyed in the game's lifecycle, the connection will be lost. @@ -166,13 +165,12 @@ <method name="disconnect"> <return type="void"> </return> - <argument index="0" name="signal" type="String"> - </argument> - <argument index="1" name="target" type="Object"> + <argument index="0" name="signal" type="StringName"> </argument> - <argument index="2" name="method" type="String"> + <argument index="1" name="callable" type="Callable"> </argument> <description> + [b]FIXME:[/b] The syntax changed with the addition of [Callable], this should be updated. Disconnects a [code]signal[/code] from a [code]method[/code] on the given [code]target[/code]. If you try to disconnect a connection that does not exist, the method will throw an error. Use [method is_connected] to ensure that the connection exists. </description> @@ -180,7 +178,7 @@ <method name="emit_signal" qualifiers="vararg"> <return type="void"> </return> - <argument index="0" name="signal" type="String"> + <argument index="0" name="signal" type="StringName"> </argument> <description> Emits the given [code]signal[/code]. The signal must exist, so it should be a built-in signal of this class or one of its parent classes, or a user-defined signal. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example: @@ -251,10 +249,10 @@ </description> </method> <method name="get_meta_list" qualifiers="const"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> - Returns the object's metadata as a [PoolStringArray]. + Returns the object's metadata as a [PackedStringArray]. </description> </method> <method name="get_method_list" qualifiers="const"> @@ -273,7 +271,7 @@ </description> </method> <method name="get_script" qualifiers="const"> - <return type="Reference"> + <return type="Variant"> </return> <description> Returns the object's [Script] instance, or [code]null[/code] if none is assigned. @@ -307,7 +305,7 @@ <method name="has_method" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="method" type="String"> + <argument index="0" name="method" type="StringName"> </argument> <description> Returns [code]true[/code] if the object contains the given [code]method[/code]. @@ -316,7 +314,7 @@ <method name="has_user_signal" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="signal" type="String"> + <argument index="0" name="signal" type="StringName"> </argument> <description> Returns [code]true[/code] if the given user-defined [code]signal[/code] exists. @@ -341,13 +339,12 @@ <method name="is_connected" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="signal" type="String"> + <argument index="0" name="signal" type="StringName"> </argument> - <argument index="1" name="target" type="Object"> - </argument> - <argument index="2" name="method" type="String"> + <argument index="1" name="callable" type="Callable"> </argument> <description> + [b]FIXME:[/b] The syntax changed with the addition of [Callable], this should be updated. Returns [code]true[/code] if a connection exists for a given [code]signal[/code], [code]target[/code], and [code]method[/code]. </description> </method> @@ -409,7 +406,7 @@ <method name="set_deferred"> <return type="void"> </return> - <argument index="0" name="property" type="String"> + <argument index="0" name="property" type="StringName"> </argument> <argument index="1" name="value" type="Variant"> </argument> @@ -456,7 +453,7 @@ <method name="set_script"> <return type="void"> </return> - <argument index="0" name="script" type="Reference"> + <argument index="0" name="script" type="Variant"> </argument> <description> Assigns a script to the object. Each object can have a single script assigned to it, which are used to extend its functionality. @@ -472,9 +469,9 @@ </description> </method> <method name="tr" qualifiers="const"> - <return type="String"> + <return type="StringName"> </return> - <argument index="0" name="message" type="String"> + <argument index="0" name="message" type="StringName"> </argument> <description> Translates a message using translation catalogs configured in the Project Settings. |