Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "KOL";
Текущий архив: 2015.02.15;
Скачать: [xml.tar.bz2];

Вниз

KOL 2.87 for Delphi 2009 (MCK worked.)   Найти похожие ветки 

 
azsd ©   (2008-09-15 02:14) [0]

Hey, I wanna share my "slightly" modified KOL working Copy for Delphi 2009.

http://my1993.com/PpsDES/Report/KOLCore_D12_Maystable_2.rar

I"ve test KOL parts from three weeks ago in several heavy ANSI related projects. (most application have UNICODE_CTRLS define, some without)
and the MCK parts just works like original copy in Delphi 2007 excepted "KOL_MCK/Classes=;mirror=" may discard during Delphi 2009 project upgrade progress.

MCK parts only have little AnsiString cast for byte related operation, most of them keep String(Unicode in Delphi 2009) there.

I make an Release directory for MirrorPackage/MHXP/mdvControls and other MCK components - they need definition inpackage and without UNICODE_CTRLS, if you forgot cleanup generated dcu after install these package, you application may link with these trouble dcus.
I saved all files to utf8 without BOM if they have non latin chars, so it can compile both in D2009 / Delphi7.
Don"t forget to Check [x] Default checkbox in "Install Packages..." dialog after install, or your MCK will nuked (by packagecache) in next IDE startup.

most 3rd components  do not need to modify MCK parts, but KOL part should to deep regular expression replace.

refer Changes_mod.txt in rar archive for changelist.

bug report are welcome, because its an unofficial patch, I must say sorry to Vladimir if somebody shouted my bug to him.

I added some fixme tag in original source, like an function returns KOLString (WideString in UNICODE_CTRLS mode), but it write in asm with LStrFromXXX.
there also some minor workaroud offered in somewhere.


 
Jon ©   (2008-09-15 05:00) [1]

Wow, excellent news! I bet it was more than a "slight" effort.


> KOL 2.87 for Delphi 2009


Which version did you modify?  2.87 or 2.87+ or 2.87++


 
azsd ©   (2008-09-15 10:32) [2]

based on 2.87.
do you means unofficial update in kolnmck.ru download section?
I kept asm version than 2.87plus IndexOfChar pascal fix because I hear 2.87+ too late.
I use J+ option to generate obj, then load obj use IDA to compare difference between D7 n D2009... when I have make an argument table, I found it just list officially in rtl source.
It"s unlucky I have spend lot of unnecessary time to analyst documented things, but it"s lucky It"s matched my undocumented argument table.  
LStrFromPChar have an extra 3rd Codepage argument in ECX (ADC),
I use xor ecx, ecx to offered CP_ACP than mov ecx, 0 generate by compiler.
This is only things I worry about ECX will use to store variable in original hand written asm caller (pascal caller will determine protect register automatically).
I debug into most modification routine to confirm ECX is valuable to protect. At least I think its only have over push, miss push routines should no exists at least in kol.pas / kol_asm.inc
When I debug in get_classname, I found literal header add extra field before referencecounter.
I use DD.\s*-1 to find these @@ string defines and add Codepage(CP_ANSI_LATIN1 or CP_ACP) and element size(one byte per Char) before this line.
but I forgot to add IFDEF _D2009OrLater aroud it. It will cause some bytes fater in D2007~D7.
I"ll add it later.


 
D[u]fa   (2008-09-15 10:47) [3]

Уже тоже делал подобное =) но выкладывать потом не стал.. Очень много исправлений связанных с поддержкой уникода приходится делать... и отвечать за эти ошибки не охото)

И если не сделать несколько изменений с IFDEF опять то на 2009 доступа к форме не будет, покрайне мере у меня не было.. а в архиве этих изменений не нашел


 
azsd ©   (2008-09-15 11:13) [4]

In my memories Thaddy made an pure pascal version(based on KOLCE?) for Delphi 2009 in August(or earlier?).
Все дороги ведут в Рим? lol, I means its worth to see other people"s road.
but now its safe to talk about delphi 2009, it can download from codegear website one week ago.
I add KOL_ANSI.inc to prevent almost all IFDEF related to Windows API use by KOL itself.

PS: It seems title of delphi IDE can take from Application.MainForm.Caption, FindWindow in GetProjectName grab other instance of Delphi in my debugging (I used Delphi to bug Delphi)


 
MTsv DN   (2008-09-17 20:21) [5]

2 azsd
For what this addition:
1814:    procedure Put(Idx: integer; const Value: WideString);
1815:    {* +azsd for TBButton }


 
D[u]fa   (2008-09-17 20:31) [6]

Возможно расширение функционала... У обычного TStrList"a есть такая функция а у Wide не было.

MTsv DN, скинь свою асю


 
MTsv DN   (2008-09-17 20:32) [7]

I don"t understand this
function Find_First( const FilePathName: KOLString; var F: {$IFDEF UNICODE}TFindFileData{$ELSE}TFindFileData{$ENDIF} ): Boolean;


 
MTsv DN   (2008-09-17 20:38) [8]

And what this:
33277:    {$IFDEF UNICODE_CTRLS}
   RichEditIdx := 0; // TODO: fixme KOLChar mis sync with Index
   {$ELSE}
   RichEditIdx := 0; // Richedit20A / RichEdit
33281:    {$ENDIF}


 
MTsv DN   (2008-09-17 20:38) [9]

2 D[u]fa
930058


 
MTsv DN   (2008-09-17 20:39) [10]

> Возможно расширение функционала... У обычного TStrList"a есть такая функция а у Wide не было.
Но при чем тут "for TBButton"?


 
azsd ©   (2008-09-17 21:20) [11]

{$IFDEF UNICODE} equal to {$IFDEF  _D2009OrHigher}
with or without this the argument type of F is same, this is safe to remove the definition switch. I am sorry missed this place during cleanup unnecessary modification.

RichEditIdx is in my next fix todo list.
I am plan to use IsUnicode or similar flag to record if NewRichedit1 create an Unicode version richedit control instance, or modify the RichEditIdx to tells NewRichEdit1 create an ANSI control. In my debug CharFormat currently is not match to UNICODE_CTRLS switch, I always get "T" for "Tahoma" as fontname in this function.
currently I add an workaroud in ReGetFont for less change. so the TODO tag is still here.

If I recall correctly TWStrList.Put is for KOL_ASM toolbar tooltip fix, I found tootip for toolbar button only appear one char in runtime at 2007.
Reason is simple: TStrList have an Put function, why TWStrList havn"t.
Errr, It seems in my changes_mod, I am not sure this patch (tooltip for tooltip trimmed in UNICODE_CTRLS) still exists too. now I can confirm I missed it, thanks. I"ll try to check it later.
use LStrFromPChar for an PKOLChar tooltip will only keep first digit if using UNICODE_CTRLS without PAS_VERSION.
in KOL_ASM.inc(14165), TControl.TBSetTooltips


 
azsd ©   (2008-09-17 22:23) [12]

confirmed in current 2.87 asm version TControl.TBSetTooltips disabled in UNCODE_CTRLS mode because all ASM_UNICODE rounded function was compile with pascal part.
see KOL.pas(57555), kol.pas(592).

I lookup in my merged version cave, found this patch exists in 2.49~2.58 but missed in 2.65.

I think somebody use this switch nicely instead fix coups of bug in these functions from some revision.


 
MTsv DN   (2008-09-17 22:50) [13]

> KOL.pas(57555)???
My KOL.PAS consist of 57509 lines only...


 
azsd ©   (2008-09-18 00:15) [14]

The lines before $I KOL_ASM.inc.

I"ve restore asm version of TControl.TBSetTooltips (bypass some ANSI n Unicode version test), altered GetSourcePath GetProjectName for some minor improve. (tested with several case)
Changes_mod.txt also updated some description.

please take it here:
http://my1993.com/PpsDES/Report/KOLCore_D12_Unstable_r5.rar
PS: that line fly to 57572 in this package.
I save kol.pas mirror.pas with utf8 format without BOM for D7


 
MTsv DN   (2008-09-18 10:09) [15]

2 azsd ©
Have downloaded.
Fix "TBSetTooltips" for UNICODE_CTRLS, I think correctly. I"m did similar fixes yesterday (except D2009 support).

I can"t testing of fixes in mirror.pas for UNICODE, becouse work in D2007...

2 D[u]fa
Скачай R5, посмотри, что там добавлено в mirror.pas...


 
D[u]fa   (2008-09-18 20:54) [16]

azsd

// TODO: ProjectName_D12.dproj rename from ProjectName.dproj (point to Projectname.dpr) will try to open ProjectName_D12.dpr
 S := ExtractFilePath( Path ) + ProjectName + ".dpr";
 LoadSource( Source, S );
 if Source.Count = 0 then
 begin
   S := ExtractFilePath( Path ) + ExtractFileNameWOExt( Path ) + ".dpr";
   LoadSource( Source, S );
 end;

1. what is it?
2. is your version ANSI by default?


 
azsd ©   (2008-09-18 21:34) [17]

to D[u]fa

Delphi 2007/2009 using msbuild to build dpr though dproj.
dpr filename list in dproj "wrapper" as <MainSource>MyApp.dpr</MainSource>.
using OTAPI may get MyApp_D12.dpr by ProjectOptions.TargetName in some build of Delphi 2007 if dpr n dproj filename were mismatch, and dpr is an library target, for example, shard in diffrent dproj, MyApp_D11.dproj MyApp_D12.dpr.
workaroud is check scan into dproj instead trust OTA in Mirrorpackage compile time (I"ll check QC list to make sure build 7887 has fixed this issue).
but if dpr is not dll project, it will work fine.
Current mck will consider the project need to convert from VCL because projectname n projectdest is takefrom dproj filename n dfm lines, building menu/double click will prompt convert to kol first in 2007/2009.

other known bug apply to dll project is relocation table is still been stripped by Thaddy, If use havn"t see that lines, they may been crazy if they using multi dlls in their application. I can"t find an definition that point KOLDEF.inc running in an library project now.

2. you are right, because original version is ANSI by default.
I always add UNICODE_CTRLS or similar things into project settings only instead of change common lib source.


 
D[u]fa   (2008-09-18 22:07) [18]

about 2:

hmm.. if i add UNICODE_CTRLS a cant compile anything.. i try again later with new version


 
azsd ©   (2008-09-18 22:20) [19]

r2/r5? Try Clean project or or delete dcu files.
sometimes I can"t compile in D7/D2007 too, while toggle switch UNICODE_CTRLS definition on/off or after 3rd MCK component (INPACKAGE define) in original KOL package.
I use separate unit output/search path for second as workaround, and Clean manually or change unit output path for first case.


 
azsd ©   (2008-09-19 01:06) [20]

altered some functions for people who work with multi D2005/2007/2009 dproj with single dpr.
use OTA instead catch text from IDE in GetSourcePath.
updated todo wish list :D
I have some idea to dealwith PACKAGEINFO and DVCLAL resource.

http://my1993.com/PpsDES/Report/KOLCore_D12_Unstable_r6.rar


 
MTsv DN   (2008-09-19 12:19) [21]

2 azsd
Have used the fixes from R6 to my patch... What"s new in your TODO list? Whether must me wait when you finish with D2009?


 
azsd ©   (2008-09-19 15:01) [22]

Changes in r6 almost apply to D2005~D2009, It"s not for D2009 only.

Recently I can"t find newly introduced bug in D2009 version.

surround all nude "literal string" in KOL.pas (and your applications) with AnsiString() (KOLString(AnsiString()) for UNICODE_CTRLS relative A/W argument, String(Int2Str()) for only W in 2009) would take less storage space in target exe with D2009 if string more than 4 char, but It"s not so important and sometimes let code looks uncomfortable.

I found some interest things to enhance/fix in original 2.87 package, It"s also generic parts for KOL/MCK, so I"d happy to see you release original (like?) patch every time.


 
MTsv DN   (2008-09-19 15:24) [23]

> Changes in r6 almost apply to D2005~D2009, It"s not for D2009 only.
Yes, I understood...and using in my D2007.

> Recently I can"t find newly introduced bug in D2009 version.
That"s good.

> I found some interest things to enhance/fix in original 2.87 package, It"s also generic parts for KOL/MCK, so I"d happy to see you release original (like?) patch every time.
If these "interest things" is in R2/R5/R6, I applied its...


 
MTsv DN   (2008-09-19 15:52) [24]

>> I found some interest things to enhance/fix in original 2.87 package, It"s also generic parts for KOL/MCK, so I"d happy to see you release original (like?) patch every time.
>
> If these "interest things" is in R2/R5/R6, I applied its...

...else, send its to me...


 
azsd ©   (2008-09-19 17:00) [25]

> ...else, send its to me...
I means some interest things in TODO list.
some idea under writing/debugging right now, other idea only in plan.
I"ll spend one or more weeks to complete these "not so important" codes because I am just newbie in OpenToolsApi inerface.


 
MTsv DN   (2008-09-19 17:03) [26]

OK. Means I can prepare patch 8)


 
MTsv DN   (2008-09-19 21:39) [27]

2 azsd
I think you"ll want create a full-unicode MCK for D2009... I already creating it...and finish soon 8)


 
MTsv DN   (2008-09-20 12:32) [28]

Работа над подлой поддержкой unicode MCK в D2009 продолжается. Сделано для Button, Label, LabelEffect (исправлены ошибки в KOL), GroupBox, RadioBox, CheckBox, Edit и Tab


 
MTsv DN   (2008-09-20 12:33) [29]

> подлой
полной 8)


 
MTsv DN   (2008-09-20 13:08) [30]

Добавлены: Panel, BitBtn (исправлены ошибки в KOL), Memo


 
azsd ©   (2008-09-20 13:37) [31]

If you complete this, I can try to registry a PropertyEditor extension to apply it to D7~2007, also an non ASCII to #number Unicode filter would be added.

users who will need this convertion if they create applications in Russian codepage with some (Chinese/copyright mark/half width katakana) text can"t input in Object inspector.

ANSI source file can"t store Unicode chars if they contains character can map into current single codepage, but Unicode source file can"t bypass compile earlier  than D7 (or 2005?)


 
azsd ©   (2008-09-20 16:12) [32]

{$IFNDEF UNICODE_CTRLS}
 if CF.szFaceName[1] = #0 then
{$ENDIF}
   Result.FontName := KOLString(PWideChar(@CF.szFaceName[0])) // TODO: fixme
{$IFDEF UNICODE_CTRLS};{$ELSE}
 else
   Result.FontName := AnsiString(@CF.szFaceName[0]); // real T,0 works fine.
{$ENDIF}
the if else section is no necessary in REGetFont with UNCODE_CTRLS mode (only increase some time/byte).


 
MTsv DN   (2008-09-20 16:57) [33]

2 azsd
Are you using ICQ?


 
MTsv DN   (2008-09-20 17:36) [34]

Добавлены: RichEdit, ListBox, ComboBox


 
MTsv DN   (2008-09-20 19:59) [35]

Кому интересно, вот демка: http://slil.ru/26163845

Остались только ToolBar и MainMenu...


 
MTsv DN   (2008-09-21 12:58) [36]

Добавлено: ToolBar


 
MTsv DN   (2008-09-22 23:56) [37]

> Работа над подлой поддержкой unicode MCK в D2009
...завершена 8)


 
AndreyRus ©   (2008-09-23 15:08) [38]


> Работа над подлой поддержкой unicode MCK в D2009...завершена


Спасибо!!!


 
Cooler7   (2008-09-23 21:13) [39]

А где можно скачать сборку для D2009 ?


 
MTsv DN   (2008-09-23 21:19) [40]

> А где можно скачать сборку для D2009 ?
Пока нигде...



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

Форум: "KOL";
Текущий архив: 2015.02.15;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.55 MB
Время: 0.003 c
11-1258454605
Dy1
2009-11-17 13:43
2015.02.15
GroupBox


2-1389278898
Мимо прогодивший
2014-01-09 18:48
2015.02.15
методы отрисовки графики в ОС Windows


2-1389109036
SKIPtr
2014-01-07 19:37
2015.02.15
программа должна узнать какое окно было активным


15-1405339413
KSergey
2014-07-14 16:03
2015.02.15
Проблема: неожиданная реакция на клик мыши в открывшемся окне


11-1221430466
azsd
2008-09-15 02:14
2015.02.15
KOL 2.87 for Delphi 2009 (MCK worked.)





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский