| || |
Dynamic tags and passing global variables
Outlook in the Office 11 suite uses the subject line of a message as the first part of the window caption, and "- Message" as the second part. I wrote a function called GetMailCaption:
return(sMailSubject+" - Message")
This function is defined in the t. file
I've also declared the sMailSubject as a global in my .t file.
Here's part of the declaration:
[-] window DialogBox Message2
[ ] tag GetMailCaption()
Question 1: When I put the function call into the declarion, the function comes back undeclared in the compile. How do I tell the compiler that the function is delcared externall? Will extern work?
Question 2: When I delare a global in a .t file, will in the inc file be able to reference it or does it also need to be delared an external?
Re: Dynamic tags and passing global variables
There are a few different ways to accomplish this. One of those ways is...
1) Define the function in an include file "OutlookFuncs.inc" or whatever and "use" that include in your test case using the "use" command.
2) If you want to use a global variable accessible from your .t files and your .inc files, declare the global in your include (*.inc) file. That way, it's accessible from that include, plus any .inc or .t that include it!
Then there's the whole philosophy of using global variables like that, but that's a whole different subject! [img]/images/graemlins/wink.gif[/img]