- AuthorPosts
- August 27, 2010 at 7:04 am #8890owilskyParticipant
Hi,
I have a bug in 10.0.1.
Steps to reproduce:1. customize toolbar to include “Marks”
2. customize marks properties for current configuration:
– check Show Returns
– check Show End of File
– check Show Tabs
– check Show Spaces
– (so check first four checkboxes, leave rest unchecked)
3. Click on marks button on toolbar to enable marks. You see the desired marks. All is fine.
4. Click on marks button on toolbar to disable marks. You still see small dots for spaces. I think these should also disappear.August 27, 2010 at 7:09 am #8891Yutaka EmuraKeymasterHi owilsky,
The Marks command toggles only new line, EOF and tab marks, and does not include spaces. This is the specification. On v10, you can use independent commands on the View menu to toggle each mark.
August 27, 2010 at 7:23 am #8892owilskyParticipantOh.. I see. What a pity… would be nice to have a one click solution to show or hide all desired marks.
August 29, 2010 at 12:44 pm #8893zhouzh2ParticipantHi owilsky,
you can use a macro to toggle marks. There is a simple marco somewhere in the forum, I couldn’t find it though, I just post it here again.#title = "Marks"
#tooltip = "Toggle Marks ON/OFF"
// Displays or Hides Marks.
myobject = document.Config;
if (myobject.Mark.ShowReturns==0 && myobject.Mark.ShowEOF==0 && myobject.Mark.ShowTabs==0 && myobject.Mark.ShowSpaces==0 && myobject.Mark.ShowDBSpaces==0 && myobject.Mark.CrLfDifferent==0 && myobject.Mark.ShowIndentGuides==0 && myobject.Mark.ShowControlCharacters==0) {
myobject.Mark.ShowReturns="true"; // Returns
myobject.Mark.ShowEOF="true"; // End of File
myobject.Mark.ShowTabs="true"; // Tabs
myobject.Mark.ShowSpaces="true"; // Spaces
myobject.Mark.ShowDBSpaces="true"; // Wide Spaces
myobject.Mark.CrLfDifferent="true"; // CR and LF with Different Marks
myobject.Mark.ShowIndentGuides="true"; // Indent Guides
myobject.Mark.ShowControlCharacters="true"; // Control Characters
}
else {
myobject.Mark.ShowReturns="false"; // Returns
myobject.Mark.ShowEOF="false"; // End of File
myobject.Mark.ShowTabs="false"; // Tabs
myobject.Mark.ShowSpaces="false"; // Spaces
myobject.Mark.ShowDBSpaces="false"; // Wide Spaces
myobject.Mark.CrLfDifferent="false"; // CR and LF with Different Marks
myobject.Mark.ShowIndentGuides="false"; // Indent Guides
myobject.Mark.ShowControlCharacters="false"; // Control Characters
}
myobject.Save();You can comment the marks you don’t want to make the macro suitable to your needs.
August 30, 2010 at 8:28 am #8900owilskyParticipantHi tried this which should do what I want.
#title = "Marks"
#tooltip = "Toggle Marks ON/OFF"
editor.ExecuteCommandByID(4370); //EEID_VIEW_MARKS (4370)
if(document.Config.Mark.ShowReturns) document.Config.Mark.ShowSpaces = true;
else document.Config.Mark.ShowSpaces = false;
document.Config.Save();
Unfortunately document.Config.Mark.ShowSpaces = true does not do anything for me. What do I do wrong?
Oliver
August 30, 2010 at 8:40 pm #8901Yutaka EmuraKeymasterHello owilsky,
You will need to load the Config object into the memory before you can modify and save it. Please rewrite like this:
#title = "Marks"
#tooltip = "Toggle Marks ON/OFF"
editor.ExecuteCommandByID(4370); //EEID_VIEW_MARKS (4370)
cfg = document.Config;
if(cfg.Mark.ShowReturns) cfg.Mark.ShowSpaces = true;
else cfg.Mark.ShowSpaces = false;
cfg.Save();
August 31, 2010 at 7:03 am #8906owilskyParticipantOK, works now. Thanks.
- AuthorPosts
- You must be logged in to reply to this topic.