Using a Label

Please report bugs.

Using a Label

Postby Henning » Tue Mar 08, 2011 9:52 pm

Label ReGetUnitData by-passes declaration of i in line 234 in file Module2.QObject
...If
DoEvents()
Code: Select all
    lanBuf = ""
'***    TimeOut = Timer + 60
    TimeOut = 60
ReGetUnitData:
    frm_Config.txtBox = "Retreiving " & UnitType[optUnit] & " Config, wait!" & vbCrLf
    Do
      If Len(lanBuf) > 17 Then
        Break
      End If                '*** THIS IS LINE 234
      DoEvents()
    Loop While TimeOut > 0    '***While Timer < TimeOut
    UnitSettings = lanBuf
    If Len(UnitSettings) > 17 Then
      If Asc(Left(UnitSettings, 1)) = msgGetExtSetup Then
        RAUnitData_UType = Asc(Mid(UnitSettings, 2, 1))
        RAUnitData_UCh = Asc(Mid(UnitSettings, 3, 1))
        RAUnitData_USys = Asc(Mid(UnitSettings, 4, 1))
        RAUnitData_Uunit = Asc(Mid(UnitSettings, 5, 1))
        RAUnitData_UPwr = Asc(Mid(UnitSettings, 6, 1))
        RAUnitData_USpc = Asc(Mid(UnitSettings, 7, 1))
        RAUnitData_USpc1 = Asc(Mid(UnitSettings, 8, 1))
        RAUnitData_USpc2 = Asc(Mid(UnitSettings, 9, 1))
        RAUnitData_USpc3 = Asc(Mid(UnitSettings, 10, 1))
        RAUnitData_USpc4 = Asc(Mid(UnitSettings, 11, 1))
        RAUnitData_USpc5 = Asc(Mid(UnitSettings, 12, 1))
        RAUnitData_USpc6 = Asc(Mid(UnitSettings, 13, 1))
        frm_Config.txtBox = frm_Config.txtBox & vbCrLf & "Done!" & vbCrLf
        rslt = True
      Else
        lanBuf = Right(lanBuf, Len(lanBuf) - 18)
        If TimeOut > 0 Then    'Timer < TimeOut Then
           GoTo ReGetUnitData
        End If
      End If
    Else


/Henning
Henning
 
Posts: 523
Joined: Fri Aug 13, 2010 6:29 pm

Re: Using a Label

Postby berndnoetscher » Thu Mar 10, 2011 11:59 am

Henning,

cannot locate the error. Could you please provide a more complete source code listening? Thanks in advance.
berndnoetscher
Site Admin
 
Posts: 344
Joined: Thu Mar 25, 2010 9:57 am

Re: Using a Label

Postby Henning » Sat Mar 12, 2011 6:51 pm

It happened when I uncommented the line with the label.

If I comment-out the label ReGetUnitData: and a bit down in code Goto ReGetUnitData, there is no error.

Tested by inserting MyLabel: in another module, same result.
Label MyLabel by-passes declaration of i in line 31 in file frm_InitLAN.QWidget
...Else

It must have to do with adding a label.

/Henning
Henning
 
Posts: 523
Joined: Fri Aug 13, 2010 6:29 pm


Return to Bug Reports

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

cron