blockly > Variables > promptName
Fonction Variables.promptName()
Demander à l'utilisateur un nouveau nom de variable
Signature :
export declare function promptName(promptText: string, defaultText: string, callback: (p1: string | null) => void): void;
Paramètres
Paramètres | Type | Description |
---|---|---|
promptText | chaîne | Chaîne de la requête. |
defaultText | chaîne | Valeur par défaut à afficher dans le champ de l'invite. |
rappel | (p1: string | null) => void | Un rappel. Le nouveau nom de la variable est transmis, ou la valeur "null" si l'utilisateur a choisi un élément non autorisé. |
Renvoie :
void