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 :

Ce type est introuvable ou n'est pas une constante de compilation: int.


Sujet :

Flex

Vue hybride

Message précédent Message précédent   Message suivant Message suivant
  1. #1
    Membre averti
    Inscrit en
    Mai 2010
    Messages
    14
    Détails du profil
    Informations forums :
    Inscription : Mai 2010
    Messages : 14
    Par défaut Ce type est introuvable ou n'est pas une constante de compilation: int.
    Bonjour,

    J'ai un problème dans un composant flex 3.

    J'ai une erreur à la compilation :
    Ce type est introuvable ou n'est pas une constante de compilation : int. [Generated code (use -keep to save): Path: composants\radiusErrorCause-generated.as, Line: 3473, Column: 24] imp_kpi_split Unknown

    Je n'ai aucun "int" de déclaré dans ce composant. Quand j'en déclare un, il me met l'erreur:
    1046: Ce type est introuvable ou n'est pas une constante de compilation : int. imp_kpi_split/src/composants radiusErrorCause.mxml line 117.

    J'ai un autre composant qui repose sur la même base et je n'ai pas eu ce problème.

    J'ai essayer de recréer le fichier, de ne pas utiliser le copier collé mais rien à faire. Je ne pense pas que ça vienne du service puisque les tests unitaires fonctionnent.

    voici un bout du code :

    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
    <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" currentState="init" creationComplete="myKpiWs.getGroupList(100);"
    	xmlns:webservices="generated.webservices.*" width="100%" height="100%" xmlns:vb="composants.actionScripts.*" xmlns:charts="composants.charrts.*">
    	<mx:Script>
    		<![CDATA[
    			import generated.webservices.RadiusErrorCauseRequest;
    			import mx.collections.ArrayCollection;
    			import generated.webservices.GetRadiusErrorCauseListResultEvent;
    			[Bindable] private var chartTitle:String;
    			[Bindable] private var chartDate:String;
    			[Bindable] private var chartGroup:String;
    			[Bindable] private var myData:ArrayCollection = new ArrayCollection();
    			[Bindable] private var radiusErrorCauseRequete:RadiusErrorCauseRequest = new RadiusErrorCauseRequest();
     private function setRadiusErrorCauseSelect():void
    	        {
    	        	myKpiWs.getEquipmentList(radiusErrorCause_group.selectedIndex+1, radiusErrorCause_date_from.selectedDate, radiusErrorCause_date_to.selectedDate, 100);
    	        	currentState=currentState.substr(0,23)+radiusErrorCause_select.selectedIndex;
    	        }
     
     
    				private function radiusErrorCauseHandler(event:GetRadiusErrorCauseListResultEvent):void
    				{
    						myData = ArrayCollection(event.result);
     
    				}
    			public function calculateRadiusErrorCauseGraphic():void{
     
    			}
    					]]>
    	</mx:Script>
     
    	 <mx:DateFormatter id="dateToString" formatString="{resourceManager.getString('i18n', 'date_format')}" />
    <webservices:KpiWsService id="myKpiWs" GetRadiusErrorCauseList_result="radiusErrorCauseHandler(event)"/>

    ensuite, il y a les états que j'affiche :

    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
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
      <mx:states>
    		<mx:State name="contenu">
    			<mx:AddChild position="lastChild">
    				<mx:VBox x="10" y="10" width="900" height="50" id="content1" verticalGap="0">
    					<mx:HBox width="100%" height="20" horizontalGap="0" id="content1_titre">
    					</mx:HBox>
    					<mx:HRule width="160"/>
    				</mx:VBox>
    			</mx:AddChild>
    			<mx:AddChild position="lastChild">
    				<mx:VBox x="10" y="{content1.y + content1.height}" width="900" height="50" id="content2" verticalGap="0">
    					<mx:HBox width="100%" height="20" horizontalGap="0" id="content2_titre">
    					</mx:HBox>
    					<mx:HRule width="160"/>
    				</mx:VBox>
    			</mx:AddChild>
    			<mx:AddChild position="lastChild">
    				<mx:VBox x="10" y="{content2.y + content2.height}" width="900" height="50" id="content3" verticalGap="0">
    					<mx:HBox width="100%" height="20" horizontalGap="0" id="content3_titre">
    					</mx:HBox>
    					<mx:HRule width="160"/>
    				</mx:VBox>
    			</mx:AddChild>
    			<mx:AddChild position="lastChild">
    				<mx:VBox x="10" y="{content3.y + content3.height}" width="900" height="50" id="content4" verticalGap="0">
    					<mx:HBox width="100%" height="20" horizontalGap="0" id="content4_titre">
    					</mx:HBox>
    					<mx:HRule width="160"/>
    				</mx:VBox>
    			</mx:AddChild>
    			<mx:AddChild  position="lastChild">
    				<mx:VBox x="10" y="{content4.y + content4.height}" width="900" height="50" id="content5" verticalGap="0">
    					<mx:HBox width="100%" height="20" horizontalGap="0" id="content5_titre">
    					</mx:HBox>
    					<mx:HRule width="160"/>
    				</mx:VBox>
    			</mx:AddChild>
    		</mx:State>
     
    		<mx:State name="radiusErrorCause_State72" basedOn="contenu">
    			<mx:RemoveChild target="{content4}"/>
    			<mx:RemoveChild target="{content5}"/>
    			<mx:SetProperty target="{content1}" name="height" value="340"/>
    			<mx:SetProperty target="{content2}" name="height" value="625"/>
    			<mx:SetProperty target="{content3}" name="height" value="340"/>
    			<mx:AddChild relativeTo="{content1_titre}" position="lastChild">
    				<mx:Image source="images/fleche_bas.png" click="hideRadiusErrorCause();" id="radiusErrorCause_flecheSelect" />
    			</mx:AddChild>
    			<mx:AddChild relativeTo="{content1_titre}" position="lastChild">
    				<mx:Label text="{resourceManager.getString('i18n', 'radiusErrorCause_titre')}" styleName="ContenuTitre" id="radiusErrorCause_viewSelect" click="hideRadiusErrorCause();" />
    			</mx:AddChild>
    			<mx:AddChild relativeTo="{content1}" position="lastChild">
    				<mx:HBox width="100%" horizontalGap="15" height="60" verticalAlign="middle" id="radiusErrorCause_hbox2">
    					<mx:Spacer width="20" height="60"/>
    					<mx:Label text="{resourceManager.getString('i18n', 'radiusErrorCause_select')}" styleName="ContenuLabel" />
    					<mx:ComboBox styleName="ContenuCombo" id="radiusErrorCause_select" cornerRadius="0" selectedIndex="0" change="setRadiusErrorCauseSelect();">
    							<mx:dataProvider>
    								<mx:Array>
    									<mx:String>{resourceManager.getString('i18n', 'radiusErrorCause_select_all')}</mx:String>
    									<mx:String>{resourceManager.getString('i18n', 'radiusErrorCause_select_group')}</mx:String>
    									<mx:String>{resourceManager.getString('i18n', 'radiusErrorCause_select_equipment')}</mx:String>
    								</mx:Array>
    							</mx:dataProvider>
    					</mx:ComboBox>
    					<mx:ComboBox styleName="ContenuCombo" id="radiusErrorCause_frequency" cornerRadius="0" selectedIndex="0">
    							<mx:dataProvider>
    								<mx:Array>
    									<mx:String>{resourceManager.getString('i18n', 'radiusErrorCause_frequency_day')}</mx:String>
    									<mx:String>{resourceManager.getString('i18n', 'radiusErrorCause_frequency_week')}</mx:String>
    									<mx:String>{resourceManager.getString('i18n', 'radiusErrorCause_frequency_month')}</mx:String>
    								</mx:Array>
    							</mx:dataProvider>
    					</mx:ComboBox>
    					<mx:Form>
    						<mx:FormItem label="{resourceManager.getString('i18n', 'radiusErrorCause_select_from')}" styleName="ContenuLabel" direction="horizontal">
    							<mx:DateField id="radiusErrorCause_date_from" showToday="true" themeColor="#FF6600"
    									formatString="{resourceManager.getString('i18n', 'date_format')}"
    									dayNames="{resourceManager.getStringArray('i18n', 'day_names_short')}"
    									monthNames="{resourceManager.getStringArray('i18n', 'month_names_long')}"
    									selectedDate="{new Date()}"/>
    						</mx:FormItem>
    					</mx:Form>
    					<mx:Form>
    						<mx:FormItem label="{resourceManager.getString('i18n', 'radiusErrorCause_select_to')}" styleName="ContenuLabel" direction="horizontal">
    							<mx:DateField id="radiusErrorCause_date_to" showToday="true" themeColor="#FF6600"
    									formatString="{resourceManager.getString('i18n', 'date_format')}"
    									dayNames="{resourceManager.getStringArray('i18n', 'day_names_short')}"
    									monthNames="{resourceManager.getStringArray('i18n', 'month_names_long')}"
    									selectedDate="{new Date()}"/>
    						</mx:FormItem>
    					</mx:Form>
    				</mx:HBox>
    			</mx:AddChild>
    			<mx:AddChild relativeTo="{content1}" position="lastChild">
    				<mx:HBox width="100%" height="50" verticalAlign="middle" horizontalGap="15" id="radiusErrorCause_hbox3">
    					<mx:Spacer width="20" height="50"/>
    					<mx:Label text="{resourceManager.getString('i18n', 'radiusErrorCause_group')}" styleName="ContenuLabel"/>
    					<mx:ComboBox styleName="ContenuCombo" id="radiusErrorCause_group" cornerRadius="0" dataProvider="{myKpiWs.getGroupList_lastResult}" labelField="name" change="setRadiusErrorCauseSelect();" />
    					<mx:Label text="{resourceManager.getString('i18n', 'radiusErrorCause_equipment')}" styleName="ContenuLabel" id="radiusErrorCause_label2"/>
    					<mx:ComboBox styleName="ContenuCombo" id="radiusErrorCause_equipment" cornerRadius="0"
    							dataProvider="{myKpiWs.getEquipmentList_lastResult}" labelField="name"
    							rowCount="{myKpiWs.getEquipmentList_lastResult.length>10?10:myKpiWs.getEquipmentList_lastResult.length}" />
    				</mx:HBox>
     
    			</mx:AddChild>
    			<mx:AddChild relativeTo="{content1}" position="lastChild">
    				<mx:HBox width="100%" height="50" verticalAlign="middle" horizontalGap="10" id="radiusErrorCause_hbox5">
    					<mx:Label text="{resourceManager.getString('i18n', 'radiusErrorCause_type')}" styleName="ContenuLabel"/>
    					<mx:RadioButtonGroup id="radiusErrorCause_type"/>
    					<mx:RadioButton id="aut" label="{resourceManager.getString('i18n', 'radiusErrorCause_aut')}" groupName="radiusErrorCause_type" selected="true" styleName="ContenuRadioButton" />
    					<mx:RadioButton  id="cnx" label="{resourceManager.getString('i18n', 'radiusErrorCause_cnx')}" groupName="radiusErrorCause_type" styleName="ContenuRadioButton" />
    					<mx:RadioButton id="int" label="{resourceManager.getString('i18n', 'radiusErrorCause_int')}" groupName="radiusErrorCause_type" styleName="ContenuRadioButton" />
    					<mx:RadioButton  id="dnx" label="{resourceManager.getString('i18n', 'radiusErrorCause_dnx')}" groupName="radiusErrorCause_type" styleName="ContenuRadioButton" />
    				</mx:HBox>
    			</mx:AddChild>
    			<mx:AddChild relativeTo="{content1}" position="lastChild">
    				<mx:HBox width="100%" height="50" verticalAlign="middle" horizontalGap="10" id="radiusErrorCause_hbox51">
    					<mx:Label text="{resourceManager.getString('i18n', 'radiusErrorCause_mod')}" styleName="ContenuLabel"/>
    					<mx:RadioButtonGroup id="radiusErrorCause_mod"/>
    					<mx:RadioButton id="perc" label="{resourceManager.getString('i18n', 'radiusErrorCause_percent')}" groupName="radiusErrorCause_mod" selected="true" styleName="ContenuRadioButton" />
    					<mx:RadioButton  id="numb" label="{resourceManager.getString('i18n', 'radiusErrorCause_number')}" groupName="radiusErrorCause_mod" styleName="ContenuRadioButton" />
    			</mx:HBox>
    			</mx:AddChild>
    			<mx:AddChild relativeTo="{content1}" position="lastChild">
    				<mx:HBox width="100%" height="50" verticalAlign="middle" horizontalGap="10" id="radiusErrorCause_hbox6">
    					<mx:Spacer width="5" height="50"/>
    					<mx:Button label="{resourceManager.getString('i18n', 'dispay_stats')}" styleName="ContenuButton" id="radiusErrorCause_viewStats"
    							width="200" cornerRadius="0" click="calculateRadiusErrorCauseGraphic();"/>
    				</mx:HBox>
    			</mx:AddChild>
     
    			<mx:AddChild relativeTo="{content2_titre}" position="lastChild">
    				<mx:Image source="images/fleche_bas.png" id="radiusErrorCause_flecheGraphic" click="hideRadiusErrorCauseGraphic();"/>
    			</mx:AddChild>
    			<mx:AddChild relativeTo="{content2_titre}" position="lastChild">
    				<mx:Label text="{resourceManager.getString('i18n', 'graphic')}" styleName="ContenuTitre" id="radiusErrorCause_viewGraphic" click="hideRadiusErrorCauseGraphic();"/>
    			</mx:AddChild>
    			<mx:AddChild relativeTo="{content2}" position="lastChild">
    				<mx:Spacer height="10" />
    			</mx:AddChild>
    			<mx:AddChild relativeTo="{content2}" position="lastChild">
    				<vb:myVBox height="100%" width="900">
    					<charts:chartRadiusErrorsM id="radiusErrorCause_chart" width="900" height="525"/>
    					<vb:myLabel text="{chartTitle}" styleName="ContenuTitreChart" height="100%" width="900"/>
    				</vb:myVBox>
    			</mx:AddChild>
    			<mx:AddChild relativeTo="{content3_titre}" position="lastChild">
    				<mx:Image source="images/fleche_bas.png" id="radiusErrorCause_flecheData" click="hideRadiusErrorCauseData();"/>
    			</mx:AddChild>
    			<mx:AddChild relativeTo="{content3_titre}" position="lastChild">
    				<mx:Label text="{resourceManager.getString('i18n', 'data')}" styleName="ContenuTitre" id="radiusErrorCause_viewData" click="hideRadiusErrorCauseData();"/>
    			</mx:AddChild>
    			<mx:AddChild relativeTo="{content3}" position="lastChild">
    				<mx:Spacer height="10" />
    			</mx:AddChild>
    			<mx:AddChild relativeTo="{content3}" position="lastChild">
    				<mx:DataGrid dataProvider ="{myData}" id="radiusErrorCause_datagrid"
    						rowCount="{myData.length>10?10:myData.length}">
     
    				</mx:DataGrid>
    			</mx:AddChild>
    		</mx:State>

    je n'ai pas mis tous les états.

    Si vous avez des idées à propos de cette erreur.

    Bonne fin de journée.

    Cordialement,

    kiwiii.

  2. #2
    Membre émérite
    Homme Profil pro
    Consultant Angular / Java J2EE
    Inscrit en
    Novembre 2008
    Messages
    545
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 41
    Localisation : Luxembourg

    Informations professionnelles :
    Activité : Consultant Angular / Java J2EE
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Novembre 2008
    Messages : 545
    Par défaut
    Salut,

    à quelle ligne correspond la ligne 117 stp ?
    Tu as essayé de faire un clean du projet ?

  3. #3
    Membre averti
    Inscrit en
    Mai 2010
    Messages
    14
    Détails du profil
    Informations forums :
    Inscription : Mai 2010
    Messages : 14
    Par défaut
    Salut,

    Pour la ligne, c'était juste un exemple lorsque j'utilise un "int". J'ai donc fini par remplacer les "int" par un autre type pour voir si cela résolvait mon problème.

    Mais même sans aucun int dans ma page, j'ai cette erreur :

    Ce type est introuvable ou n'est pas une constante de compilation : int.
    [Generated code (use -keep to save): Path: composants\radiusErrorCause-generated.as, Line: 3477, Column: 49] imp_kpi_split Unknown 1274427751006 2106.
    J'ai fait des "clean", redémarer mon pc, Flex builder, refaire le fichier mais toujours rien.

    Je ne comprend pas pourquoi il y a une erreur dans radiusErrorCause-generated.as ( est-ce un fichier généré par le compilateur ?).

    Je cherche encore...

Discussions similaires

  1. Réponses: 2
    Dernier message: 22/08/2012, 14h30
  2. Réponses: 2
    Dernier message: 19/05/2008, 20h41
  3. Réponses: 4
    Dernier message: 12/05/2008, 11h40
  4. Réponses: 2
    Dernier message: 13/04/2007, 18h20
  5. Réponses: 2
    Dernier message: 09/05/2006, 12h30

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