Create a resources file - two questions
normschaef
Posts: 17
All:
I've searched for an answers for these on the forum, but couldn't find them. If they're here can you point me to the topics?
Q1 - In other programming, many of the common items (strings, image files, layouts) are contained in a resources files. To assist my faculty, I'm working on a number of help popups or tool tips to be dynamically generated on the touch panel. However, I'd rather not have to open and re-compile source code simply to correct a spelling error, clean-up wording or similar correction. I'd simply like a resource file with my help strings that I can edit in notepad and have it called at runtime.
I thought the answer would be, as in php and others, to create an include file. I figured I could call it with #INCLUDE, but I can't seem to create a file that simply contains....
Do I need to add #IF_NOT_DEFINED for all my touch panels as part of the include?
Q2 - What would be the best way to add a CR/LF to a multi-line help file?
1. Here's step one. (CR/LF)
2. How about step two (CR/LF)
3. If you're here, you've gone too far.
TIA for all your help.
I've searched for an answers for these on the forum, but couldn't find them. If they're here can you point me to the topics?
Q1 - In other programming, many of the common items (strings, image files, layouts) are contained in a resources files. To assist my faculty, I'm working on a number of help popups or tool tips to be dynamically generated on the touch panel. However, I'd rather not have to open and re-compile source code simply to correct a spelling error, clean-up wording or similar correction. I'd simply like a resource file with my help strings that I can edit in notepad and have it called at runtime.
I thought the answer would be, as in php and others, to create an include file. I figured I could call it with #INCLUDE, but I can't seem to create a file that simply contains....
DEFINE_CONSTANT ttMakeCall = 'Here's the tooltip that tells faculty how to place a call.' ttConference = 'Here's the tooltip with hints about conferencing' . . .
Do I need to add #IF_NOT_DEFINED for all my touch panels as part of the include?
Q2 - What would be the best way to add a CR/LF to a multi-line help file?
1. Here's step one. (CR/LF)
2. How about step two (CR/LF)
3. If you're here, you've gone too far.
TIA for all your help.
0
Comments
2) The send_command to update text on a touch panel will read the pipe character " | " as a CR/LF equivalent so a string like this: "one|word|per|line" will do what it says.
FYI - If you are capturing user data from the touch panel keyboard and saving that out to a file, you might want to filter for CR/LF, since that will come back as part of the keyboard input, and translate it into " | " to put in the save file.