Hello all.
What is the API2 replacement for TextInputStream.LastErrorCode
dim tis as TextInputStream = TextInputStream.Open(m_fOut)
if tis = nil or tis.LastErrorCode <> 0 then <<<=== here…
return “”
end
Hello all.
What is the API2 replacement for TextInputStream.LastErrorCode
dim tis as TextInputStream = TextInputStream.Open(m_fOut)
if tis = nil or tis.LastErrorCode <> 0 then <<<=== here…
return “”
end
I do not know for sure but I would guess its Try and Catch ?
That is usually the pattern that replaces LastErrorCode pattern.
it is mentioned at notes here
https://documentation.xojo.com/api/files/textinputstream.html#textinputstream
Hello Marcus,
Nothing about LastErrorCode
Thanks anyway!
Tim
read Björn_Eiríksson answer
It should be
dim tis as TextInputStream
Try
tis = TextInputStream.Open(m_fOut)
Catch e as IOException
return ""
End
To be accurate the the LastErrorCode and also explanation in human readable form will be on the IOException object in Tim’s example above.