Other Strange behavior with RandomAccessfile

grafsoft

Well-Known Member
Licensed User
Longtime User
This code works:

Dim iss As InputStream
iss=File.OpenInput (File.DirAssets,fname)
Dim bb(1024) As Byte
iss.ReadBytes (bb,23,4)

This does not work, "File not found":

Dim raf As RandomAccessFile
' Error in the following line
raf.initialize (File.DirAssets,fname,True)

i=raf.ReadInt (23)

Why? The variable fname is the same, I controlled also uppercase letters.
 

DonManfred

Expert
Licensed User
Longtime User
Check the expected parameters for the initialize method of RandomAccessfile and compare them with the parameters given.

ETA:
Sorry, i copied the wrong initializemethod
 
Last edited:
Upvote 0

grafsoft

Well-Known Member
Licensed User
Longtime User
My mistake. It is not posssible to open a file in file.dirassets with this object.
Thank you.
 
Upvote 0
Top