Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 auto template can't handle long string
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

chenlee
Junior Member

11 Posts

Posted - Mar 17 2004 :  9:18:02 PM  Show Profile
If the template is long, then "insert code template" might fail.

Below is a test cpp.tpl.

You click "insert code template" button, then select "test" in popup menu. And othing happens :(

But if you remove several lines from the template, then everthing will be OK.

I'm using vs.net 2003 english version on WinXP Pro, with va.x build 1221.

=================================================
readme:
Autotext and Code Templates for Visual Assist X
FF
FF
readme:
Code Templates follow. All entry names contain a space.
FF
FF
test :

1234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890
1234567890123456789012345678901234567890123456789012345678901234567890

FF
FF
==========================================================



Edited by - chenlee on Mar 27 2004 1:04:39 PM

chenlee
Junior Member

11 Posts

Posted - Mar 27 2004 :  1:08:07 PM  Show Profile
No one has this problem?

Currently, I have to split long template into several parts to avoid this problem. It's very annoying.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Mar 27 2004 :  1:32:53 PM  Show Profile
so far the only templates i have added have been rather short.

off hand i cannot think of any code i have ever produced that would require lines even close to the length of your example, so i would guess this isnt a common issue.

zen is the art of being at one with the two'ness
Go to Top of Page

chenlee
Junior Member

11 Posts

Posted - Mar 27 2004 :  11:52:19 PM  Show Profile
You may be right. But I do use such a long template :(
And most of time, this kind of limitation is not by purpose, but by some kind of flaw in the production.
Go to Top of Page

WannabeeDeveloper
Tomato Guru

Germany
775 Posts

Posted - Mar 28 2004 :  05:22:04 AM  Show Profile
I have just tested it with a "complete DialogProcedure" for Autotext and it works.

Has more lines than your entry, works here...


Edited by - WannabeeDeveloper on Mar 28 2004 07:05:38 AM
Go to Top of Page

John_H_Bergman
Tomato Guru

USA
198 Posts

Posted - Mar 28 2004 :  3:20:31 PM  Show Profile
I too have seen this. I think it is not related to the number of lines, but to the number of characters

John H. Bergman
CTO
SiliconZone


[email protected]

To Send email, remove the .online.
Go to Top of Page

edt
New Member

9 Posts

Posted - Mar 31 2004 :  1:42:03 PM  Show Profile
Yup, I've got the same problem. I just encountered it this morning, searched the forum, and found this thread. I've done some experimenting (mostly just cutting and pasting fragments of my code template between MS-Word and the editor, and using Word to do character counts), and it looks like the upper limit is around 1900+ characters. This is suspiciously close to 2K (2048) characters, so if there is extra stuff that VA uses in the buffer, that could explain it.

So, WT Support:

1) Can you increase this buffer size? This is a useful feature -- I use it to generate skeleton source files that follow a certain pattern, then modify them to a certain purpose. BTW, my longest template (~2400 characters) worked just fine in VA6.0.

2) If you can't increase the buffer size, can you at least pop a dialog (or insert text) that says "Code Template limit of XXXX characters exceeded"?

3) A somewhat unrelated comment, but close to this topic: I miss the way I could edit code templates in VA6.0 (that is, the file showed up in a regular editor window). I could jump back and forth between the template file and a source file, testing and "debugging" my templates as I wrote them. I could simply press CTRL-S to save the template file, which acted like "Apply". If there's still a way to do this, I'm missing it. If not, would you consider going back to the old way?

Here's my current info:

VA_X.dll file version 10.0.1221.0
Licensed to:
VA 6.0: <email omitted> (1-user license)
VAOpsWin.dll version 1.0.0.44
MSDev.exe version 6.0.8168.2
Devshl.dll version 6.0.8168.0
Devedit.pkg version 6.0.8168.0
Font: Courier -16(Pixels)
Comctl32.dll version 5.82.2800.1106
WindowsNT 5.1 Build 2600 Service Pack 1
Single processor

Platform: Win32 (x86)
Stable Includes:
C:\\Program Files\\Microsoft Visual Studio\\VC98\\INCLUDE;
C:\\Program Files\\Microsoft Visual Studio\\VC98\\MFC\\INCLUDE;
C:\\Program Files\\Microsoft Visual Studio\\VC98\\ATL\\INCLUDE;

Library Includes:
C:\\Program Files\\Microsoft Visual Studio\\VC98\\MFC\\SRC;
C:\\Program Files\\Microsoft Visual Studio\\VC98\\MFC\\INCLUDE;
C:\\Program Files\\Microsoft Visual Studio\\VC98\\ATL\\INCLUDE;
C:\\Program Files\\Microsoft Visual Studio\\VC98\\CRT\\SRC;

Other Includes:


Thanks,
Ed
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Mar 31 2004 :  3:27:42 PM  Show Profile
We will consider increasing the buffer size and/or displaying a warning. Both are reasonable.

We have many improvements for our templates. Our list is big.

You are welcome still to edit autotext and templates using an outside editor. We realize the editor in our options dialog is fairly limited. Find the templates in the Misc subdirectory of the VA X installation directory. Press the "Insert Code Template" button in the VA X toolbar to force VA X to reread templates. Press ESC to clear the menu. No need to select a template.

http://www.wholetomato.com/products/features/templates.html?more=yes

Whole Tomato Software, Inc.

Edited by - support on Mar 31 2004 3:33:27 PM
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Apr 01 2004 :  1:05:15 PM  Show Profile
Build 1224 will have unlimited template size.

Whole Tomato Software, Inc.
Go to Top of Page

jpizzi
Tomato Guru

USA
642 Posts

Posted - Apr 03 2004 :  12:21:23 AM  Show Profile
quote:
I miss the way I could edit code templates in VA6.0 (that is, the file showed up in a regular editor window).

This still works for me, in both VS 6 and VS .NET (C++)(both using VA X 1219). You right-click on the left margin of the editing window, and select "Edit code templates."

Joe Pizzi
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000