[mono-vb] FileSystem.FileOpen
Easy_Rider9999
jhmgbl2 at t-online.de
Fri May 15 15:01:09 EDT 2009
I get this Error
LinuxErr: Application Error at 15.05.2009 17:45:05 gstatus: tvMed_MouseMove
HotTracking CodeLoc: _frmImportText.mnuFileOpenT_Click Version: 0.7.8.33413
System.NullReferenceException: Object reference not set to an instance of an
object
at Microsoft.VisualBasic.FileSystem.FileOpen (Int32 FileNumber,
System.String FileName, OpenMode Mode, OpenAccess Access, OpenShare Share,
Int32 RecordLength) [0x00000] in
/media/disk-1/Downloads/Linux/mono-basic-2.4/vbruntime/Microsoft.VisualBasic/Microsoft.VisualBasic/FileSystem.vb:291
at Repetit.net.T.SQLite.frmImportText.mnuFileOpentT_Click (System.Object
sender, System.EventArgs e) [0x00000]
Innerexception:
In this procedure (as well in a similar procedure):
Private Sub mnuFileOpentT_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles mnuFileOpentT.Click
Dim FileName As String
Dim FileNr, fLen As Integer
cdlg1.CheckFileExists = True
If cdlg1.ShowDialog = Windows.Forms.DialogResult.OK Then
Try
FileName = cdlg1.FileName
FileNr = FileSystem.FreeFile
fLen = CInt(FileSystem.FileLen(FileName))
FileSystem.FileOpen(FileNr, FileName, OpenMode.Input,
OpenAccess.Read, OpenShare.Shared)
txtImport.Text = FileSystem.InputString(FileNr, fLen)
Catch ex As Exception
#If Linux Then
LinuxErr(ex, "_frmImportText.mnuFileOpenT_Click")
#Else
Throw New ApplicationException("_frmImportText.mnuFileOpenT_Click
Error", ex)
#End If
Finally
Try
FileSystem.FileClose(FileNr)
Catch
End Try
End Try
'FileNr = modFileFunc.Fileopener(FileName, modFileFunc.READFILE,
False)
'txtImport.Text = InputString(FileNr, CInt(FileLen(FileName)))
'FileClose(FileNr)
End If
End Sub
What can I do?
Regards
Hans
P.S. Execution wit .Net Framework gives not error. I get this error only
with Mono 2.4!
--
View this message in context: http://www.nabble.com/FileSystem.FileOpen-tp23565338p23565338.html
Sent from the Mono - VB mailing list archive at Nabble.com.
More information about the Mono-vb
mailing list