Précédent   Forum du club des développeurs et IT Pro > Webmasters - Développement Web > Flash/Flex > Flex
Flex Forum d'entraide sur la programmation Adobe Flex : applications Internet riches (RIA)
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse
 
Outils de la discussion
Publicité
'
Vieux 17/10/2012, 18h21   #1
Towandaa
Invité régulier
 
Femme
Étudiant
Inscription : novembre 2011
Messages : 27
Détails du profil
Informations personnelles :
Sexe : Femme
Âge : 25
Localisation : France, Gironde (Aquitaine)

Informations professionnelles :
Activité : Étudiant

Informations forums :
Inscription : novembre 2011
Messages : 27
Points : 7
Points : 7
Par défaut Binding génère une erreur au lancement

Bonjour,

Je suis en train de reprendre une appli flex.
Je constate qu'au chargement de la première page le flash debug me donne les erreurs suivantes:

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Error: Unknown Property: 'PrixRetourPresta'.
	at mx.collections::ListCollectionView/http://www.adobe.com/2006/actionscript/flash/proxy::getProperty()
	at mx.binding::PropertyWatcher/updateProperty()
	at Function/http://adobe.com/AS3/2006/builtin::apply()
	at mx.binding::Watcher/wrapUpdate()
	at mx.binding::PropertyWatcher/updateParent()
	at mx.binding::Watcher/updateChildren()
	at mx.binding::PropertyWatcher/updateProperty()
	at Function/http://adobe.com/AS3/2006/builtin::apply()
	at mx.binding::Watcher/wrapUpdate()
	at mx.binding::PropertyWatcher/eventHandler()
	at flash.events::EventDispatcher/dispatchEventFunction()
	at flash.events::EventDispatcher/dispatchEvent()
	at mx.core::UIComponent/dispatchEvent()
	at mx.controls.listClasses::ListBase/set dataProvider()
	at mx.controls::DataGrid/set dataProvider()
	at mx.binding::Binding/defaultDestFunc()
	at Function/http://adobe.com/AS3/2006/builtin::call()
	at mx.binding::Binding/innerExecute()
	at Function/http://adobe.com/AS3/2006/builtin::apply()
	at mx.binding::Binding/wrapFunctionCall()
	at mx.binding::Binding/execute()
	at mx.binding::BindingManager$/executeBindings()
	at mx.core::UIComponent/executeBindings()
	at mx.core::Container/createComponentFromDescriptor()
	at mx.core::Container/createComponentsFromDescriptors()
	at mx.containers::Panel/createComponentsFromDescriptors()
	at mx.core::Container/createChildren()
	at mx.containers::Panel/createChildren()
	at mx.core::UIComponent/initialize()
	at mx.core::Container/initialize()
	at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()
	at mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdded()
	at mx.core::Container/addChildAt()
	at mx.core::Container/addChild()
	at mx.core::Container/createComponentFromDescriptor()
	at mx.core::Container/createComponentsFromDescriptors()
	at mx.core::Container/createChildren()
	at mx.core::UIComponent/initialize()
	at mx.core::Container/initialize()
	at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()
	at mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdded()
	at mx.core::Container/addChildAt()
	at mx.core::Container/addChild()
	at mx.core::Container/createComponentFromDescriptor()
	at mx.core::Container/createComponentsFromDescriptors()
	at mx.core::Container/createChildren()
	at mx.core::UIComponent/initialize()
	at mx.core::Container/initialize()
	at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()
	at mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdded()
	at mx.core::Container/addChildAt()
	at mx.containers::Panel/addChildAt()
	at mx.core::Container/addChild()
	at mx.core::Container/createComponentFromDescriptor()
	at mx.core::Container/createComponentsFromDescriptors()
	at mx.containers::Panel/createComponentsFromDescriptors()
	at mx.core::Container/createChildren()
	at mx.containers::Panel/createChildren()
	at mx.core::UIComponent/initialize()
	at mx.core::Container/initialize()
	at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()
	at mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdded()
	at mx.core::Container/addChildAt()
	at mx.core::Container/addChild()
J'ai recherché le fameux PrixRetourPresta et l'instruction qui pose problème (cad qu'en l'enlevant je n'ai plus ces erreurs) est la suivante:

Code :
<mx:TextArea id="vTotSel" width="87" backgroundColor="#82b1ce" editable="false" textAlign="right" height="20" toolTip="{'Dont : ' + (this.vListFact.dataProvider as FactureListe).PrixRetourPresta.toFixed(2) + ' € de retour prestataire'}"/>
tooltip lié normalement à ce qui me semble.

Le pire est que ce tooltip marche très bien avec les bonnes valeurs en cours d'exécution mais au lancement ça génère des erreurs.

Je pense que ça doit avoir rapport avec un certain désordre dans la création des composants mais je ne peux pas changer l'ordre. Quelle condition je pourrais mettre pour qu'il ignore cette instruction au chargement initial?

Merci à tous
Towandaa est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 18/10/2012, 09h07   #2
Jim_Nastiq
Rédacteur/Modérateur
 
Avatar de Jim_Nastiq
 
Homme Jean-Marie Macé
Architecte, Expert Flex
Inscription : avril 2006
Messages : 2 319
Détails du profil
Informations personnelles :
Nom : Homme Jean-Marie Macé
Localisation : France, Haute Garonne (Midi Pyrénées)

Informations professionnelles :
Activité : Architecte, Expert Flex
Secteur : High Tech - Éditeur de logiciels

Informations forums :
Inscription : avril 2006
Messages : 2 319
Points : 3 302
Points : 3 302
Bonjour,

A l'initialisation de composant ta propriété n'existe pas, car pas encore créée. Plus tard dans le cycle de vie de ton appli elle existe, le tooltip peut donc fonctionner.
Il te faut assigner le binding au bon moment : quand ton composant hote est pret ET quand tes données sont prêtes.
__________________

Pensez vraiment à effectuer une recherche avant de poster, ici et sur un moteur de recherche! c'est la moindre des choses
Pensez au tag

Mon Blog sur la techno Flex
Ma page sur Developpez.com

Jim_Nastiq
Jim_Nastiq est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse
Outils de la discussion

Navigation rapide


Fuseau horaire GMT +2. Il est actuellement 03h40.


 
 
 
 
Partenaires

Hébergement Web