Hi, I have developed an Application that include a listbox.
I wrote a code within the listbox CellKeyDown event to use the Tab and Return keys.
This code works fine in Mac but it crashes on Windows, any suggestion? (Windows 10)
select case key
case chr(9) 'Tab Key
If Row<9 then
if column = 3 and me.Cell(Row+1,2) ="Custom" then
iColumn = 3
iRow = row+1
me.EditCell(iRow,iColumn)
else
me.EditCell(row, column+1)
end if
if column = 5 then
me.EditCell(row+1, 4)
End If
Else
If Row<12 then
me.EditCell(row, column+1)
if column = 5 and Row+1<>12 then
me.EditCell(row+1, 3)
End If
End If
End If
case chr(13) 'Return Key
me.EditCell(row+1, column-1)
Else
where you indicate ROW+1 (or iROW)… is that value still less than ROWCOUNT at that point in the code?
but that would cause a crash on BOTH OSX and WIN, same with COLUMN-1 etc.
Ok… but posting pictures with no context, and an error box that is not only too small to read, but if it were legible, not everyone understands spanish…
and now that you mention 2016, did you follow the instructions about the “redistributables” required by windows now?
Maybe I misunderstand. If you compile the program, does it do the same thing? If you set the compatibility of XOJO ( if running from IDE, or your .exe ( if compiled ) to Win 7 does that help?
[quote=262152:@Hernan Pisani]If error <> Nil Then
Dim type As String = Introspection.GetType(error).Name
MsgBox(type + EndOfLine + EndOfLine + Join(error.Stack, EndOfLine))
End If[/quote]
Do this instead :
If error <> Nil Then
Dim type As String = Introspection.GetType(error).Name
System.debuglog(type + EndOfLine + EndOfLine + Join(error.Stack, EndOfLine))
End If
That way the message will go into the messages area of the IDE that you reach by clicking the third icon under the central pane.
With some luck the program will have the time to display the stack before crashing.
That’s a crash, not an exception. It’s not going to call UnhandledException. It also explains why the debugger doesn’t just stop on the line that causes the exception. Submit a minidump with a feedback report.