PDA

View Full Version : String table variables



DLee65
06-16-2005, 01:04 PM
Can string table values contain variables for items such as WINDISK?
If so what is the proper method to call it within the string. I know I can use %p for the product name.

Thanks.

DLee65
06-17-2005, 02:15 PM
I have tried playing around with this idea some and have not been happy with the results.

It seems that I cannot even use %P in some dialogs. If it is not a SdDlg then the %P fails to resolve to IFX_PRODUCT_NAME.

I have been thinking about a solution however. I am thinking about creating a function that will parse the string table value (searching for %?) delete %P and then SUBSTR %P with IFX_PRODUCT_NAME. I could also enhance the function to insert things like %F for folder name or other similar items.

so when I want a MessageBox to use a string table value - and the value contains %P in it, then I would call it this way.

svMsg = BuildString (@MYSTRING_TABLE_VALUE)

BuildString would return the configured string.

RobertDickau
06-17-2005, 02:20 PM
Perhaps look into the TextSub object and functions?

esiemiat
06-17-2005, 04:06 PM
You can call SdSubstituteProductInfo before passing a string to any dialog that doesn't automatically substitute this information itself.

DLee65
06-18-2005, 11:44 AM
Now that is exactly what I was looking for.

I don't seem to recall that this was mentioned in my IS training but that was two years ago too.

Just a suggestion to Macrovision to consider emphasizing this in their training if it is not already.

Also, please note that %P is not searchable in the help documentation. I had tried searching for this reference before posting and no search results were returned.

DLee65
06-18-2005, 11:54 AM
Thank you both for your excelent replies.

The solution for SdSubstituteProductInfo answers my particular problem for now, however, I can see some excellent uses for the TextSub Object as well.

DLee65
08-09-2005, 02:10 PM
I have since moved on to another solution that I had not thought of before. My solution for now that always works - use Sprintf to fill a variable and pass the value to the dialog. That way there I can pass in IFX_PRODUCT_NAME and any other value in any order that I want.

Not sure why I did not think of it before.