blockly > Événements > VarRename
Classe Events.VarRename
Notifie les écouteurs qu'un modèle de variable a été renommé.
Signature :
export declare class VarRename extends VarBase
Extension:VarBase
Constructeurs
Propriétés
Propriété |
Modificateurs |
Type |
Description |
newName? |
|
chaîne |
(Facultatif) Nouveau nom de la variable. |
oldName? |
|
chaîne |
(Facultatif) L'ancien nom de la variable. |
type |
|
chaîne |
|
Méthodes
Méthode |
Modificateurs |
Description |
run(forward) |
|
Exécutez un événement de changement de nom de variable. |
toJson() |
|
Encodez l'événement au format JSON. |
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2024/09/12 (UTC).
[null,null,["Dernière mise à jour le 2024/09/12 (UTC)."],[[["The `Blockly.Events.VarRename` class handles events related to renaming variable models within Blockly workspaces."],["It extends the `Blockly.Events.VarBase` class and includes properties for the old and new variable names."],["Developers can use the `run` method to execute a variable rename event and `toJson` for serialization."],["Instances of this class are created with a constructor accepting the variable and its new name."]]],["The `VarRename` class, extending `VarBase`, notifies listeners about variable model renames. It is constructed with an optional variable and new name. Key properties include `newName` and `oldName` (both optional strings) to track the variable's name change. The class also defines the `type` property. Core methods include `run(forward)` to execute the rename and `toJson()` to convert the event into JSON format.\n"]]