T O P I C R E V I E W |
alextooter |
Posted - Oct 15 2007 : 11:56:50 AM Hi, When we type code in VC, for example, forr, the snippet:
for (int $Index$ = $Length$ - 1; $Index$ >= 0 ; $Index$--) { $end$ }
will popup a dialog that you can fill the index and Length, but sometimes we need the Index will be something like radio button, e.g index = 1 or index =2, could vax popup a choice list that we can choose from them.
the snippet will be like this: for (int $Index=1,2$ = $Length$ - 1; $Index$ >= 0 ; $Index$--) { $end$ }
or if (string $String="this is choice one","this is choice two"$)
|
3 L A T E S T R E P L I E S (Newest First) |
feline |
Posted - Oct 17 2007 : 09:20:30 AM Yes and no. The first response is "are you a mouse or a keyboard user?"
The next problem is that we risk changing the behaviour of existing snippets, since you can no longer place a comma into the defaults.
If you are a keyboard user then a set of radio buttons appearing in the middle of the dialog is a bad thing, since this makes the whole experience a lot slower and harder to use. For a mouse user it is a reasonable idea.
However what happens when someone comes along and has 8 options? 15 options?
I see the appeal, but I also see some problems with this.
Building on your second example I settled on:
// $end$ [$MONTH$/$DAY$/$YEAR$ %USERNAME%] // $reason=updated modified deleted$
When the prompt dialog appears it is filled with updated modified deleted, so I can quickly and easily use SHIFT+CTRL+arrow keys to delete the words I do not want, leaving me with just the word I do want. |
alextooter |
Posted - Oct 16 2007 : 09:27:35 AM Sorry for the unclear examples, let me show you another one,
e.g /* $Reason=Add,Remove,Modify$ by $USERNAME$ */
VAX will parse the symbol $Reason=Add,Remove,Modify$, and get three choices, when you type /*,
VAX will give you three choices, "Add", "Remove", or "Modify", it's help us to speed up comment process, isn't it? |
sl@sh |
Posted - Oct 16 2007 : 06:55:21 AM What would the 1 and 2 stand for - do you mean choice-1 and choice-2? Because $index$ stands for a symbol in the example you gave. That said, I think the example is not a very good one. I have to admit I cannot think of a better one at the momoent though.
I do like the general idea however, to be able to use some kind of radio list as a placeholder in autotext - if nothing else it would help reduce typing errors |
|
|