Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 [autotext] Global variables

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
gosh 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?
6   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Jun 30 2007 : 07:30:19 AM
How many variables do you need? Are environment variables a reasonable solution?
gosh 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 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.
gosh 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 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.
sl@sh 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

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000