AS Studio : Eléméntaire, mais…

@bou @n@ss

Membre actif
8 Février 2000
201
0
Salut,
AS Studio : Eléméntaire, mais…

Je n'arrive pas à affecter un resultat à un champ text.
Dans l'unique fenêtre de mon projet, appelée Palette, et pour remplir le champ "Champ1" (quand je dis appelé, c'est le nom de la variable AS)

J'ai essayé :
set contents of text field "Champ1" to "toto"
set contents of text field "Champ1" of box 1 to "toto"
set contents of text field "Champ1" of box 1 of window "Palette" to "toto"

seules ou dans un :

on launched theObject

end launched

Et rien ne s'affiche !

Quelqu'un pourrait avoir la gentillesse de me rappeler la bonne commande, juste pour remplir un champ de texte non éditable.

Merci
 
<BLOCKQUOTE><font size="1" face="Verdana, Geneva">quote:</font><HR>Posté à l'origine par abouanass:
Salut,
AS Studio : Eléméntaire, mais…

Je n'arrive pas à affecter un resultat à un champ text.
Dans l'unique fenêtre de mon projet, appelée Palette, et pour remplir le champ "Champ1" (quand je dis appelé, c'est le nom de la variable AS)

J'ai essayé :
set contents of text field "Champ1" to "toto"
set contents of text field "Champ1" of box 1 to "toto"
set contents of text field "Champ1" of box 1 of window "Palette" to "toto"

seules ou dans un :

on launched theObject

end launched

Et rien ne s'affiche !

Quelqu'un pourrait avoir la gentillesse de me rappeler la bonne commande, juste pour remplir un champ de texte non éditable.

Merci
<HR></BLOCKQUOTE>


Chez moi cela marche avec un truc ds le genre:

set theString to "Ton joli text"
set the contents of text field "tontextfield" of window "main" to theString
 
<BLOCKQUOTE><font size="1" face="Verdana, Geneva">quote:</font><HR>Posté à l'origine par abouanass:
set contents of text field "Champ1" of box 1 of window "Palette" to "toto"<HR></BLOCKQUOTE>

set contents of text field "Champ1" of window "nom_de_la_fenêtre" to "toto" as string

[19 juin 2002 : message édité par Gwenhiver]