XML Code templates

Started by JJK, November 25, 2008, 08:15:49 PM

Previous topic - Next topic

JJK

My HE : 1.40 beta 535 on Vista (no SP1)
When I try to add some code template for XML, sometimes HE crashes, sometimes I succeed. But even then the new code template doesn't work (nothing happens).

alex

Hello,

can you provide some more details how to reproduce the crash?

Sequence of actions:
- How you add it (with Tools->Options->Synatax Settings->XML->Code Templates or with Extract template with context menu)
- What you have pressed
- What was a key and text
- How you tried to expand template with key sequence typed or with shortcut?
- Exactly when Hippoedit crashed?

I have tried to add template with shortcut:
Key: <new
Text:
<new>
    %|%
<new/>

and can expand it without any problem as with shotcut as with key sequence.

Best regards,
Alex
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

JJK

At work (Win XP-SP2)  with HE1.40b522 it works fine.
I'll re-try later under HE 1.40b535/Vista.

alex

Hm...
I dont remember any direct change, that can somehow influence the Code Templates management in last version (from 522 till 539 for sure)..

Try, and if you can reproduce I would be really interested in fixing this, because planning to release 1.40 very soon.

Thanks a lot in advance. But dont forget more detail explanantion of scenario ;)
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

JJK

#4
Back to home under HE1.40b539/Vista (I just discovered that release)
Sequence of actions:
by Tools->Options->Syntax Settings->XML->Code Templates
thenĀ  I click on Add button, I enter "zzz" in Key's box (in the same time Description box fills with "zzz" then I click on OK button.
I receive at this instant a standard Vista's message "HippoEdit.exe stopped working" or so (I use french local Vista) with only the button "Close the program"

Today, because I didn't succeed to create any code template (for XML only) I am not able to check expanding. I am even not able to enter the text corresponding to the code template.

Unfortunately I did the same thing for "Default" and "Default text|source" syntax and I received the same crashing (I entered any string instaed "zzz"). But not for "VisualBasic" and numerous other syntax. It is very weird for me.

Good searching

and anyway HE is a very intersting job.

JJK

alex

Thanks a lot for the description.

I can reproduce it now and have already fixed the crash and several others I have found related to editing of the templates (Show inherited was not stored and if you use shortcuts, they overwrite template key).

You can download new version (542) from web site:
http://www.hippoedit.com/download/hippou140.exe

But today I have found some other possible bugs,  related to update of templates for nesting languages.
So I would publish soon newer version with additional fix. But for now you can use version from web site, it at least does not have a crash.

And once more thanks a lot for bug report.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

JJK

With build 542/Vista, now adding CT works fine. But... I can't remove the added CT (always in VB or XML syntax) but for Perl syntax I can remove it.
I didn't check elsewhere.

alex

Can you please recheck with 543 from today.
I did several fixes in handling of inherited code templates and hope now it should work.

Thanks a lot for your help in advance.

New version you can download as before here:
http://www.hippoedit.com/download/hippou140.exe
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

JJK

Sorry but with build 543/Vista,  same issue : I can't remove the added CT (always in VB or XML syntax) but for Perl syntax I can remove it.
More, when I open the Tools/Options window, the cursor remains always on the same item in syntax list instead of the last selected when exiting HE. I thought that the selected item when re-open that window would be the one selected when exiting.

alex

Unfortunately I coud not reproduce this :/
In my case I can delete any template.
- Is this happen only with old templates, or even if you create new, you could not delete it (this is what I have tested)?
- What happens whan you select template in the lsit and press Delete? The template just no deleted or some message pops up? Or deleted templates reappear after restart?
- Are you directly edit XML templates or first check some other options pages?
- Which types of document you have opened before trying changing templates? (XML, HTML, VB ..)

Can you provide this detals? I would try to reproduce the problem.

QuoteMore, when I open the Tools/Options window, the cursor remains always on the same item in syntax list instead of the last selected when exiting HE. I thought that the selected item when re-open that window would be the one selected when exiting.
Generally, this is works as designed. Hippoedit does not store last open page between session, and opens settings for currently active syntax, and then stores position in session. Untill new version (544). Now selected page persist also between sessions.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

JJK

It is difficult to reproduce exactly the problem. But with build544/Vista I can now delete the new templates I ceated, but not the oldest. And I succeeded also to delete the first created, but only after I have created a new one. And now, the last created remains... So it seems I have not understood what I have to do to delete a template.
Here is what I do : I create a template (CT) by clicking [Add]. Then I enter some text and I click [Apply] then [OK]. I quit HE. Then I open HE. The CT created work fine. I try to delete the last created CT by selecting it then clicking [Delete] then [Apply] then [OK]. The CT disappears, no error message. I quit HE. But when I re-open HE and /Tools/Options/Syntax, the CT I had deleted is always there and... it works fine.

In some circumstances I can delete some CT, sometimes the first created, and once (only once, but I don't know how I made that) the last creatd CT was really deleted (ie not there when re-open HE). But even when I deleted cleanly the last created CT, some anterior CT didn't want disappear. So I have always at least one CT in my list.

All those operations were realized directly on XML templates, without have opened other syntax setting.

QuoteWhich types of document you have opened before trying changing templates? (XML, HTML, VB ..)
Today XML only. I have tried also to delete the html CT I had created in XML and inherited from XML. There also, the CT seems dead, ie it doesn't appear neither in XML nor in Html. But when I re-open HE, they relive. Frustrating, isn't it ?

alex

Frustrating, I am agree :)

Maybe there is a problem with your syntax files (wrong entries created with one of betas or maybe some files are read only...)

Can you please send me all your XML files from HippoEDIT directory \data\syntax, I would check this your files. I think then I would have better chance to catch this. Send me packed files to supportbox at hippoedit com. I would try to fix this as fast as possible.
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

JJK

#12
Hello Alex
I'm back late. Now I try build 546 on XP. I have uninstalled completely previous release, included user settings. So HE's dir didn't longer exist. Then I installed b546. And I created some template, named "key1" for... guess it... XML (yes !). No problem to run it. Then I deleted it and exit HE. But it is always there.
In fact there is a "xml_user.xml" file in ..\data\syntax dir.
Here is its content :
Quote<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="syntax.xslt"?>
<XMLConfigSettings>
   <FILEINFO author="kernjj" type="LangUser"/>
   <SYNTAX id="xml" inherit="def_text" inherit_url="c:\programs\edit\hippoedit\data\syntax\deftext_user.xml">
      <CodeTemplates>
         <Template key="key1" descr="key1">text for key1</Template>
      </CodeTemplates>
   </SYNTAX>
</XMLConfigSettings>

So the line for "key1" template has not be deleted.

Anyway, I can delete that cumbresome line by - randomly - HippoEdit (yes !) and the trick is played !

And what about that ?   ;)

Best regards,

Jean-Jacques

alex

Hi,

better later then never ;)
Now I got it! Thanks! Can reproduce also with clean install.

I would publish the beta with fix next days (just would collect some more fixes).

And what about history? I am updating it now. Just maybe did a little bit later then publsh the beta ;)
HippoEDIT team
[url="http://www.hippoedit.com/"]http://www.hippoedit.com/[/url]

JJK

QuoteNow I got it! Thanks! Can reproduce also with clean install.
better later than never (friendly joke). So I'll no longer need to delete templates lines by opening XXX_user.xml in HE ;)

I'm happy also because I purchased HE yesterday and I got registration today. So from now HE opens instantaneously.