Author |
Topic |
|
gosh
Junior Member
14 Posts |
Posted - Jun 29 2007 : 07:04:08 AM
|
Setting upp global variables in some textfile that is read by VA. Later these variables could be used expanding autotext. Is this possible now?
|
|
sl@sh
Tomato Guru
Switzerland
204 Posts |
Posted - Jun 29 2007 : 09:17:42 AM
|
You mean, like auto-generating some 'METHOD_DOCU' tag for all the functions, then have them auto-expand all at once to 'refactor-document-method'? I don't think that's currently possible, but certainly an intriguing idea, especially for those using UML tools to generate their basic code model.
I suppose feline can easily come up with a lot of corner case examples, so you better be prepared to pin down your idea more precisely |
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Jun 29 2007 : 12:42:52 PM
|
What, me?
gosh I am really not sure what you are talking about here. Do you mean add a string SPECIAL_WORD to an autotext entry, and then have VA replace SPECIAL_WORD with some specific text *when* the autotext item is inserted? If this is what you want then just use $SPECIAL_WORD$ instead and VA will prompt you for the value of SPECIAL_WORD when you insert the autotext entry.
Alternatively use an environment variable, which will be expanded when the autotext entry is inserted:
http://www.wholetomato.com/products/features/autotext.asp
If you want to replace all instances of SPECIAL_WORD at a later date then this is really a job for Find and Replace, or possibly Rename, depending on what you have done. |
zen is the art of being at one with the two'ness |
|
|
gosh
Junior Member
14 Posts |
Posted - Jun 29 2007 : 2:18:43 PM
|
What I mean is that I would like to set upp my own variables (define names) that later could be used in scripts.
Like this: In a xml file (just one example)
<document>
<variables>
<variable name="USER_NAME" VALUE="My name is bond, james bond" />
</variables>
</document>
Later when this variable it will be replaced with $USER_NAME$ --> My name is bond, james bond
Of course I can hardcode this or search and replace in the autotext file but it would be handy with this kind of functionality |
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Jun 29 2007 : 2:49:14 PM
|
Are you trying to setup a single set of variables to be used on lots of different computers, where the value is different on each computer?
I am not quite sure what you are trying to achieve here.
VA will insert the value of environment variables into autotext, so you can do this with environment variables. Or if this is only being used on one or two computers you can simply edit the file the autotext entries are stored in directly on each computer. |
zen is the art of being at one with the two'ness |
|
|
gosh
Junior Member
14 Posts |
Posted - Jun 29 2007 : 4:31:58 PM
|
quote: Originally posted by feline
Are you trying to setup a single set of variables to be used on lots of different computers, where the value is different on each computer?
Yes that is one reason, to make it simple for all users to have the same type of autotext format. Also to make it more simple to change. We use doxygen and have some "standard" commenting styles. |
|
|
feline
Whole Tomato Software
United Kingdom
19021 Posts |
Posted - Jun 30 2007 : 07:30:19 AM
|
How many variables do you need? Are environment variables a reasonable solution? |
zen is the art of being at one with the two'ness |
|
|
|
Topic |
|