Print Page | Close Window

Focus changing event causing a crash

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=19581
Printed Date: 27 November 2024 at 10:07am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Focus changing event causing a crash
Posted By: mhe240
Subject: Focus changing event causing a crash
Date Posted: 16 March 2012 at 3:13pm
Private Sub vsg_FocusChanging(ByVal NewRow As XtremeReportControl.IReportRow, ByVal NewColumn As XtremeReportControl.IReportColumn, ByVal NewItem As XtremeReportControl.IReportRecordItem, Cancel As Boolean)

Dim Row As XtremeReportControl.IReportRow
Static InHere As Boolean
If InHere Or NewRow Is Nothing Or NewColumn Is Nothing Or NewItem Is Nothing Then Exit Sub
InHere = True
If NewRow.Index < vsg.FocusedRow.Index And KeyUpPressed Then
    KeyUpPressed = False
    Set Row = MoveUp(NewRow, NewColumn, NewItem)
Else
    Set Row = MoveDown(NewRow, NewColumn, NewItem)
End If
If Row Is Nothing Then
ElseIf Row.Index = NewRow.Index Then
    If NewColumn.Index = COL_OTHER Or Not m_hasOther Then
        vsg.FocusedColumn = vsg.Columns(COL_ANSWER)
    End If
Else
    Set vsg.FocusedColumn = vsg.Columns(COL_ANSWER)
    Set vsg.FocusedRow = Row
    Cancel = True
End If
Set Row = Nothing
InHere = False
End Sub

when End Sub is invoked, this crashes, move up and move down tries to find the next valid line that can be focused on.    I am working on a different way to do this.  It seem some sort of issue occurs and cause the IDE to crash.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net