| Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате |
| Форум программистов > SynUniHighlighter and SynEdit (English Language) > mystix with unihighlighter 2.04 b |
| Автор: lookfar 1.12.2006, 10:25 |
| Mystix with no JVCL: http://www.autoitscript.com/fileman/users/lookfar/Mystix_editor_with_no_jvcl_uses_SynMix.zip I can compile Mystix using SynMix and the UniHighLighter that is included with Mystix 0.3.1 (highlighters have a *.xml extension and not *.hgl ) Then the editor will load a file with nice syntax highlight and codefolding ... (what did he use to create the xml files?) Mystix with no JVCL and using UniHighLighter 2.04b however If I use Mystix with SynMix and the current Unihighlighter 2.04b I will get nice syntax highlight but no code folding. http://www.autoitscript.com/fileman/users/lookfar/Mystix_Editor_with_no_jvcl_using_unihighlighter_2.04_and_SynMix.zip can anyone help ? sorry I do not speak russian |
| Автор: Seldon 2.12.2006, 17:13 | ||||
|
| Автор: lookfar 3.12.2006, 02:06 | ||||||
Yes {.$DEFINE CODEFOLDING} is of course set to {$DEFINE CODEFOLDING} after compile of the unimanager demo application , CodeFolding works fine but the simple demo and Light editor CodeFolding will not work. as well The Mystix editor I ported over will not fold. not so important as above but when I try load the xml format files into the unimanager I get a "invalid file format" even if I rename to *.hgl |
| Автор: Seldon 3.12.2006, 03:30 | ||||||||
I didn't work with codefolding so I can't help you with it.
Mystix:
Must be:
SynUniSyn expected integer numbers in \Info\Version\Version and \Info\Version\Revision tags. Other tags in the Info is not important and can be skipped. If you just add following code between <UniHighlighter> and <Range> tags all must be fine
Or you can change TSynUniFormatNativeXml15.ImportInfo method in the SynUniFormatNativeXml15.pas. Other problem that Mystix's files hasn't tag with highlighter name, so in the HglEditor you will see blank names for it. |
| Автор: lookfar 3.12.2006, 04:35 | ||||||||||
Thank you for your help, The Mystix editor that uses the older unihighlighter in which for me the code folding works is no good to me because end user cannot easily change the syntax coloring or regions by using the UniManager. But I do not understand this : using unihighlighter 2.0b4, The simple demo works with: var FoldRegion: TFoldRegionItem; begin FoldRegion := SynUni.FoldRegions.Add(rtChar, False, False, False, '{', '}', nil); Edit.InitCodeFolding; Edit.Repaint; end; but will not load the rules from the *.hgl file |
| Автор: Seldon 3.12.2006, 04:59 |
| from which hgl file? created by UniManager file or Mystix's file? |
| Автор: lookfar 3.12.2006, 05:48 | ||||||
From the Unimanager file. I have tried every version on the UniHighlighter web page, I completely remove and re-install between versions in both Delphi 6 and Delphi 7. No matter what I do I cannot get code folding to work by loading from the *.hgl files. I just tried the light demo in the form oncreate event:
I am using *.hgl file which I have confirmed have fold regions, ie autoit261.hgl:
I really have no idea of what to try next, I have been trying to make this work for 2 days with no joy |
| Автор: Seldon 3.12.2006, 16:12 |
| hm, maybe codefolding broken in Unihighlighter 2.04b, I really don't known. CodeFolding actively discussed here http://forum.vingrad.ru/topic-106449.html, try links from it. |
| Автор: lookfar 4.12.2006, 04:30 | ||||||
I removed 2.0 b4 and installed 2.0 b1 and wala I had folding ! So to be sure I re-installed 2.0b4 and this time it worked ... however the demos would not work until I placed the next code in the Form OnCreate event:
If I remove the defines:
Then folding does not work. But I am Happy that it is working! I will use it in my AutoIt Editor: http://www.autoitscript.com/fileman/users/lookfar/ and later in Koda (the form Designer) If anyone likes the AutoEd editor (see screenshots) which has parameter completion, autoProposal completion and code completion all with the dropdown in color . ask and I will post source code for it. |