Вниз
Скачать: CL | DM;

DMClient - посветка.   Найти похожие ветки 

← →
guav ©   (2008-03-29 18:08) [0]

Удалось прикрутить ко-какую подсетку к DMCilent 3.0 beta 1.21

Идея навеяна easy © http://delphimaster.net/view/15-1206729020/

В клиенте есть фалй hint.js, загружаемый для каждой страницы, в него вписан код, выделяющий все keywords в тэге code тэгом . Не блеск - комментарии игнорируются, и кейворды подсвечиваются и в комментариях - но уже что-то.

document.body.onload = function()
{
 var codePieces = document.getElementsByTagName("CODE");
 var keywords = new Array("and", "array", "as", "asm", "begin", "case",
   "class", "const", "constructor", "destructor", "dispinterface", "div",
   "do", "downto", "else", "end", "except", "exports", "file",
   "finalization", "finally", "for", "function", "goto", "if",
   "implementation", "in", "inherited", "initialization", "inline",
   "interface", "is", "label", "library", "mod", "nil", "not", "object",
   "of", "or", "out", "packed", "procedure", "program", "property" ,"raise",
   "record", "repeat", "resourcestring", "set", "shl", "shr", "string",
   "then", "threadvar", "to", "try", "type", "unit", "until", "uses",
   "var", "while", "with", "xor");
 re = new RegExp("(^|[^a-z0-9_])(" + keywords.join("|") + ")([^a-z0-9_]|$)", "gim");
 for (var i = 0; i != codePieces.length; ++i)
 {
   codePieces[i].innerHTML =
     codePieces[i].innerHTML.replace(re, "$1$2$3");
 }  
}


← →
guav ©   (2008-03-29 18:09) [1]

На ветке http://delphimaster.net/view/15-1206729020/ например хорошо работает.


← →
guav ©   (2008-03-29 18:13) [2]

Ну да, забыл, что тэг и тут есть

> "$1$2$3");

читать как "$1$2$3);



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.01 c
15-1206515574
usr
2008-03-26 10:12
2008.05.11
MS SQL Server 2000


2-1208157981
Gore
2008-04-14 11:26
2008.05.11
Проблема c NULL полями


2-1207850349
vodvorezlaya
2008-04-10 21:59
2008.05.11
Смена атрибутов только чтение у папки


2-1208080633
Megatron
2008-04-13 13:57
2008.05.11
Считывать данные с реестра


2-1208174959
John_Korsh
2008-04-14 16:09
2008.05.11
Вопрос по WinIO.




   Наверх