To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=64240
                  Issue #:|64240
                  Summary:|Very strange behavior of the Basic Interpretor
                          |(incoherent redoable runtime error)
                Component:|scripting
                  Version:|OOo 2.0
                 Platform:|PC
                      URL:|
               OS/Version:|Linux
                   Status:|NEW
        Status whiteboard:|
                 Keywords:|
               Resolution:|
               Issue type:|PATCH
                 Priority:|P2
             Subcomponent:|code
              Assigned to:|kr
              Reported by:|3ggg





------- Additional comments from [EMAIL PROTECTED] Mon Apr 10 15:11:16 -0700 
2006 -------
Hello,

I think, I am facing a OO Basic interpreter internal problem.
I asked in OO forum for replication of this problem : it was reproduced 
with the code below.

Here is the story:

I have created a bunch (about 5) Dialogs with lot of listBoxes and buttons, and
severals Basic Modules to be active parts of thoses Dialogs.

Here below you will find a summary of all the declarations I have in my Basic
Modules. In order to ease reproducing the problem, I put all declarations (only)
in one single module.... The problem is still there...

If you change the name of the "strange undefined variable" you may think you
solved the problem... hum... hum... no no, try again you will see...

To reproduce the problem, you can:

A) create a Basic Module,
then B) copy/paste the code below
and finaly C) press the run button under OO Basic IDE at least TWICE.

For the first time, no runtime error but the second time or each even run I 
have a:

"Runtime ERROR Basic
Undefined variable" (*)

(*) I have translated it, actually it is in French : "Variable Indefinie"

on line:

Dim gg_SaisiePrixQteDialog As Object

You may have also :

"Valeur ou Type de Donnees incorrect(e)
Index en dehors de la plage définie"

Which may be aproximatively translated into english by:

"Incorrect Value or Type
index out of bound"

On the same line !!

Here is the full code:

Code:

REM  *****  BASIC  *****
'Option Explicit

Sub Main
   MsgBox " This is a nightmare for me..."
End Sub


'==========================
' D E C L A R A T I O N S
'==========================
'
' Result Sets
'
'   Global OO objects      
Global gg_BonDeCommandeRS   As Variant
Global gg_LigneBonDeCommandeRS   As Object

'
' Global au module
'
Dim gg_SaisiePrixQteDialog As Object

'
' Bon de commande
'
Global Const I_PasSauve            As Integer =   -1
Global Const I_IDBon2Cmd         As Integer =    0
Global Const I_RefFacBon2Cmd      As Integer =   1
Global Const I_EncaissBon2Cmd      As Integer =   2
Global Const I_DateBon2Cmd         As Integer =   3
Global Const I_StatusPayeBon2Cmd   As Integer =   4
Global Const I_IDClientBon2Cmd      As Integer =   5
Global Const I_TotalBon2Cmd         As Integer =   6
Global Const I_StatusModBon2Cmd      As Integer =   7

'
Global Const C_NBMAXBON2CMD      As Integer   =   520   

'===  Le tableau
Global listeBon2Cmd(C_NBMAXBON2CMD,C_NBMAXFLDB2C) As New
com.sun.star.beans.PropertyValue

'===  l'index
Global nbBonDeCommande       As Integer
' L'index du bon de commande dans la liste des bon de commandes
Global indexBon2CmdCourant      As Integer

'
' Lignes de Produit du Bon de command Courant
'
Global Const I_IDBon2CmdLignes            As Integer =   0
Global Const I_IDProduitLignes            As Integer =   1
Global Const I_IDCondiLignes            As Integer =   2
Global Const I_QuantiteLignes            As Integer =   3
Global Const I_PrixLignes               As Integer =   4
Global Const I_RemiseLignes               As Integer =   5
Global Const I_Commentaire               As Integer =   6
Global Const I_RefProduitLigne            As Integer =   7
Global Const I_TextCondiLignes            As Integer =   8
Global Const I_DescrProduitLignes         As Integer =   9
Global Const I_LigneInDB               As Integer =    10

' Etat de la ligne
Global Const STATUS_LIGNE_FROMDB         As Integer =   1
Global Const STATUS_LIGNE_NEW            As Integer =   2
Global Const STATUS_LIGNE_DELETEDFROMDB      As Integer =   3
Global Const STATUS_LIGNE_DELETEDNEW      As Integer =   4

'
'  Tableau des lignes/produit d'un bon de commande
'===  Les tailles
Dim Const C_PRODUITNBMAX_BON2CMD      As Integer =   800
Dim Const C_NBMAXCHAMPPRODUIT_BON2CMD   As Integer =     11

'===  Le tableau
Global lignesProduitBon2Cmd(C_PRODUITNBMAX_BON2CMD,C_NBMAXCHAMPPRODUIT_BON2CMD)
As New com.sun.star.beans.PropertyValue
'===  l' index
Global nbLigneProduitsB2C    As Integer

' Chaine remplacees dans le Writer...
Dim const DATEDUJOUR                  As String =    "<!Date!>"
Dim const NOMCLIENT                     As String =    "<!NomClient!>"
Dim const REFCLIENT                     As String =    "<!RefClient!>"
Dim const REFBDC                     As String =    "<!RefBDC!>"
Dim const NUMBDC                     As String =    "<!NumBDC!>"
Dim const DATEBDC                     As String =    "<!DateBDC!>"
Dim const TOTALBDC                     As String =    "<!Totalbdc!>"
Dim const LISTEPROD                     As String =    "<!ListeProd!>"

Dim const CODEVRP                     As String =    "<!Codevrp!>"
Dim const TITRE                        As String =    "<!Titre!>"
Dim const TYPECLT                     As String =      "<!Type!>"
Dim const ADRESSE                     As String =      "<!Adresse!>"
Dim const COMPADRESSE                  As String =      "<!compladresse!>"
Dim const CODEPOSTAL                  As String =      "<!cp!>"
Dim const VILLE                        As String =    "<!Ville!>"
Dim const TELEPHONE                     As String =    "<!Tel!>"
Dim const DATELIV                     As String =    "<!Datelivr!>"
Dim const HEURELIV                     As String =    "<!Hlivr!>"
Dim const ADDRLIV                      As String =    "<!Adresselivr!>"
Dim const COMMLIV                     As String =    "<!Commentlivr!>"


Dim Const GG_VERSION   As String = "v1.0a"         
Global userName         As String
Global selectedDBName   As String

'=========================================
'   Global OO objects      
'=========================================
Global oLib As Object
'=========================================
'   Data Bases      ===>>
'=========================================
Global gg_DbContext       As Variant
Global gg_DbConnection      As Object
Global gg_DataSource      As Object
Global gg_Tablenames()      As Variant
Global gg_Querynames()      As Variant

'
' Declaration des bases utilisables
'
Global Const I_NomBase         As Integer =    0
Global Const I_NomMachine      As Integer =   1

'
'  Tableau des bases et machines utilisable
'===> Les tailles
Dim Const C_NBMAXCOUPLES      As Integer =   2         ' 2 bases de données
Dim Const C_NBMAXNOMS         As Integer =     2         ' 2 Nom (base + 
machine)

'===> Le tableau
Global listeDataBases(C_NBMAXCOUPLES,C_NBMAXNOMS) As New
com.sun.star.beans.PropertyValue

'=========================================
'   Dialogues      ===>>
'=========================================
Global gg_loginDialog          As Variant
Global gg_gestionDialog       As Variant

' Pour le fourre tout !
Dim oDialogModel as Variant
Dim oDialogControl as Variant

'=========================================
'   Result SET      ===>>
'=========================================
Global gg_ClientRS         As Variant
Dim Const NUMBER_SEPARATOR   As String = ","


'=========================================
'   Template      ===>>
'=========================================
' Chemin d'accès  "Pris dans SelectionOTT" ?
Dim Const CHAINE_CHEMIN_TEMPLATE         As String =   
".openoffice.org2/user/template/AlteaBDC.ott"

'=========================================
'   UseFull Indicators
'=========================================
Global progressBar         As Variant

'==============================
'  Comportement
'===============================
Global current_username   As String
Global selectedProduits() As String
Global gg_Debug As Boolean


'==========================
' D E C L A R A T I O N S
'==========================
'   Global OO objects      
Global gg_ProduitRS   As Variant
Global gg_SelectProduitDialog    As Object
Global listePosProduitsSelectionnes() As Integer
'
Dim Const C_NBMAXPRODUIT      As Integer =   800      ' Nombre maximal de 
produit
Dim Const C_NBMAXFLDPROD      As Integer =   5      ' Nombre de field (champ)
dans un enregistrement produit
'
' Produit
'
Global Const I_IDPProduit         As Integer =   0
Global Const I_RefProduit         As Integer =   1
Global Const I_DescProduit         As Integer =   2
Global Const I_IDCondiProduit      As Integer =   3
Global Const I_TextCondiProduit      As Integer =   4

'
Global tousLesProduits(C_NBMAXPRODUIT,C_NBMAXFLDPROD) As New
com.sun.star.beans.PropertyValue
Global nbProduit   As Integer



'
' Result Sets
'
'   Global OO objects      
Global gg_RappelDuJourRS   As Variant

'
' Global au module
'
'Dim gg_RappelDuJourDialog As Object

'
' Liste des Rappels
'

Global Const I_IDClientRap         As Integer =    0
Global Const I_RefClientRap         As Integer =   1
Global Const I_NomClientRap         As Integer =   2
Global Const I_TelClientRap         As Integer =   3
Global Const I_VendeuseRap         As Integer =   4
Global Const I_FlagRap            As Integer =    5

'
'  Tableau des Rappels du Jours
'===> Les tailles
Dim Const C_NBMAXRAPPELS      As Integer =   100         ' 100 Clients à
Rappeler dans la journée
Dim Const C_NBMAXFLRAP         As Integer =     6         ' Valeur ou type de
donnée incorrecte index en dehors de la plage définie !!! :-(

'===> Le tableau
Global listeRappels(C_NBMAXRAPPELS,C_NBMAXFLRAP) As New
com.sun.star.beans.PropertyValue
'===> l' index
Global nbRappel       As Integer

-------------------------------------------------------------------------------

I hope you will be able to reproduce this bloking problem, and then to send me a
correction... I will try to keep my platform, until you correct it. Else I will
stop developpement under OO and move back to MS Access, not happy to do so but,
My sponsor (no money) is starting over with MS Access on the second plateform, I
keep the master one to get the last chance of keeping all my effort with OO..
Crossing fingers...

Thanks in advance. Contact me if you need additional information..

GG.

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to