FB II Compiler
Know more about _strResource compile attribute
I'm using Greg Neagle's TCP example in an app I'm writing. I noticed that when the _strResource compile flag was removed from the include file, the program ceased to work. (initNetwork% returned an error; the debugger showed that in the line in OpenTCPDriver that was supposed to assign ".IPP" to DriverName$ certainly did not assign ".IPP" to it, instead assigning it a bunch of garbage.)
This led me to wondering two things:
1) Why won't it function properly if the _strResource flag is not set?
2) What is the advantage of having that flag set? It seems to me that it would provide a very easy opportunity for anyone with minimal ResEdit experience to make serious modifications to the application.
If anyone could explain either of these to me, I would appreciate it.
As I recall, this is an FB bug; all includes must have _strResource set or their string constants won't work properly.
Precisely. You can go in later and hack your program's strings without having to recompile. You can fix spelling errors and make other changes. Most importantly, however, you can let people translate your program's text without having to recompile the app - this was the whole reason resources were invented in the first place.