Author Topic: Add user spec in xxx_spec.xml  (Read 4674 times)

Offline JJK

  • Registered User
  • Full Member
  • *
  • Posts: 152
  • Karma: +2/-0
    • View Profile
Add user spec in xxx_spec.xml
« on: January 20, 2009, 09:09:13 am »
I don'nt know where to write this topic, FAQ, feature, bug ?
The issue I encounter concerns Basic syntax.
I want that "With...End With" generates indentation. But currently it is not the case.
So I added next line in basic_spec.xml:
Code: [Select]
<Scope open="With" close="End With"/>But when I install a new release of HE, the file basic_spec.xml is overwritten.

My questions :
- How to modify such spec in xxx_spec.xml and keep them when re-installing HE ?
- If not possible, Alex, can you add the line above in basic_spec.xml ?
- If you think that it is not a good idea, do you plan a possibility for users to modify xxx_spec.xml and for example warn him that re-install will overwrite his spec.xml ?
It seems to me that basic_user.xml is not able to contain such spec as Scope...With...End With.
Perhaps it is sufficient for me to uncheck VB/VBA syntax into reinstalling process. But if new features were added in the VB/VBA syntax of the HE new release, I'll loose them, and I'll not know it.
Any idea ?
TIA
 

Offline Stefan

  • Administrator
  • Hero Member
  • *****
  • Posts: 775
  • Karma: +6/-0
    • View Profile
Re: Add user spec in xxx_spec.xml
« Reply #1 on: January 20, 2009, 10:28:23 am »
> - How to modify such spec in xxx_spec.xml and keep them when re-installing HE ?

I have this question always too.
I never install HE but un-pack them and copie the files over my HE-folder. (and have to take care not to copy the license.dat too)

I think an solution would be to allow the user to rename the XML-files to add an prefix
like:
batch_spec.xml ==> rename to batch_spec_2.xml  or to batch_spec_my.xml  or to batch_spec_Stefan3.xml
and then chose in Options... > Syntax > Miscellaneous the  current wanted specification files from an list box.
« Last Edit: January 21, 2009, 03:16:22 pm by Stefan »

Offline JJK

  • Registered User
  • Full Member
  • *
  • Posts: 152
  • Karma: +2/-0
    • View Profile
Re: Add user spec in xxx_spec.xml
« Reply #2 on: January 20, 2009, 10:50:07 am »
Yes it seems to have sense.
A little similitude with keyboard settings, where we can save our own mapping schemes ?
If it is not too complicate...

Offline Stefan

  • Administrator
  • Hero Member
  • *****
  • Posts: 775
  • Karma: +6/-0
    • View Profile
Re: Add user spec in xxx_spec.xml
« Reply #3 on: January 20, 2009, 11:21:22 am »
A little similitude with keyboard settings, where we can save our own mapping schemes ?
At least that is already there > Options... > Keyboard > [save as]
then you can chose from default and your own mapping scheme.

Unfortunately you can't just copy the keymap-file with explorer.... HE  recognizes only files saved on his own.
(an file i have copy&paste i didn't see in "mapping scheme"-list)


EDIT:
it's no matter what file name this keymap-file have... the recognizes name have to be inside the  keymap-file itself!
That way you can make an file copy with explorer, modify the scheme name inside the file, restart HE, and you can chose it.

.
« Last Edit: January 20, 2009, 11:41:19 am by Stefan »

Offline JJK

  • Registered User
  • Full Member
  • *
  • Posts: 152
  • Karma: +2/-0
    • View Profile
Re: Add user spec in xxx_spec.xml
« Reply #4 on: January 20, 2009, 11:34:51 am »
1) I copy keymap_JJK.xml and paste it as keymap_other.xml.
2) In my data\settings.xml I have
Quote
   <Keyboard>
      <KeySchema>JJK</KeySchema>
   </Keyboard>
3) I add <KeySchema>other</KeySchema> then save settings.xml
4) I modify the 3rd line of keymap_other.xml so : <HOTKEYSCHEMA name="other">

Finally I have the two mapping recognized by HE. Enjoy ! No need to build other mapping from nothing.
But when in Optionns::Keyboard window, you can "save as" any key mapping. Has it exactly the same result ? I don't know.
« Last Edit: January 20, 2009, 11:40:59 am by JJK »

Offline Stefan

  • Administrator
  • Hero Member
  • *****
  • Posts: 775
  • Karma: +6/-0
    • View Profile
Re: Add user spec in xxx_spec.xml
« Reply #5 on: January 20, 2009, 11:47:45 am »
Ah, you get it on your own :D

point 3.) is not necessary because there have to be the current chosen scheme only.
There is no list of schemes stored.... just the files in the keymaps folder with names inside,... which HE provides at request.

>Has it exactly the same result
Yes (but as addition an entry in the <InputHistory> :D)

Offline JJK

  • Registered User
  • Full Member
  • *
  • Posts: 152
  • Karma: +2/-0
    • View Profile
Re: Add user spec in xxx_spec.xml
« Reply #6 on: January 21, 2009, 09:28:19 am »
1.41 b603
Thanks Alex to have added
<Scope open="With" close="End With"/>
in basic_spec.xml.

Any other in b603 ?

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2184
  • Karma: +37/-3
    • View Profile
    • HippoEDIT
Re: Add user spec in xxx_spec.xml
« Reply #7 on: January 21, 2009, 11:04:11 am »
Hello JJK,

my opinion about user changes in spec file (pertially, I think I hav wrote it already somewhere):
- if you see that schema miss something standard - default (installed) schema should be corrected. Send me details, and I would do changes in schema and you would get it with new version. I am not an expert in all syntaxes, so schemas can be not perfect :)
- if you want something special, which is not standard and maybe would not fit to all users - create you own schema based on existing one, and you extension there.
- when new/updated spec file copied with HE installer, old file would be renamed to xxx_spec.xml.old. So you changes are not lost.

In the 1.50 I am planning to introduce mechanism to update schemas from your local PC to server and vice versa. For example if you have a schema which is better (more complete) then existing one, you can submit it to server, it would be stored in Purgatory until would be checked and replace existing schema.

Offline JJK

  • Registered User
  • Full Member
  • *
  • Posts: 152
  • Karma: +2/-0
    • View Profile
Re: Add user spec in xxx_spec.xml
« Reply #8 on: January 21, 2009, 02:14:12 pm »
OK with your previous answer.
Waiting the mechanism to update schemas which would arive with 1.50, I have some questions about basic_spec.xml
Here is an extract of this file.

Quote
00    <SCOPES>
01      <Scope open="Class" close="End Class" has_name="true" separator="true"/>
02      <Scope open="Sub" close="End Sub" has_name="true" separator="true"/>
03      <Scope open="Function" close="End Function" has_name="true" separator="true"/>
04      <Scope open="Begin" close="End" has_name="true" separator="true"/>
05      <Scope open="For" middle="To"  close="Next"/>
06      <Scope open="For Each" middle="In"  close="Next"/>
07      <Scope open="With" close="End With"/>     
08      <Scope open="While" middle="Exit While"  close="Wend">
09        <Close text="End While"/>
10      </Scope>
11      <Scope open="Select Case" middle="Case" close="End Select">
12        <Middle text="Case Else"/>
13      </Scope>
14      <Scope open="Do While" close="Loop"/>
15      <Scope open="Do" close="Loop Until">
16        <Close text="Loop"/>
17      </Scope>
18      <Scope open="If" middle="Else" close="End If" strict="false">
19        <Middle text="Then"/>
20        <Middle text="ElseIf"/>
21      </Scope>
22      <Scope open="Exit Sub" struct="false"/>
23      <Scope open="Exit While" struct="false"/>
24      <Scope open="Exit For" struct="false"/>
25      <Scope open="Exit Function" struct="false"/>
26      <Scope open="Exit Do" struct="false"/>
27      <Scope open="Continue While" struct="false"/>
28      <Scope open="Continue For" struct="false"/>
29      <Scope open="Continue Do" struct="false"/>
30      <Scope open="Declare Function" struct="false"/>
31    </SCOPES>

When edting this file, if I click on any of the lines 02 to 09 the scope (in the present file) goes from line 01 to line 10. I can see that because the words "Scope" of those 2 lines 01 and 10 are blue while in the others lines they are black. Other weirdness : lines 14 and 17 seem matching (as lines 01 and 10).
Yet it seems to me that line 10 must match line 08 and not 01. Also lines 17 must be linked with line 15 and not 14. Am I wrong ?

Other little issue : VBA allows Do While... Loop but allows also Do... Loop While (idem for Until). Currently my Do... Loop While texts are colored with error color (red). Can you add those features ?

TIA
« Last Edit: January 21, 2009, 02:16:30 pm by JJK »

Offline alex

  • Developer
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2184
  • Karma: +37/-3
    • View Profile
    • HippoEDIT
Re: Add user spec in xxx_spec.xml
« Reply #9 on: January 22, 2009, 12:09:26 am »
About bug in HippoEDIT config schema I know. Reason HE parsing engine till know is not able to recognize that < ... /> is open and closed, and scope shoul not be parsed. This is a reson for all bugs (not passing end tag and marked red open tag). If construction like this would be used <Scope>..</Scope>, would be no problem.
I would think about this issue, but for now, except of disabling, dont see easy solution.

I have added "Do... Loop While" to basic_spec.xml. You can verify in 1.41 release :) It was necessary to release it so soon because I have found some critical bugs.

 

Related Topics

  Subject / Started by Replies Last post
4 Replies
3123 Views
Last post April 29, 2009, 06:18:50 pm
by Arthur
9 Replies
4789 Views
Last post April 12, 2010, 02:54:30 pm
by Theno
4 Replies
4262 Views
Last post April 20, 2010, 10:47:59 pm
by Theno
14 Replies
3650 Views
Last post September 10, 2014, 01:34:59 pm
by Andreas
0 Replies
1355 Views
Last post January 28, 2015, 02:10:32 am
by alex