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
test for RESOURCE
test for RESOURCE
HI, somehow the quotation marks does not copy correcly from the manual, so you must retype them with the "" marks.
Further more you must take care that the path is correct.
Or the resource file is in the same folder where your application file is (.bas).
Then it should work.
best regards
Further more you must take care that the path is correct.
Or the resource file is in the same folder where your application file is (.bas).
Then it should work.
best regards
test for RESOURCE
Yes, you has right with the quotation marks.
Bat interesting, without the 2 quotation marks the filename is good too!
And, the line in the sample:
Stream.close
is wrong, there are not method close in memorystream...
Best regards
PaPi
Bat interesting, without the 2 quotation marks the filename is good too!
And, the line in the sample:
Stream.close
is wrong, there are not method close in memorystream...
Best regards
PaPi
test for RESOURCE
Yes you`re right there is no close method for the memorystream, I think i confused it with the file object during the writing of the example.
best regards
best regards