Конференция "KOL" » KOL для Delphi XE7 [Delphi, Windows]
 
  • Aqel © (19.12.14 09:20) [0]
    Кто нибудь установил библиотеку KOL на Delphi XE7 ? Помогите с этим.
  • DWorker (21.12.14 19:36) [1]
    Да и вроде даже работает. Мини инструкция:

    1) скачиваем с свна - http://sourceforge.net/projects/kolmck/
    2) прописываем путь к колу для х32 (можно и для х64)
    3) устанавливаем пакет KOLMCKXE7.dpk - как всегда(билд олл, инсталл, закрыть пакет)
    4) создаем проект чеерез визард, обзятально в опциях ставим дефайн UNICODE_CTRLS
    5) профит

    х64 тож вроде работает(демо проект запускается и фурычит, более не проверялось), но для него нужно в опциях проекта поставить выравние рекордов 8 байт
  • Awkward © (22.12.14 15:33) [2]
    Кстати, а может, сделать UNICODE_CTRLS автоматически устанавливаемым условием в зависимости хотя б от компилятора?
  • DWorker (23.12.14 08:36) [3]
    Лучше всего так и сделать, там путаница с дефайнами на самом деле.. Надо как-то упорядочить их и все версии >= 2009 должны быть с UNICODE_CTRLS
  • dotnet20 (24.12.14 05:10) [4]
    i do this work, let kol&mck work in xe7
    -----------------------------------------
    1)suggest you use unofficial KOL x64 version (based on KOL 3.22)
    download from http://kolmck.net/kol322-x64-unofficial.7z

    2)modify KOLDEF.INC, add following code

    {$IFDEF VER270} // Delphi XE6
    {$DEFINE _D3orHigher}
    {$DEFINE _D4orHigher}
    {$DEFINE _D5orHigher}
    {$DEFINE _D6orHigher}
    {$DEFINE _D7orHigher}
    {$DEFINE _D2005orHigher}
    {$DEFINE _D2006orHigher}
    {$DEFINE _D2007orHigher}
    {$DEFINE _D2009orHigher}
    {$DEFINE _D2010orHigher}
    {$DEFINE _DXEorHigher}
     {$DEFINE _DXE2orHigher}
     {$DEFINE _DXE3orHigher}
     {$DEFINE _DXE4orHigher}
     {$DEFINE _DXE5orHigher}
    {$DEFINE _DXE6}
     {$DEFINE _DXE6orHigher}
     {$IFDEF WIN64}
       {$DEFINE PAS_VERSION}
       {$DEFINE PAS_ONLY}
      {.$DEFINE UNICODE_CTRLS}
      {$DEFINE STREAM_LARGE64}
     {$ENDIF}
     {$WARN UNIT_DEPRECATED OFF}
    {.$WARN SYMBOL_PLATFORM OFF}
    {.$WARN UNSAFE_TYPE OFF}
    {.$WARN UNSAFE_CAST OFF}
    {.$WARN UNSAFE_CODE OFF}
     {$DEFINE TMSG_WINDOWS}
    {$ENDIF}
    {$IFDEF VER280} // Delphi XE7
    {$DEFINE _D3orHigher}
    {$DEFINE _D4orHigher}
    {$DEFINE _D5orHigher}
    {$DEFINE _D6orHigher}
    {$DEFINE _D7orHigher}
    {$DEFINE _D2005orHigher}
    {$DEFINE _D2006orHigher}
    {$DEFINE _D2007orHigher}
    {$DEFINE _D2009orHigher}
    {$DEFINE _D2010orHigher}
    {$DEFINE _DXEorHigher}
     {$DEFINE _DXE2orHigher}
     {$DEFINE _DXE3orHigher}
     {$DEFINE _DXE4orHigher}
     {$DEFINE _DXE5orHigher}
     {$DEFINE _DXE6orHigher}
    {$DEFINE _DXE7}
     {$DEFINE _DXE7orHigher}
     {$IFDEF WIN64}
       {$DEFINE PAS_VERSION}
       {$DEFINE PAS_ONLY}
      {.$DEFINE UNICODE_CTRLS}
      {$DEFINE STREAM_LARGE64}
     {$ENDIF}
     {$WARN UNIT_DEPRECATED OFF}
    {.$WARN SYMBOL_PLATFORM OFF}
    {.$WARN UNSAFE_TYPE OFF}
    {.$WARN UNSAFE_CAST OFF}
    {.$WARN UNSAFE_CODE OFF}
     {$DEFINE TMSG_WINDOWS}
    {$ENDIF}

    3)now, you can work, but KOL.pas also need some change for xe unicode string problem
    elg:
    EditActions_Packed declare need modify, for it have Non-Ansi Characters
  • dotnet20 (24.12.14 05:34) [5]
    why not support win x64 and xe3~xe7 official?
    Non-Ansi Characters bug alway exists even in newest version
  • Awkward © (24.12.14 06:31) [6]
    "newest version" of what? KOL or Delphi? and what about FPC, at least 2.7.1+?
  • dotnet20 (24.12.14 08:46) [7]
    kol.pas(3.22)  have Non-Ansi Characters bug since from d2009 ~ xe7, freepascal not checked

    elg(kol.pas):
     LabelActions_Packed: PAnsiChar = AnsiChar(LABEL_ACTIONS) +
       #229 + // 29(0)
       #2#0 + // SS_RIGHT
       #1#0 + // SS_CENTER
       #12#0+ // SS_LEFTNOWORDWRAP, 0
       #2#0 + // SS_CENTERIMAGE>>8, 0
       #205;

    "#229" is Non-Ansi Characters, d2009 default is unicode, so "#229" will be convert to "#3F" in xe

    so must changed to:
     LabelActions_Packed: PAnsiChar = AnsiChar(LABEL_ACTIONS) +
       AnsiString(#229) + // 29(0)
       AnsiString(#2#0) + // SS_RIGHT
       AnsiString(#1#0) + // SS_CENTER
       AnsiString(#12#0)+ // SS_LEFTNOWORDWRAP, 0
       AnsiString(#2#0) + // SS_CENTERIMAGE>>8, 0
       AnsiString(#205);

    all is right:)
  • DWorker (24.12.14 13:11) [8]
    dotnet20, you can use SVN version without any changes


    > have Non-Ansi Characters bug since from d2009 ~ xe7


    where is error occurs?
  • dotnet20 (24.12.14 16:05) [9]
    SVN version also have Non-Ansi Characters bug

    Non-Ansi Characters bug(since d2009-xe7):
    if USE UNICODE_CTRLS condition, any edit and memo control can't input any Character
  • DWorker (24.12.14 17:47) [10]

    > SVN version also have Non-Ansi Characters bug
    >
    > Non-Ansi Characters bug(since d2009-xe7):
    > if USE UNICODE_CTRLS condition, any edit and memo control
    > can't input any Character


    Are You sure? I Can't reproduce that.. Input any ru\en chars in edit and memo without problem
  • dotnet20 (25.12.14 08:14) [11]
    in east-aisa, MBCS windows env, xe7:

    P: PAnsiChar = #229 + #2 +#0;

    equals

    P: PAnsiChar = #$3F + #2 +#0;

    must changed to:

    P: PAnsiChar = AnsiString(#229) + AnsiString(#2) +AnsiString(#0);
    or
    P: PAnsiChar = #229#2#0;
  • dotnet20 (25.12.14 08:18) [12]
    in xe7, default is unicode

    P: PAnsiChar = #229 + #2 +#0;

    equals

    P: PAnsiChar = PAnsiChar(AnsiString(UnicodeString(#229) + UnicodeString(#2) +UnicodeString(#0)));

    #229 is Non-Ansi Characters, so in east-asia MBCS windows, this convert will
    have problem!!

    i am very sure
  • DWorker (30.12.14 19:45) [13]
    Can't reproduce that... I add additional China key layout and Edit\Memo working good.
  • dotnet20 (31.12.14 10:42) [14]
    set key layout is useless, you can add China language, and set default language is China, None_unicode default is China also, this problem will reproduce.

    here is a topic about this:

    http://stackoverflow.com/questions/2007287/casting-delphi-2009-2010-string-literals-to-pansichar

    important:
    Constants, including string literals, are untyped by default, and the compiler will fit them into whatever format works in the context you're using them in. As long as there are no non-ANSI characters in your string literal, the compiler won't have any trouble generating the string as ANSI instead of Unicode in this situation.

    kol.pas TMenu also have memory leaking problem , just use fastMM4
  • Aqel © (08.05.16 08:52) [15]
    Да-а, давненько меня не было... Кто знает, под Delphi XE8 есть KOL ?
    На  http://sourceforge.net/ посмотрел - нету, может ещё этим занимается...
 
Конференция "KOL" » KOL для Delphi XE7 [Delphi, Windows]
Есть новые Нет новых   [118462   +18][b:0][p:0.001]