test for RESOURCE
Posted: Thu Aug 16, 2007 12:42 pm
Hi!
There are file: button.txt . It has one line:
First Button
And there are an example in fnxBasic help:
[code]
RESOURCE test AS ?button.txt?
DIM s AS STRING
DIM stream AS MEMORYSTREAM
Stream.loadresource(test)
Stream.position=0
s=stream.read(stream.size)
Stream.close
showmessage s `this an supplement by PaPi
[/code]
Now, there are two problems:
1. stream.cole -> error on fnxcompiler why?
2. if I delete this line, then fnxcompiler can make exe file. Bat, variable s NOT contain the text of the file button.txt
Why?
Thanks...
PaPi
There are file: button.txt . It has one line:
First Button
And there are an example in fnxBasic help:
[code]
RESOURCE test AS ?button.txt?
DIM s AS STRING
DIM stream AS MEMORYSTREAM
Stream.loadresource(test)
Stream.position=0
s=stream.read(stream.size)
Stream.close
showmessage s `this an supplement by PaPi
[/code]
Now, there are two problems:
1. stream.cole -> error on fnxcompiler why?
2. if I delete this line, then fnxcompiler can make exe file. Bat, variable s NOT contain the text of the file button.txt
Why?
Thanks...
PaPi