Author Topic: XML Code templates  (Read 8293 times)

Offline JJK

  • Registered User
  • Full Member
  • *
  • Posts: 152
  • Karma: +2/-0
XML Code templates
« on: November 25, 2008, 08:15:49 PM »
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).

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2224
  • Karma: +37/-3
    • HippoEDIT
Re: XML Code templates
« Reply #1 on: November 25, 2008, 09:35:18 PM »
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

Offline JJK

  • Registered User
  • Full Member
  • *
  • Posts: 152
  • Karma: +2/-0
Re: XML Code templates
« Reply #2 on: November 26, 2008, 11:28:17 AM »
At work (Win XP-SP2)  with HE1.40b522 it works fine.
I'll re-try later under HE 1.40b535/Vista.

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2224
  • Karma: +37/-3
    • HippoEDIT
Re: XML Code templates
« Reply #3 on: November 26, 2008, 05:21:13 PM »
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 ;)

Offline JJK

  • Registered User
  • Full Member
  • *
  • Posts: 152
  • Karma: +2/-0
Re: XML Code templates
« Reply #4 on: November 26, 2008, 11:12:07 PM »
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
« Last Edit: November 26, 2008, 11:18:01 PM by JJK »

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2224
  • Karma: +37/-3
    • HippoEDIT
Re: XML Code templates
« Reply #5 on: November 27, 2008, 11:41:07 AM »
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.

Offline JJK

  • Registered User
  • Full Member
  • *
  • Posts: 152
  • Karma: +2/-0
Re: XML Code templates
« Reply #6 on: November 27, 2008, 07:04:51 PM »
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.

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2224
  • Karma: +37/-3
    • HippoEDIT
Re: XML Code templates
« Reply #7 on: November 28, 2008, 11:42:13 AM »
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

Offline JJK

  • Registered User
  • Full Member
  • *
  • Posts: 152
  • Karma: +2/-0
Re: XML Code templates
« Reply #8 on: November 28, 2008, 09:36:39 PM »
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.

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2224
  • Karma: +37/-3
    • HippoEDIT
Re: XML Code templates
« Reply #9 on: November 29, 2008, 11:48:23 PM »
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.

Quote
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.
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.

Offline JJK

  • Registered User
  • Full Member
  • *
  • Posts: 152
  • Karma: +2/-0
Re: XML Code templates
« Reply #10 on: November 30, 2008, 08:54:35 PM »
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.

Quote
Which 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 ?

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2224
  • Karma: +37/-3
    • HippoEDIT
Re: XML Code templates
« Reply #11 on: December 01, 2008, 04:48:46 PM »
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.

Offline JJK

  • Registered User
  • Full Member
  • *
  • Posts: 152
  • Karma: +2/-0
Re: XML Code templates
« Reply #12 on: December 03, 2008, 01:26:33 PM »
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
« Last Edit: December 03, 2008, 01:28:23 PM by JJK »

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2224
  • Karma: +37/-3
    • HippoEDIT
Re: XML Code templates
« Reply #13 on: December 03, 2008, 06:31:30 PM »
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 ;)

Offline JJK

  • Registered User
  • Full Member
  • *
  • Posts: 152
  • Karma: +2/-0
Re: XML Code templates
« Reply #14 on: December 04, 2008, 08:47:39 AM »
Quote
Now 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.