podorn
Messages postés7Date d'inscriptionmardi 29 avril 2003StatutMembreDernière intervention 9 août 2006
-
13 juin 2006 à 02:24
ShareVB
Messages postés2676Date d'inscriptionvendredi 28 juin 2002StatutMembreDernière intervention13 janvier 2016
-
14 juin 2006 à 18:54
Salut à tous ,
Quelqu'un pourrait -il m'aider a comprendre pourquoi ce code ne marche pas
Public Structure SiteAoptimiser
Public NomDuSite As String
Dim AxeXYTilt() As Double
Dim AxeXYAzimut() As Double
Dim AxeXYPuissance() As Double
Dim AxeXYIntraDl() As Double
Dim AxeXYIntraUl() As Double
Dim AxeXYInterDl() As Double
Dim AxeXYInterUl() As Double
Public Sub Initialize()
ReDim AxeXYAzimut(20)
ReDim AxeXYPuissance(20)
ReDim AxeXYIntraDl(20)
ReDim AxeXYIntraUl(20)
ReDim AxeXYInterDl(20)
ReDim AxeXYInterUl(20)
End Sub
End Structure
Public Sub creationReseau(ByVal NomDusite As String)
Dim site1 As String
Dim compteur, i, j As Integer
Dim site As SiteAoptimiser = New SiteAoptimiser
Dim currentRows() As DataRow = _
Me.Parcs_d_antenneTableAdapter.GetData().Select(Nothing, Nothing, DataViewRowState.CurrentRows)
With site
.Initialize()
j = 0
compteur = currentRows.Length
.NomDuSite = NomDusite
For i = 0 To compteur - 1
site1 = currentRows(i).ItemArray(0).ToString
If NomDusite = site1 Then
If bTilt Then
.AxeXYTilt(j) = currentRows(i).ItemArray(3)
End If
If bAzimut Then
.AxeXYAzimut(j) = currentRows(i).ItemArray(4)
End If
If bPuissance Then
.AxeXYPuissance(j) = currentRows(i).ItemArray(5)
End If
If bInterIntraDL Then
.AxeXYIntraDl(j) = currentRows(i).ItemArray(6)
End If
If bInterIntraUL Then
.AxeXYIntraUl(j) = currentRows(i).ItemArray(7)
End If
If bInterInterDL Then
.AxeXYInterDl(j) = currentRows(i).ItemArray(8)
End If
If bInterInterUL Then
.AxeXYInterUl(j) = currentRows(i).ItemArray(9)
End If
End If
j = j + 1
Next
j = 0
Parc.Add(site)
End With
End Sub
Quand il arrive sur la ligne en gras il me renvoi une exception : La référence d'objet n'est pas définie à une instance d'un objet.
Merci d'avance pour l'aide
ShareVB
Messages postés2676Date d'inscriptionvendredi 28 juin 2002StatutMembreDernière intervention13 janvier 201626 14 juin 2006 à 18:54
salut,
je ne me souviens plus si la méthode Initialize est appellée automatique sur la structure crée :
Dim site As SiteAoptimiser = New SiteAoptimiser
site.Initialize()