IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Flex Discussion :

Binding génère une erreur au lancement


Sujet :

Flex

  1. #1
    Membre du Club
    Femme Profil pro
    Ingénieur développement logiciels
    Inscrit en
    Novembre 2011
    Messages
    46
    Détails du profil
    Informations personnelles :
    Sexe : Femme
    Âge : 36
    Localisation : France, Gironde (Aquitaine)

    Informations professionnelles :
    Activité : Ingénieur développement logiciels

    Informations forums :
    Inscription : Novembre 2011
    Messages : 46
    Points : 43
    Points
    43
    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 : Sélectionner tout - Visualiser dans une fenêtre à part
    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 : Sélectionner tout - Visualiser dans une fenêtre à part
    <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

  2. #2
    Membre expert
    Avatar de Jim_Nastiq
    Homme Profil pro
    Architecte, Expert Flex
    Inscrit en
    Avril 2006
    Messages
    2 335
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    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 335
    Points : 3 189
    Points
    3 189
    Par défaut
    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

Discussions similaires

  1. Process.Start génère une erreur
    Par jerome.fortias dans le forum C#
    Réponses: 6
    Dernier message: 17/09/2007, 15h31
  2. Source du fichier plat : trop de ligne génère une erreur
    Par Monico dans le forum MS SQL Server
    Réponses: 2
    Dernier message: 30/08/2007, 16h04
  3. Exécutable qui génére une erreur windows
    Par jouidos dans le forum Windows Forms
    Réponses: 4
    Dernier message: 22/01/2007, 15h50
  4. .lib qui génère une erreur au link
    Par mrshadow dans le forum VC++ .NET
    Réponses: 2
    Dernier message: 19/01/2007, 10h47
  5. [VB6] Problème de textbox multiligne qui génére une erreur
    Par bb62 dans le forum VB 6 et antérieur
    Réponses: 1
    Dernier message: 20/02/2006, 16h21

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo