Lazarus

Programming => Packages and Libraries => KOL => Topic started by: yuriy_sydorov on October 19, 2007, 12:51:15 am

Title: KOL-CE - compact applications for WinCE
Post by: yuriy_sydorov on October 19, 2007, 12:51:15 am
I finally made the first public release of KOL-CE library.
Here is a project page: http://wiki.freepascal.org/KOL-CE

KOL-CE is ideal for WinCE development. EXE size of project with empty form starts from 47KB.

I hope it will be useful for all.
Title: RE: KOL-CE - compact applications for WinCE
Post by: Legolas on October 19, 2007, 11:34:37 am
That's a gret news, really! I have just dropped a WinCE project because its big size :D
Just a question: do you think it could be possible to use KOLCE and SQLite in the same project?
Title: RE: KOL-CE - compact applications for WinCE
Post by: yuriy_sydorov on October 19, 2007, 01:09:10 pm
Sure. You can use database access components from FCL in KOL project. It will add 300-500KB to exe.
Also you can use some lightweight SQLite units which is not based on TDataSet. In such case there will be less footprint on exe size.
Also dont forget KOL does not have specialized DB controls (TDataSet based). You need to display data from tables using standard listview or something else.
Title: RE: KOL-CE - compact applications for WinCE
Post by: Vincent Snijders on October 19, 2007, 01:43:05 pm
Great news, Yuri, that you ported KOL to wince.
Title: RE: KOL-CE - compact applications for WinCE
Post by: yuriy_sydorov on October 19, 2007, 02:51:20 pm
Yes. Currently it is the first production ready GUI toolkit for FPC and WinCE. :)
P.S: I already created commercial product using KOL-CE: http://www.cp-lab.com/windows-mobile.html
If you look at screenshots you will see how powerful KOL-CE.
Title: RE: KOL-CE - compact applications for WinCE
Post by: kakarotv5 on October 24, 2007, 01:06:20 pm
I have installed Lazarus v0.9.23 fpc 2.2.1 with cross arm wince.

I have installed a KOL-CE without problems.

I have tried to compile a program under arm-wince but I got the next error:

Code: [Select]
C:\lazarus\components\kol\KOL.PAS(57901) Error: Error while linking

If I compile a Win32 application it works well.

Some idea to fix this?

Thanks.
Title: RE: KOL-CE - compact applications for WinCE
Post by: yuriy_sydorov on October 24, 2007, 03:31:21 pm
You need to edit Windows PATH environment variable and add path to folder where win32 fpc binaries are located.
Title: RE: KOL-CE - compact applications for WinCE
Post by: kakarotv5 on October 24, 2007, 06:30:19 pm
I do not understand you.

You can help me more?

Thanks.
Title: RE: KOL-CE - compact applications for WinCE
Post by: Leledumbo on October 25, 2007, 07:19:33 am
Do you have the same version of cross arm-wince and fpc from lazarus (which is 2.2.1)?
Title: RE: KOL-CE - compact applications for WinCE
Post by: yuriy_sydorov on October 25, 2007, 10:17:03 am
kakarotv5: Read here about editing PATH: http://wiki.freepascal.org/KOL-CE#Usage
Title: Re: RE: KOL-CE - compact applications for WinCE
Post by: kakarotv5 on October 25, 2007, 12:56:36 pm
Quote from: "Leledumbo"
Do you have the same version of cross arm-wince and fpc from lazarus (which is 2.2.1)?


Yes, I have installed Lazarus (Lazarus-0.9.23-fpc-2.2.1-20071017-win32.exe) with cross arm wince (Lazarus-0.9.23-fpc-2.2.1-20070916-cross-arm-wince-win32).
Title: Re: RE: KOL-CE - compact applications for WinCE
Post by: kakarotv5 on October 25, 2007, 01:16:13 pm
Quote from: "yury_sidorov"
kakarotv5: Read here about editing PATH: http://wiki.freepascal.org/KOL-CE#Usage


Thank you very much, I have solved the problem.

KOL-CE is a very good tool for the programmers of pocket computers.
Title: Cannot install
Post by: aji on October 26, 2007, 09:41:21 pm
After trying to install Kol-ce since it was released a week ago without any luck, I though I would do a clean reinstall of everything.  However, I still can't get the package to install. This is what I  have done:

Installed FPC 2.2.0 and Lazarus 0.9.2.23 to default directories.
Installed Lazarus cross arm to default.
Copied Kol-ce dir. to Lazarus directory.

Started Lazarus.
Opened MirrorKOLPackage

Entered install:
"The package "MirrorKOLPackage 2.80" was marked for installation. Currently lazarus only supports static linked packages. The real installation need rebuilding and restarting of lazarus. Do you want to rebuild Lazarus now?"
Answering yes => "C:\lazarus\kol-ce-2.80\mck\MIRROR.PAS(88,15) Fatal: Can't find unit Forms used by mirror"

Removed package from installation
Recompiled Lazarus via tools rebuild. No errors.

Tried opening MirrorKOLPackage again, installed. It asks to rebuild lazarus:
=> "Unable to find file "forms.pp"
Check search path in Project->Compiler Options...->Search Paths->Other Unit Files."

Added path to forms.pp and wslclclasses.pp and tried install again.
=> "C:\lazarus\lcl\actnlist.pas(342,2) Fatal: Can't open include file "containedaction.inc""

Added path to include in include files under compiler action.
=> same error.

Added absolute path to include file =>
"Unable to find file "componenteditors.pas" Check search path in Project->Compiler Options...->Search Paths->Other Unit Files."

Added paths to ideintf and lcl\forms.=>
"Ambiguos unit found.
The unit baseideintf exists twice in the unit path of the IDE:
1."C:\lazarus\kol-ce-2.80\mck\lib\i386-win32\baseideintf.ppu"
2. "c:\lazarus\ideintf\units\i386-win32\baseideintf.ppu"
Hint: Check if two packages contain a unit with the same name."
Abort or ignore, Entered ignore. Same errors with
+ checkgroupeditordlg.ppu, checklistboxedirodlg.ppu, columndlg.ppu
componenteditors.ppu, frmselectprops.ppu, ideexterntoolintf.ppu,
dewindowintf.ppu,lazideintf.ppu +75 others.
Entered ignore on all. =>

Unable to find mirror.pas

I tried to add the path to this under compiler options, other units, but
after selecting it and clicking ok, it didn't show up on the path line. I
also tried typing it in, but it disappeared when I went out of compiler
options.

I guess I'm really stuck. Any ideas? I was really hoping that I could use
this to program for my Pocket PC, so that the exe file wasn't so big.

Thanks!
Title: RE: Cannot install
Post by: Leledumbo on October 27, 2007, 07:38:07 am
I made it to compile at the first time compilation simply by putting the kol-ce directory under components. Maybe this will help:
1. Copy all and hidden messages to clipboard, and check with a text editor (messages tab doesn't show everything). This message:
Quote
"C:\lazarus\kol-ce-2.80\mck\MIRROR.PAS(88,15) Fatal: Can't find unit Forms used by mirror"
possibly not the real error.
2. This one:
Quote
"C:\lazarus\lcl\actnlist.pas(342,2) Fatal: Can't open include file "containedaction.inc""
menas that Lazarus tries to recompile LCL, which shouldn't happened.
3. Don't add path to LCL source, it will only complicate the errors. That's why
Quote
"Ambiguos unit found.
The unit baseideintf exists twice in the unit path of the IDE:
1."C:\lazarus\kol-ce-2.80\mck\lib\i386-win32\baseideintf.ppu"
2. "c:\lazarus\ideintf\units\i386-win32\baseideintf.ppu"
Hint: Check if two packages contain a unit with the same name."
Abort or ignore, Entered ignore. Same errors with
+ checkgroupeditordlg.ppu, checklistboxedirodlg.ppu, columndlg.ppu
componenteditors.ppu, frmselectprops.ppu, ideexterntoolintf.ppu,
dewindowintf.ppu,lazideintf.ppu +75 others.
Entered ignore on all.
appears, because kol-ce package has also compiled the LCL, and if you see under its compiler options, in unit output directory you'll see "lib\$(TargetCPU)-$(TargetOS)". This means EVERYTHING that this package compiles will be in that directory.
4. Read this (http://wiki.freepascal.org/KOL-CE) before going any further.
Title: Re: Cannot install
Post by: yuriy_sydorov on October 27, 2007, 12:09:03 pm
Quote from: "aji"

Installed FPC 2.2.0 and Lazarus 0.9.2.23 to default directories.


I suspect FPC versions conflict. Lazarus comes with some version of FPC already. Usually you dont need to install fpc separately. Maybe you downloaded Lazarus with fpc 2.2.1 bundled with it, but MCK package is compiled by fpc 2.2.0 or vice versa...
Title: KOL-CE - compact applications for WinCE
Post by: aji on October 28, 2007, 10:39:53 pm
Thanks to everyone!
I tried to remove the path references and removed the separate Free Pascal installation, but got the same errors. So again I removed Lazarus completely, deleted the Lazarus and Free Pascal directories, restarted the computer and reinstalled Lazarus and the crossarm version.
Everything compiled to a WIN32 application, so I tried the Wince version. I added the environment paths in Windows and compiled to a 54kb application (only one component)!

Thanks again!
Title: KOL-CE - compact applications for WinCE
Post by: kakarotv5 on October 30, 2007, 11:31:42 pm
How I add a text in new line?

I do it for example:

Code: [Select]

KOLMemo1.Add('Hello' + #13 + 'This is a newline');


But I obtain this:

(http://i8.tinypic.com/6bogmft.jpg)

EDIT: I have solved this with:

Code: [Select]

KOLMemo1.Add('Hello' + #13#10 + 'This is a newline');
Title: KOL-CE - compact applications for WinCE
Post by: felipemdc on October 31, 2007, 10:08:24 am
Free Pascal comes with a constant that represents a line end on all platforms, use that instead:

'Hello' + LineEnding + 'This is a newline'
Title: KOL-CE - compact applications for WinCE
Post by: grexos on November 01, 2007, 08:42:09 pm
Hi! i have small problem with kol-ce. Every build is successfull but.. my aplication has only one form and after compile have over 1MB and harder problem is in wince. if i run my aplicaion on my PDA i dont see form. ony name of program is visible. do you now where is the error ? thx
Title: KOL-CE - compact applications for WinCE
Post by: yuriy_sydorov on November 02, 2007, 12:34:56 am
Set form's defaultSize and defaultPosition to True.
Turn on "Strp symbols..." option and you should have exe 40-50KB.
Title: KOL-CE - compact applications for WinCE
Post by: Chainfire on November 07, 2007, 09:37:57 pm
Hey, great work, I'm still having some problems though.

I create a project with form and KOLProject, KOLForm, KOLApplet, defaultSize/Position = True, and a few components that have the correct anchors set. However, when opening on my PPC, everything stays the same size/position as design time, instead of correctly scaling to screen size. In other words, it looks like the anchors don't work. Solution?
Title: KOL-CE - compact applications for WinCE
Post by: yuriy_sydorov on November 08, 2007, 09:52:49 am
You need to use the following trick to make anchors work:
Put borderless panel on a form. Do not align the panel. Then place all your gui to this panel.
Then align the panel to caClient using code in OnCreate event handler for a form.
Title: KOL-CE - compact applications for WinCE
Post by: Chainfire on November 08, 2007, 02:46:02 pm
Thanks, works like a charm. Convert one of my pet projects from LCL-CE to KOL-CE with only minor inconveniences. If you care to check it out: WMWifiRouter (http://www.jongma.org/WMWifiRouter/). Next up is KaiserTweak (http://www.jongma.org/KaiserTweak/), but it will probably be quite a bit more work :)
Title: KOL-CE - compact applications for WinCE
Post by: yuriy_sydorov on November 08, 2007, 04:40:58 pm
Congratulations :) You can add link to WMWifiRouter to KOL-CE wiki :)
Title: KOL-CE - compact applications for WinCE
Post by: mrmath on November 12, 2007, 02:18:28 am
Quote from: "Chainfire"
Hey, great work, I'm still having some problems though.

I create a project with form and KOLProject, KOLForm, KOLApplet, defaultSize/Position = True, and a few components that have the correct anchors set. However, when opening on my PPC, everything stays the same size/position as design time, instead of correctly scaling to screen size. In other words, it looks like the anchors don't work. Solution?


On the KOLForm component, set defaultposition and defaultsize both to true.

I've found that when my form is 204 high by 319 wide, it's the exact size that it will be when it's maximized on my landscape device.  I'm only sharing that so you can see where you'll be able to place your components on the form.
Title: KOL-CE - compact applications for WinCE
Post by: mrmath on November 12, 2007, 02:19:49 am
I feel really stupid, and it's not the first time in my life.  I can't figure out what code I'm supposed to put in the menu click to exit my application.  On my physical phone, I can always run task manager, but on my emulator, I don't have task manager.
Title: KOL-CE - compact applications for WinCE
Post by: Farshad on November 12, 2007, 07:41:45 am
Quote from: "mrmath"
I can't figure out what code I'm supposed to put in the menu click to exit my application.


Application.Terminate;
Title: KOL-CE - compact applications for WinCE
Post by: yuriy_sydorov on November 12, 2007, 08:56:23 am
Quote from: "Farshad"
Quote from: "mrmath"
I can't figure out what code I'm supposed to put in the menu click to exit my application.


Application.Terminate;

It is not LCL. :)

You need to call Form.Close;
Title: KOL-CE - compact applications for WinCE
Post by: mrmath on November 12, 2007, 03:08:46 pm
Quote from: "Farshad"
u
Application.Terminate;


See, that's why I feel stupid about it.  I tried that, and it won't compile:

unit1.pas(58,14) Error: Identifier not found "Application"
Title: KOL-CE - compact applications for WinCE
Post by: mrmath on November 12, 2007, 03:16:48 pm
Quote from: "yury_sidorov"

You need to call Form.Close;


I thought for sure that would work, but I get:

unit1.pas(58,10) Error: identifier idents no member "close"
unit1.pas(58,15) Error: Illegal expression
Title: KOL-CE - compact applications for WinCE
Post by: yuriy_sydorov on November 12, 2007, 07:14:41 pm
Hmm, strange...
Try Form^.Close;
Are this errors from compiler or IDE code explorer?
Title: KOL-CE - compact applications for WinCE
Post by: mrmath on November 12, 2007, 07:32:33 pm
Same error.  I'm seeing them in the message box of the compiler.  I am, of course, using Form1.Close; and Form1^.Close, as my form is called Form1.  When I change it to Form.Close, that works.  See, I'm still feeling stupid!
Title: KOL-CE - compact applications for WinCE
Post by: yuriy_sydorov on November 12, 2007, 09:53:46 pm
Read this: http://wiki.freepascal.org/KOL-CE#IMPORTANT
You need to use Form field to access form's propertied. Like this: Form1.Form.Close;
or simply Form.Close; if the code is placed inside form's method.
Title: KOL-CE - compact applications for WinCE
Post by: Flanter on January 11, 2008, 06:55:49 am
I have just installed KOL-CE on my computer and I cannot compile my test project because of error that were described here before:

Code: [Select]
Compiling resource D:\Projects\Lazarus\!Packages\KOL\kol\KOL-CE.rc
gcc: Warning: `-x c' after last input file has no effect
gcc: No input files
C:\lazarus\fpc\2.2.0\bin\i386-win32\arm-wince-windres.exe: no resources
D:\Projects\Lazarus\!Packages\KOL\kol\KOL.pas(57901) Error: Error while linking
D:\Projects\Lazarus\!Packages\KOL\kol\KOL.pas(57901) Fatal: There were 1 errors compiling module, stopping


I have added directory

Code: [Select]
C:\lazarus\fpc\2.2.0\bin\i386-win32\

to the PATH system variable, restarted Lazarus several times, but no success - the error is still here. I have checked that PATH is correct by typing in console "set PATH" and it shows that the directory above is in PATH variable.

Is there anything I can do in this situation? I ran out of ideas... :(
Title: KOL-CE - compact applications for WinCE
Post by: yuriy_sydorov on January 12, 2008, 02:54:37 pm
Try to execute arm-wince-windres.exe from command prompt when current directory is C:\
I bet it will not be found.
Title: KOL-CE - compact applications for WinCE
Post by: Flanter on January 13, 2008, 03:13:58 pm
No, I just tried to launch arm-wince-windres.exe from other directories (including C:\)and it worked, so the PATH variable is correct.
Title: KOL-CE - compact applications for WinCE
Post by: yuriy_sydorov on January 14, 2008, 01:11:25 pm
Maybe windres do not like "!Packages" folder name. Try to rename it to "Packages"...
Title: KOL-CE - compact applications for WinCE
Post by: Flanter on January 14, 2008, 05:06:31 pm
Yes, it works now! Thank you, Yuri! :)
Title: KOL-CE - compact applications for WinCE
Post by: jabu on January 21, 2008, 01:49:27 am
Hello Yury,

I have one suggestion with KOL&MCK on WinCE (CePlatform = cpWinCE). I think that devices with WinCE 4.2 core does not have aygshell.dll. When I create simple project in MCK (or KOL) without menu always is called AYGSHELL.SHCreateMenuBar - solution of this allow using KOL&MCK in devices which does not have aygshell.dll - WinCE 4.2 cores in Symbol BarCode scanners.

Is it possible?

Regards

jabu
Title: KOL-CE - compact applications for WinCE
Post by: yuriy_sydorov on February 01, 2008, 06:10:48 pm
KOL-CE supports only PocketPC and Smartphone editions of wince. I will add support for "pure" wince later. You can try to add such support by yourself and send patches to me...
Title: KOL-CE - compact applications for WinCE
Post by: JohnvdWaeter on February 12, 2008, 10:58:48 am
This KOL-CE really rocks, but you have to be really careful NOT to drop any LCL components on your form.

That mistake is easily made... I think Yury should describe the steps to take when it happens... when the question pops up what to do with the LCL-component, what happens when the MCK TKolForm dissapears from the form, when things are Locked...

I did manage to resolve, but it took some time to figure out...

John
Title: KOL-CE - compact applications for WinCE
Post by: JohnvdWaeter on February 12, 2008, 01:36:16 pm
also:
TKolEditbox seems to forget its TextAlign.

If set to taRight or taCenter, it looks ok at designtime, but it reset to taLeft at runtime.

John
Title: TKolDateTimePicker and dateformat?
Post by: JohnvdWaeter on February 13, 2008, 09:14:19 am
Hi,

If I set TKolDateTimePicker to my local dateformat (e.g. Format:='dd-mm-yyyy', I get a couple of squares instead of a date. How to to set the dateformat?

At runtime, DateTimePicker1.DateTimeFormat:='dd-mm-yyyy' gives the same result.


tia!
John
Title: Behaviour of fonts?
Post by: JohnvdWaeter on February 13, 2008, 02:57:51 pm
Hmmm, quite active with the KOL-CE package, so more issues arise while at work... ;-)

What about the fonts? If I change the color property of a TKollabels font, the size changes too... is this by design?

tiaa !

John
Title: RE: Behaviour of fonts?
Post by: yuriy_sydorov on February 14, 2008, 08:43:44 pm
By default there is no font set at all. System default font is used. If you want to use fonts you need to set proper font name and font height for TKOLForm. Then you can adjust fonts for child controls.

I suspect that it is a bug in dateformat handling in TKolDateTimePicker. Please submit bug on KOL-CE page at SourceForge.

WinCE does not support text align in single line edot control. Try to use TKOLMemo.
Title: X-button on WinCE, can it be hidden or changed to ok?
Post by: JohnvdWaeter on February 18, 2008, 04:03:44 pm
Hi,

Using KOL-CE, I can no longer set the Borderstyle to bsDialog to make the x-button change into ok and close the application.

Is there a way to achieve this using KOL-CE (or to get rid of the x-button at all?)

John
Title: RE: X-button on WinCE, can it be hidden or changed to ok?
Post by: yuriy_sydorov on February 19, 2008, 12:11:07 pm
ok-button is displayed for modal froms, which are called using ShowModal.
Title: RE: X-button on WinCE, can it be hidden or changed to ok?
Post by: ghostwheel on February 19, 2008, 05:23:01 pm
I'm using kol-ce to write an app for a wm5 smartphone. It works great! Thank you!!
I had problems with the installation - the usual
---------
Compiling resource KOL-CE.rc
arm-wince-windres.exe: no resources
KOL.PAS(57901) Error: Error while linking
KOL.PAS(57901) Fatal: There were 1 errors compiling module, stopping
----------
errors. After many install-remove cycles, it now finally works. I'm not sure what I did right this time. It could be that It was the following: when opening the environment variables dialog, there are two setting for "path": one for the  user, one for the system (1st called PATH, 2nd one is called Path). I also set the system Path to point to the right place, not only the user PATH.

Anyway - now it works.
I have a question:
As recommended, I use defaultPosition=true, defaultSize=true, so that the form is full screen on the device.
Inside the form I have labels, for which I set AnchorBottom=true. Indeed, when I resize the window, they move with the bottom of the window.
The problem is the original resize. The window is resized to the default size, but the Labels don't move. So they get somewhere random in the window
(not random, really, just not where I want them), and then resize moves them relative to that place.
Is it somehow possible to have the original resize of the TKOLForm also affect widgets?
Title: RE: X-button on WinCE, can it be hidden or changed to ok?
Post by: yuriy_sydorov on February 19, 2008, 07:53:20 pm
It is known issue.
Put all controls into panel. Do not align panel at design time. Set panel alignment to caClient in OnCreate event of the form.
Title: RE: X-button on WinCE, can it be hidden or changed to ok?
Post by: ghostwheel on February 20, 2008, 05:28:58 pm
Thank you! That works. (I still have to figure out how to make all the alignments work...)

I have a second question: for my app (a calculator...) I needed to use more math functions, and exceptions. When I put "err" in "uses", I could not compile for winCE, because it seems that the library includes some code in x86 assembly in the exceptions part.
Instead I put "Math" and "SysUtils" as units, and everything seems to work fine. The program compiles to be somewhat larger (140KB - it used to be 50KB once), but it is still much smaller than the original 10MB that it was with LCL....

Should I have used KOL? How?
Title: RE: X-button on WinCE, can it be hidden or changed to ok?
Post by: yuriy_sydorov on February 20, 2008, 05:53:44 pm
"Err" unit is not ported to fpc yet.
The only solution for now is to use sysutils for exception handling.
Title: Re: RE: X-button on WinCE, can it be hidden or changed to ok
Post by: JohnvdWaeter on February 21, 2008, 07:32:05 pm
Quote from: "yury_sidorov"
ok-button is displayed for modal froms, which are called using ShowModal.


Right. The reason I asked was because for the average user it is hard to see if a program is still running in the background.

I solved the issue by putting this code in the the project_1.inc file:

Code: [Select]

   hWnd := FindWindow(nil, 'Formname');
   if hWnd <> 0
    then
    begin
     SetForegroundWindow(hWnd);
     halt(0);
    end;
 


and that solves my problem. If the program is restarted, the  first instance is brought to front. Seems to work ok!

ps and thanks for fixing the date-format! :-)

John
Title: KOL-CE - compact applications for WinCE
Post by: yuriy_sydorov on February 22, 2008, 11:21:25 am
It is more reliable to use JustOneActivate function to activate running instance.

Add the following code ProjectName_1.inc file:

Code: [Select]
if JustOneActivate(Form1.Form, 'MyProg') <> 0 then begin
   Form1.Form.Free;
   Halt;
 end;
Title: KOL-CE - compact applications for WinCE
Post by: JohnvdWaeter on February 22, 2008, 12:36:17 pm
Quote from: "yury_sidorov"
It is more reliable to use JustOneActivate function to activate running instance.

Add the following code ProjectName_1.inc file:

Code: [Select]
if JustOneActivate(Form1.Form, 'MyProg') <> 0 then begin
   Form1.Form.Free;
   Halt;
 end;


?? This gives me an AV when calling JustOneActivate.
Title: KOL-CE - compact applications for WinCE
Post by: yuriy_sydorov on February 25, 2008, 04:39:14 pm
Did you put this code into ProjectName_1.inc file and replaced Form1 with name of your main form?
Title: KOL-CE - compact applications for WinCE
Post by: JohnvdWaeter on February 26, 2008, 01:20:31 pm
Quote from: "yury_sidorov"
Did you put this code into ProjectName_1.inc file and replaced Form1 with name of your main form?


Yes I did. It seems I cannot access Form1. If I force the program to stop in any circumstances this way:

Code: [Select]

   if TRUE // JustOneActivate(Form1.Form, 'MyProg') <> 0
     then
      begin
       Form1.Form.Free;
       Halt;
      end;    

the same AV occurs.


If I change the code to:
Code: [Select]

    if JustOneActivate(applet, 'MyProg') <> 0
     then
      begin
       Applet.Free;
       Halt;
      end;


it seems to work ok, but is this the right way?

John
Title: TKolPaintbox, how to load/save drawing?
Post by: JohnvdWaeter on February 27, 2008, 10:24:37 am
Hi Yury,

In my application I need to give the user the possibility to draw a little picture using the stylus. This works Ok using TKolPaintbox. However, do you have a suggestion as how to load/save the drawing?

thanks in advance!
John
Title: RE: TKolPaintbox, how to load/save drawing?
Post by: yuriy_sydorov on February 28, 2008, 09:30:37 pm
You can use Applet for JustOneActivate as well.

You need to paint on bitmap canvas and use paintbox for accepting stylus input and displaying bitmap contents.
bitmap can be loaded/saved using corresponding methids.
Title: KOL-CE - compact applications for WinCE
Post by: oraitecamonyes on February 29, 2008, 04:10:53 pm
Quote from: "yury_sidorov"
Set form's defaultSize and defaultPosition to True.
Turn on "Strp symbols..." option and you should have exe 40-50KB.


hello guys,

cant seem to find the "Strp symbols..." option!
where is it?

OK, fount it! COMPILER OPTIONS -> LINKING -> STRIP SYMBOLS FROM EXECUTABLE (-Xs)

but my EXE is still about 1MB... what am i missing??

ok, found it again :D LOL
i just have to use:
arm-wince-strip.exe  and upx.exe

my app is 33KB now ;)
Title: RE: Re: Cannot install
Post by: zybook on March 01, 2008, 08:29:26 am
KOL-CE is a good good good develper tool.  

how can it support the WEB Browser component?
Title: RE: Re: Cannot install
Post by: Leledumbo on March 03, 2008, 06:22:22 am
Quote
but my EXE is still about 1MB... what am i missing??

AFAIK -Xs doesn't work quite well. I always recompile EVERYTHING (rtl, fcl, lcl, etc) without -gl, turns on smartlinking, and optimize the code (make smart STRIP=1 OPTIMIZE=1, the drawback is I can't quickly find out a problem if there's a bug).
Title: RE: Re: Cannot install
Post by: oraitecamonyes on March 04, 2008, 10:00:14 am
Q1 - im having problems putting an image in a KOL project form... when i try to use Timage i get compilation errors... is it possible to use other VCLs appart from KOL ones?

Q2 - Filecopy / copyfile doenst work. The reply is TRUE but the file isnt coppied !? how can i make it work?

Q3 - I want my memo to focus on the last line and this doesnt work (sendmessage(Memo1.Handle,WM_VSCROLL,SB_BOTTOM,0);). How can i do it?

thank you guys!
:D
Title: How to set cursor to something like crHourglass?
Post by: JohnvdWaeter on March 05, 2008, 11:46:18 pm
In plain Delphi: screen.cursor:=crHourGlass;

Howto set cursor in KOL-CE? I tried assigning a lot of different values to variabele screencursor, but the rotating windows screencursor never appears... can it be done using KOL-CE?

tia John
Title: KOL-CE - compact applications for WinCE
Post by: yuriy_sydorov on March 11, 2008, 10:59:02 pm
User the following code to get wait cursor:

Code: [Select]
ScreenCursor:=LoadCursor(0, IDC_WAIT);
SetCursor(ScreenCursor);


and back to normal cursor:

Code: [Select]
ScreenCursor:=0;
SetCursor(LoadCursor(0, IDC_ARROW));
Title: Error when jumping to event-code:
Post by: JohnvdWaeter on March 12, 2008, 06:05:21 pm
Hi Yury, thanks for the cursor-code. I'll try that out. In the mean-time:

It happens a couple of times during a session.

Doubleclick on a button jumps to the eventhandler in the sourcecode. Same thing for menus, events etc.

Usually it works, a nice frame is written and I can type the code. If code is already there, cursor jumps to code.

But every now and then I get an error when doubleclick an event (on the button itself or in the objectinspector), that says (in the messages pane):

Code: [Select]

C:\lazarus\fpc\2.2.0\source\rtl\arm\arm.inc(294,36) Error: : expected, but name found


And the caret jumps to the file arm.inc (which I had NOT open, but now is opened) and points to line 294:
Code: [Select]

 var
  fpc_system_lock: longint; export name 'fpc_system_lock';


If I just stop Lazarus, save changes Yes, and restart, all works fine again...

John
Title: Setting Penwidth?
Post by: JohnvdWaeter on March 12, 2008, 06:25:35 pm
Code below doesn't set Penwidth, no matter what I set it. Reading it back always shows Penwidth = 0

Code: [Select]

 with abitmap.Canvas^ do
   begin
    pen.color := clRed;
    pen^.Penwidth := 4;

    moveto(StartX,StartY);
    lineTo(Mouse.X,Mouse.Y);
   end;


How to set Penwidth?

John
Title: Re: Error when jumping to event-code:
Post by: felipemdc on March 12, 2008, 11:00:28 pm
Quote from: "JohnvdWaeter"
Doubleclick on a button jumps to the eventhandler in the sourcecode. Same thing for menus, events etc.
.....


Please report IDE bugs on the bug tracker. No one will pay attention to them on the forum.
Title: Re: Error when jumping to event-code:
Post by: JohnvdWaeter on March 13, 2008, 11:12:56 am
Quote from: "sekel"
Quote from: "JohnvdWaeter"
Doubleclick on a button jumps to the eventhandler in the sourcecode. Same thing for menus, events etc.
.....


Please report IDE bugs on the bug tracker. No one will pay attention to them on the forum.


I would if I could make a case to reproduce the bug. And I somehow was under the impression that it had to do with KOL-CE.
Title: KOL-CE - compact applications for WinCE
Post by: yuriy_sydorov on March 13, 2008, 02:18:36 pm
I fixed pen width problem.

Lazarus CodeTools do not handle this code:
Code: [Select]
var
  fpc_system_lock: longint; export name 'fpc_system_lock';

Please post bug report about it.
Title: KOL-CE - compact applications for WinCE
Post by: Chainfire on April 04, 2008, 08:15:21 am
I may be completely overlooking this, but how do I use Unicode text with KOL components ?
Title: KOL-CE - compact applications for WinCE
Post by: yuriy_sydorov on April 05, 2008, 10:24:55 pm
KOL-CE uses KOLString type for strings. KOLString = widestring on wince.
Title: KOL-CE - compact applications for WinCE
Post by: Chainfire on April 06, 2008, 08:22:57 pm
I see. I had set this manually by now by defining UNICODE, but if you say that is not needed :)

Another question you may know the answer to: what is a good unicode font to use? I am specifically looking for one that supports CJK characters, seems "Arial Unicode MS" is not available on WinCE.
Title: Changing captions at runtime?
Post by: JohnvdWaeter on April 18, 2008, 01:07:09 pm
Hi Yury,

At runtime I like to change some captions of KOL-objects.
Most work fine, however:

  TabControl1_Tab1.Caption:='test';

gives Access Violation


Is this a bug or is there another way to change the caption of a tabsheet at runtime?

tia!
John
Title: KOL-CE - compact applications for WinCE
Post by: yuriy_sydorov on April 20, 2008, 01:32:54 am
Try this:
Code: [Select]
TabControl1.TC_Pages[0].Caption:='test';
Title: KOL-CE - compact applications for WinCE
Post by: Chainfire on April 21, 2008, 05:28:16 pm
Yuri,

I'm having strange problems with freeing objects, I get AV's.

Here's some code ($mode delphi):

Code: [Select]

var List: TStrList;
begin
  List := RegEnum(OptionsKeyBase + '\Profiles')^;
  // RegEnum returns PStrList
  try
    if List.Count > 0 then
    for i := 0 to List.Count - 1 do begin
      S := List.Items[i];
      while (Pos('\', S) > 0) do
        S := Copy(S, Pos('\', S) + 1, Length(S));
       
      if S <> DefaultProfileName then begin
        with AddProfile do begin
          Name := S;
          LoadFromRegistry;
        end;
      end else begin
        Profile[DefaultProfile].LoadFromRegistry;
      end;
    end;
  finally
    List.Free; // <---- AV HERE
  end;    
end;      


Ofcourse I have also tried with removing the code between try/finally. Seems it happens as soon as List has a string inside. Stack trace:

Code: [Select]

An unhandled exception occurred at $03F700BC :
EAccessViolation : Access violation
  $03F700BC
  $00011B80  fpc_help_destructor,  line 423 of C:/lazarus/source/fpcbuild/2.1/fpcsrc/rtl/inc/generic.inc
  $0001F574  TOBJ__REFDEC,  line 14517 of E:/SoftDev/kol-ce-2.80/kol/KOL.PAS
  $00029DB8  TWMWROPTIONS__LOADFROMREGISTRY,  line 539 of cwmwroptions.pas
  $00027590  TFORM1__KOLFORM1FORMCREATE,  line 99 of unit1.pas
  $0002743C  NEWFORM1,  line 63 of unit1_1.inc
  $0001165C  main,  line 10 of skeleton.lpr


This is not the only place it happens either, I get it when freeing other lists as well (TList). Cannot determine what causes it, but I can't get the error to disappear either. It works if I comment out the "List.Free", but then I won't be freeing memory.

Any help, advice, etc ?
Title: KOL-CE - compact applications for WinCE
Post by: yuriy_sydorov on April 21, 2008, 06:16:11 pm
Can you provide complete code example which triggers this error?
Title: KOL-CE - compact applications for WinCE
Post by: Chainfire on April 21, 2008, 07:06:42 pm
Trying to whip something up for you :) It'll be a couple of hours.

EDIT:

I'm having a freakishly hard time reproducing the issue outside the project... Of course I'm still going to continue trying, but here is another piece of info you may find interested / could be a hint:

Code: [Select]

var
  List: TStrList;
begin
  List := RegEnum(...)^; // returns PStrList
  try
    if List.Count > 0 then
      ....
  finally
    List.Free; <---- AV HERE
  end;
end;


I changed this to:

Code: [Select]

begin
  with RegEnum(...)^ do
  try
    if Count > 0 then
      ....
  finally
    Free; <---- WORKS ?!
  end;
end;


I tried to do this several different ways, and this was the only one that worked, completely removing the List variable.

Unfortunately, I still have PList's in 5 other places that are having the same issue, for which I have not yet found a way to free them correctly (ie, without throwing the same exception as quoted in my previous post).
Title: KOL-CE - compact applications for WinCE
Post by: yuriy_sydorov on April 21, 2008, 09:39:37 pm
I just noticed that you declared var as:
Code: [Select]
var
  List: TStrList;

But it is totally wrong. It explains why you get the errors.
You should use PStrList varaible.
Code: [Select]
with RegEnum(...)^ do
is correct.
Title: KOL-CE - compact applications for WinCE
Post by: Chainfire on April 21, 2008, 09:47:32 pm
Ok, I'm not following that.

In KOL.pas is declared:

PStrList = ^TStrList

so:

var List: TStrList;
List := NewStrList^;

why exactly is this not correct ?

I use the above all over the place, and it usually works.

EDIT: Ok, I adjusted it everywhere and indeed the problem disappears. Thanks a bunch! As for what I said ^^^, is that because you are using 'poor' objects ?
Title: KOL-CE - compact applications for WinCE
Post by: yuriy_sydorov on April 22, 2008, 11:36:56 am
Yes. It is because 'poor' objects in KOL library. Class instances are always pointers, while objects can be static instances TXXX or dynamic instances PXXX (pointers).

In this code you copy contents of dynamic instance of StrList to static instance in variable List:

var List: TStrList;
List := NewStrList^;

Then you are trying to release static instance and get the error.

All KOL objects are designed to be dynamic and you must work with pointers only...

P.S. 'poor' objects are just records with methods. So use record rules for them.
Title: Sometimes date2Strfmt('dd-MM-yyyy',date) gives empty str
Post by: JohnvdWaeter on April 24, 2008, 09:37:27 am
Sometimes, on the WM6-pda,

Date2Strfmt('dd-MM-yyyy',date)  

returns an empty string.

I traced into KOL.pas and found  function SystemDate2Str;

Here an empty string is returned if GetMem fails or if GetDateFormat fails. Could this ever happen?

On subsequent calls, the result remained empty. The rest of the program just kept working. After a restart, the result was ok, so the problem is not easy to reproduce.

Any ideas?

tia!
John
Title: Events lost when transferring sources to other PC
Post by: JohnvdWaeter on April 24, 2008, 04:37:51 pm
This afternoon I freshly reinstalled a new daily snapshot.

After that I copied a complete KOL-projectdir from my dev machine to this new machine.  Compiles fine on the dev-machine, both to WinCE and to Win32 targets.

- Open Project, ok.
- Build All, ok
- Run : no events fired.

Paths are all the same. All events have dissapeared from the object-inspector and are not fired at runtime either (e.g. OnClick-event on a button). Doubleclicking the button does not create event. Doubleclicking in object-inspector does not create new event or find existing event in unit.

If I drop a NEW TKolbutton on the form, I can define its onclick-event (partly) the usual way: doublleclick the TKolbutton creates an event in the codeeditor, but it does NOT appear in the OI.

Even if I select the still existing event in the dropdownlist in the object-inspector, the editbox in the OI stays empty...

If I create a new KOL-project, everything works fine. So I suspect there is something in the files that I copied from the other machine. [EDIT] Oooops, disregard this... the event appeared once in th OI, but after adding another TKolbutton, everything was gane again... [/EDIT]

If I copy a projectsource from Laz 0.9.25/fpc 2.2.0 to Laz 0.9.25/fpc 2.2.1, should I make precautions to some files? Or setup some parameters in the IDE?

tia!
John

[EDIT2]
Weird... a second time CleanUp+BuildAll did the job. It now works as expected. Still curious what could have been the problem!
[/EDIT2]
Title: RE: Events lost when transferring sources to other PC
Post by: yuriy_sydorov on April 25, 2008, 11:33:40 am
If you are using Lazarus 0.9.25 or later you need to rebuld Lazarus with DisableFakeMethods defined before installing MCK package.

To do that:

   1. Run Lazarus.
   2. Choose Tools > Configure "Build Lazarus"... menu item.
   3. Choose Clean Up + Build all on Quick Build Options page.
   4. Open Advanced Build Options page and add -dDisableFakeMethods into Options input field.
   5. Click Build button to rebuild Lazarus.
Title: Re: Sometimes date2Strfmt('dd-MM-yyyy',date) gives empty str
Post by: yuriy_sydorov on April 25, 2008, 11:57:08 am
Quote from: "JohnvdWaeter"
Sometimes, on the WM6-pda,

Date2Strfmt('dd-MM-yyyy',date)  

returns an empty string.

I traced into KOL.pas and found  function SystemDate2Str;

Here an empty string is returned if GetMem fails or if GetDateFormat fails. Could this ever happen?

On subsequent calls, the result remained empty. The rest of the program just kept working. After a restart, the result was ok, so the problem is not easy to reproduce.

Any ideas?


It seems that GetDateFormat fails. Are you sure that date value is correct?
You need to debug this problem by yourself and find what exactly fail.
Title: KOL-CE - compact applications for WinCE
Post by: Chainfire on April 28, 2008, 11:38:56 pm
Quote from: "yury_sidorov"
Yes. It is because 'poor' objects in KOL library. Class instances are always pointers, while objects can be static instances TXXX or dynamic instances PXXX (pointers).

In this code you copy contents of dynamic instance of StrList to static instance in variable List:

var List: TStrList;
List := NewStrList^;

Then you are trying to release static instance and get the error.

All KOL objects are designed to be dynamic and you must work with pointers only...

P.S. 'poor' objects are just records with methods. So use record rules for them.


Wow, I can't believe I've been developing in Object Pascal for 8 years now and didn't know that. That's very useful information, and it being just a record with methods explains a lot. Also opens up for some C++ header translations I thought before were impossible.

Thanks again for your hard work, your assistance and the information!
Title: Attaching a TKolbutton.Onclick dynamically?
Post by: JohnvdWaeter on April 29, 2008, 03:44:32 pm
Hi Yury,

In my CE-appl I dynamically create forms the user has to fill in. I have a TKolPanel on which there are an editbox and 2 buttons.
The editbox accepts numeric input only.
The Buttons have a plus and a minus as caption.

If a user presses
If the user presses [-], the value in the editbox should be decreased. Something like a spinedit.

This TKolpanel is created at runtime, maybe 1 instance, maybe 10 instances on a form, used and freed.

When creating the buttons and the editbox, I want to attach the buttons Onclick to a generic eventhandler. In Delphi/VCL I would search Sender.Parent (which is the panel) for an editbox and adjust its textvalue. How to write something like that using KOL?

Is there a way to do something like:
Code: [Select]

for n:=1 to (sender as tkolbutton).parent.Childcount-1 do
 if  (sender as tkolbutton).parent.Children[n] is TKolEditbox
  then ...do something...

??

tia!
John
Title: Re: Sometimes date2Strfmt('dd-MM-yyyy',date) gives empty str
Post by: JohnvdWaeter on April 29, 2008, 04:59:59 pm
[/Quote]
It seems that GetDateFormat fails. Are you sure that date value is correct?
You need to debug this problem by yourself and find what exactly fail.[/quote]

You won't believe it... it only happens on sundays!!

date2Strfmt('dd-MM-yyyy',date) returns an empty string and GetLastError (in KOL.PAS, function SystemDate2Str) says 87, which is ERROR_INVALID_PARAMETER, but only when date returns a date that is a sunday.... ???

Beats me..... any suggestions appreciated!

kind regards
John
Title: Re: Sometimes date2Strfmt('dd-MM-yyyy',date) gives empty str
Post by: JohnvdWaeter on April 29, 2008, 09:40:48 pm
Function DayOfWeek should return 0..6 as stated in the comment below the function declaration. The systemtime-structure also needs 0..6.

But the formula in the function returns 1..7

If I remove the +1 at the end of the formula, all seems to work ok, but I'm not sure if this could possibly break other code?

tia!
John
Title: RE: Re: Sometimes date2Strfmt(
Post by: yuriy_sydorov on April 29, 2008, 10:56:59 pm
Indeed, DayOfWeek was wrong. It is fixed now. Thanks.

Since all KOL standard controls implemented in single TControl object, you need to use Tag property to identify controls. Set Tag of edit boxes to some value and the code will be:

Code: [Select]
for n:=1 to sender.parent.Childcount-1 do
 if  sender.parent.Children[n].Tag = SomeValue
  then ...do something...


P.S. You can use real updown control to create spinedit:
http://www.kolnmck.ru/files/kolce/comp/kolce_updown.7z
Title: Re: RE: Re: Sometimes date2Strfmt(
Post by: JohnvdWaeter on May 01, 2008, 02:12:34 pm
Hi Yury,

Thanks.

Other things:

1. Is it possible to implement and publish OnEnter and OnLeave for TKolDateTimePicker? I'd like to change color when receiving or losing focus.

2. Does exist any documentation (in English) on how to use TKolFrame?

thanks again,
John
Title: RE: Re: RE: Re: Sometimes date2Strfmt(
Post by: yuriy_sydorov on May 02, 2008, 07:06:11 pm
I published OnEnter and OnLeave for TKolDateTimePicker, but color can not be changed for TKolDateTimePicker for some unknown reason :(

TKOLFrame. It is intended to use in place of TKOLForm, and allows to create and adjust at design time a panel with child controls and objects on a standalone designer form. At run time, instances of such panel together with its children can be put onto another parent control or form dynamically.
Title: Gray area under KOL form - Windows CE 5.0
Post by: ivanf on May 10, 2008, 12:52:44 am
Hi,

I have been testing KOL components for a few days, looking forward for integrating it to my Windows CE development kit. Amazing job, thanks for it.

However, I have a little problem:  on a Windows CE 5.0 device, I´m getting a grayed area below the form, as you may see in the following image

(http://i26.tinypic.com/2vlw30i.jpg)

If I turn off the "Always on top" property in the taskbar the gray area is hidden (the taskbar area almost fits).

(http://i26.tinypic.com/ngyb8z.jpg)
 
The properties defaulPosition and defaultSize are set to True, according to documentation.
 
I'm guessing that this problem has to do with the fact that in other versions of Windows CE (Windows Mobile 5 on mi iPaq)  another bar exists, where you can choose menu options and showing/hiding keyboard.

Is there a way to get rid of this area?

Thanks in advance

Ivan
Title: Howto attach TKolPopupmenu at runtime?
Post by: JohnvdWaeter on May 10, 2008, 04:12:13 pm
Hi Yury,

In the Object Inspector I can attach a popupmenu.

But howto attach a popupmenu to a dynamically created object (at runtime)?

[Edit]
Ok, I found SetAutoPopupMenu and it works. However, if I have connected this popupmenu to several PObjects, how to dermine from which Object the popupmenu was fired?

 "Sender" and "Item" don't tell nothing about the originating object that fired the popup, am I right?

[/Edit]


cheers,
John
Title: KOL-CE - compact applications for WinCE
Post by: yuriy_sydorov on May 10, 2008, 04:56:49 pm
ivanf, this area is menu area and you notice it because you areusing non-standaed app-bar.

To hide menu area insert the following code in OnCreate event of a form:

Code: [Select]
Form.CreateWindow;
DestroyWindow(SHFindMenuBar(Form.Handle));
Form.BoundsRect:=GetWorkArea;
Form.HasBorder:=False;
Title: KOL-CE - compact applications for WinCE
Post by: yuriy_sydorov on May 10, 2008, 05:02:19 pm
Define for your project USE_MENU_CURCTL and make sure that KOL.pas is recompiling.
Then use CurCtl property of popup menu object.

P.S. Study KOL sources better. All interfaces are well commented. :)
Title: KOL-CE - compact applications for WinCE
Post by: JohnvdWaeter on May 12, 2008, 06:06:56 pm
Quote from: "yury_sidorov"
Define for your project USE_MENU_CURCTL and make sure that KOL.pas is recompiling.
Then use CurCtl property of popup menu object.


Right, that works!
Quote

P.S. Study KOL sources better. All interfaces are well commented. :)


Right again! However, its not like "find it in the source" but rather "first read the source" to find out how KOL works... It 's an approach I have to get used to, since it's not the way I used to find help in delphi or lazarus.

But I learn everyday... ;-)

Kind regards,
John
Title: KOL-CE - compact applications for WinCE
Post by: ivanf on May 12, 2008, 09:47:03 pm
Quote from: "yury_sidorov"
ivanf, this area is menu area and you notice it because you areusing non-standaed app-bar.

To hide menu area insert the following code in OnCreate event of a form:

Code: [Select]
Form.CreateWindow;
DestroyWindow(SHFindMenuBar(Form.Handle));
Form.BoundsRect:=GetWorkArea;
Form.HasBorder:=False;


Thank you very much, it worked like a charm...

Best regards,
Ivan
Title: Transparent controls
Post by: Chainfire on June 10, 2008, 08:17:11 pm
Yuri,

I seem to be unable to get my controls (panels and labels) to work in transparent mode. I've set Transparent to true, EraseBackground to false and DoubleBuffered to true, to no avail.

Is this not supported on WinCE or am I doing something wrong?

Thanks!
Title: RE: Transparent controls
Post by: yuriy_sydorov on June 11, 2008, 05:00:55 pm
I did not test transparency on wince. Therefore it is not supported yet...
Title: Re: RE: Transparent controls
Post by: Chainfire on June 11, 2008, 08:33:10 pm
Quote from: "yury_sidorov"
I did not test transparency on wince. Therefore it is not supported yet...


Ah ok. Too bad. Any plans to test it? (or do I need to make a bounty, or...?)

By the way, another comment:

Code: [Select]

  TOnBitBtnDraw = function( Sender: PControl; BtnState: Integer ): Boolean of object;
  {* Event type for TControl.OnBitBtnDraw event (which is called just before
     drawing the BitBtn). If handler returns True, there are no drawing occure.
     BtnState, passed to a handler, determines current button state and can
     be following: 0 - not pressed, 1 - pressed, 2 - disabled, 3 - focused.
     Value 4 is reserved for highlight state (then mouse is over it), but
     highlighting is provided only if property Flat is set to True (or one
     of events OnMouseEnter / OnMouseLeave is assigned to something). }


Probably related to BITBTN_DISABLEDGLYPH2 define (I did not define this manually, just out-of-the-box KOL), but 1 = disabled and 2 = pressed currently with KOL-CE. May be worthy of an added comment in the source.

(note I am using the 2.80 download from SF from some time ago, not from SVN)

Thanks again for your great work!
Title: RE: Re: RE: Transparent controls
Post by: yuriy_sydorov on June 12, 2008, 02:55:19 pm
I fixed description of TOnBitBtnDraw handler.

Also I looked at double buffering and transparency code. Unfortunately this code can not be reused for wince due to OS behavior differences :( It is not possible to create general purpose transparency and double buffering support for standard controls in wince like in win32.

You can achieve transparency for your custom needs manually.
Read details here:
http://www.codeproject.com/KB/mobile/transparent_controls.aspx
Title: RE: Re: RE: Transparent controls
Post by: Chainfire on July 21, 2008, 05:26:31 pm
Yuri,

KOL application do not work right on 320x320 devices. Seems to be an infinite loop to do with SetWindowPos and the handling of the resulting messages, but I was unable to figure it out.

I have made a small test application, you can download at http://www.jongma.org/tmp/320x320-kol.rar. It has the container panel and two subpanels that are aligned bottom and top. I'm not 100% sure if these are required, but changing the alignment in the real application we are building with KOL seemed to move the error from one point in the code to another.

First people reported in about this problem because of the new Treo800w, which has a 320x320 display. I've tried on the Windows Mobile 6 "Square QVGA" emulator and indeed it gives problems. 240x240, 240x320, 480x640, all work fine, just not 320x320.

If you change the application to be resolution aware it does work, but of course then we'd have to modify our complete interface. I hope there is anything you can do to fix this! (We pretty much depend on the 240x320 compatibility mode)

Thanks
Title: RE: Re: RE: Transparent controls
Post by: Chainfire on July 21, 2008, 08:09:56 pm
Yuri,

After some more investigation, it seems like 240x320 compatibility mode mucks with sizes a bit here and there. As a result (I think)  WM_SIZE gets a slightly different value as response to SetWindowPos calls than was originally used in the SetWindowPos call itself. This creates in infinite loop of calls of SetBoundsRect, which loops back to itself, because:

Code: [Select]

   if RectsEqual( Value, Rect ) then Exit;


in SetBoundsRect is never satisfied.

I've adjusted the RectsEqual function as following:

Code: [Select]

//[FUNCTION RectsEqual]
{$IFDEF ASM_VERSION}
{$ELSE ASM_VERSION} //Pascal
function RectsEqual( const R1, R2: TRect ): Boolean;
begin
//  Result := CompareMem( @R1, @R2, Sizeof( TRect ) );

  Result :=
    (Abs(R1.Top - R2.Top) <= 1) AND
    (Abs(R1.Left - R2.Left) <= 1) AND
    (Abs(R1.Bottom - R2.Bottom) <= 1) AND
    (Abs(R1.Right - R2.Right) <= 1);
end;
{$ENDIF ASM_VERSION}
//[END RectsEqual]


This fixes the issue on the emulator, though it is ofcourse not an elegant solution (I will send it to someone with a Treo800w to see if it fixes the issue there too). Maybe a DEFINE should be used to turn this functionality on and off ?
Title: RE: Re: RE: Transparent controls
Post by: yuriy_sydorov on July 22, 2008, 06:45:18 pm
It should be fixed now. I hope I did not break alignment in some rare cases :)
Title: Re: RE: Re: RE: Transparent controls
Post by: Chainfire on July 23, 2008, 03:55:56 am
Quote from: "yury_sidorov"
It should be fixed now. I hope I did not break alignment in some rare cases :)


Nice. Could you tell me what you fixed exactly? I hate upgrading files that 'just work' right now ;)
Title: KOL-CE - compact applications for WinCE
Post by: yuriy_sydorov on July 23, 2008, 08:50:08 am
You can check svn logs and diffs at any time :)
Code: [Select]
* Optimized control alignment code. Alignment is faster now. Also it fixes problems when program is run in compatibility mode on devices with square QVGA screen (320x320).

Due to optimized logic alignment is not looped as before.
Title: KOL-CE - compact applications for WinCE
Post by: Chainfire on September 03, 2008, 12:32:25 am
More trouble here, yury.

If you create a main menu with many items and submenus and again items, then you change all their captions, a fair number of times the entire menu will get screwed up. Submenu's will be under a different submenu, or in the main menu list itself, etc.

Been scratching my head at this one for hours. I can make you a test app, though it's pretty easy to reproduce.
Title: KOL-CE - compact applications for WinCE
Post by: yuriy_sydorov on September 03, 2008, 10:58:11 am
Yes. Please e-mail me a test app.
Title: KOL-CE - compact applications for WinCE
Post by: Chainfire on September 09, 2008, 04:59:56 pm
Heh sorry, I solved my problem another way (fairly big workaround, though). I'll still be making that test app though :)
Title: RE: Re: Cannot install
Post by: josD on September 18, 2008, 03:04:25 pm
When I drop a Tsqlite3dataset on the form in a Kolwince its add  16.000Kb to then footprint...
And not the "300-500KB" a read about on this forum...
Apparently  the Tsqlite3dataset component the work fine on the emulator.

When I reinstall the component for WinCE the compiler give me the following error:
"propedits.pp(22,54) Fatal: Can't find unit PropEdits used by registersqlite3"
If I add the followin path to the other units path, it seems to compile..

"-$(LazarusDir)\lcl\interfaces\$(TargetOS)\;-$(LazarusDir)\ideintf\"

Mis I something ?  Glad white anny help :-)

Groetjes,
Jos.
Title: RE: Re: Cannot install
Post by: yuriy_sydorov on September 18, 2008, 03:45:09 pm
Do not drop database components to a form.
I recommend to create Tsqlite3dataset using code and set all needed properties via code.
Title: KOL-CE - compact applications for WinCE
Post by: Chainfire on September 18, 2008, 05:49:04 pm
Yuri another issue for your information including fix:

I was seeing all kind of weird stuff while using TKOLThread, so decided to try out my own thread routines, etc, issues still there.

After some conversation with some fpc compiler guys, turned out you must use FreePascal BeginThread (and EndThread) instead of WinAPI CreateThread (and ExitThread). I tried this in my own code and it solved these weird issues. Looking at the version of KOL I have, it also uses CreateThread instead of BeginThread.

Even setting IsMultiThread to true as KOL does, does not really put the memory manager into multithreaded mode, which BeginThread does do. This results in everytime you try to allocate or free memory in a thread there's a possibility of the thread throwing and thus terminating the application (which is why the crashes and exits seemed random and difficult to reproduce).
Title: KOL-CE - compact applications for WinCE
Post by: yuriy_sydorov on September 21, 2008, 01:34:30 pm
Memory manager is not a problem here, since fpc on wince have custom memory manager which is simple wrapper over wince C runtime memory manager. It is multithreaded by default.

Threadvars can cause problems. I'll fix KOL to use BeginThread and EndThread.
Title: KOL-CE - compact applications for WinCE
Post by: vice on September 25, 2008, 12:18:27 am
I get the next error when I try to add a new form:

Cli_2.inc(6,11) Error: Identifier not found "NewForm2"

Why?

My files:

Unit1

Code: [Select]

{ KOL MCK } // Do not remove this line!
{$DEFINE KOL_MCK}
{$ifdef FPC} {$mode delphi} {$endif}
unit Unit1;

interface

uses Windows, Messages, KOL {place your units here->}
{$IFDEF LAZIDE_MCK}, Forms, mirror, Classes, Controls, mckCtrls, mckObjs, Graphics;
{$ELSE} ; {$ENDIF}

type

  { TForm1 }

  {$I MCKfakeClasses.inc}
  {$IFDEF KOLCLASSES} TForm1 = class; PForm1 = TForm1; {$ELSE OBJECTS} PForm1 = ^TForm1; {$ENDIF CLASSES/OBJECTS}
  TForm1 = {$IFDEF KOLCLASSES}class{$ELSE}object{$ENDIF}({$IFDEF LAZIDE_MCK}TForm{$ELSE}TObj{$ENDIF})
    Form: PControl;
    KOLApplet1: TKOLApplet;
    KOLForm1: TKOLForm;
    KOLProject1: TKOLProject;
  private
    { private declarations }
  public
    { public declarations }
  end;

var
  Form1 {$IFDEF KOL_MCK} : PForm1 {$ELSE} : TForm1 {$ENDIF} ;

{$IFDEF KOL_MCK}
procedure NewForm1( var Result: PForm1; AParent: PControl );
{$ENDIF}

implementation

{$IFDEF KOL_MCK}
{$I unit1_1.inc}
{$ENDIF}

initialization
{$IFNDEF KOL_MCK} {$I unit1.lrs} {$ENDIF}

end.


Unit2

Code: [Select]

{ KOL MCK } // Do not remove this line!
{$ifdef FPC} {$mode delphi} {$endif}
unit Unit2;

interface

uses Windows, Messages, KOL, {place your units here->} LResources
{$IFDEF LAZIDE_MCK}, Forms, mirror, Classes, Controls, mckCtrls, mckObjs, Graphics;
{$ELSE} ; {$ENDIF}

type

  { TForm2 }

  {$I MCKfakeClasses.inc}
  {$IFDEF KOLCLASSES} TForm2 = class; PForm2 = TForm2; {$ELSE OBJECTS} PForm2 = ^TForm2; {$ENDIF CLASSES/OBJECTS}
  TForm2 = {$IFDEF KOLCLASSES}class{$ELSE}object{$ENDIF}({$IFDEF LAZIDE_MCK}TForm{$ELSE}TObj{$ENDIF})
    Form: PControl;
    KOLForm1: TKOLForm;
  private
    { private declarations }
  public
    { public declarations }
  end;

var
  Form2 {$IFDEF KOL_MCK} : PForm2 {$ELSE} : TForm2 {$ENDIF} ;

{$IFDEF KOL_MCK}
procedure NewForm2( var Result: PForm2; AParent: PControl );
{$ENDIF}

implementation

{$IFDEF KOL_MCK}
{$I unit2_1.inc}
{$ENDIF}

initialization
{$IFNDEF KOL_MCK} {$I unit2.lrs} {$ENDIF}

end.


Cli

Code: [Select]

{ KOL MCK } // Do not remove this line!
{$DEFINE KOL_MCK}
{$ifdef FPC} {$mode delphi} {$endif}
program Cli;

uses
  KOL,
  Unit1, Unit2;

begin // PROGRAM START HERE -- Please do not remove this comment

{$IFNDEF LAZIDE_MCK} {$I Cli_0.inc} {$ELSE}

  Application.Initialize;
  Application.CreateForm(TForm1, Form1);
  Application.CreateForm(TForm2, Form2);
  Application.Run;

{$ENDIF}

end.


Cli_2.inc

Code: [Select]

{ KOL MCK } // Do not remove this line!
{ Cli_2.inc
  Do not modify this file manually - it is generated automatically. }

  NewForm1( Form1, Pointer( Applet ) );
  NewForm2( Form2, Pointer( Applet ) );


Best regards.
Title: KOL-CE - compact applications for WinCE
Post by: yuriy_sydorov on September 25, 2008, 10:12:12 am
You do not have
Code: [Select]
{$DEFINE KOL_MCK}
in Unit2 for some unknown reason.
Title: KOL-CE - compact applications for WinCE
Post by: vice on September 25, 2008, 11:11:46 am
Now my project run.

Thanks!
Title: KOL-CE - compact applications for WinCE
Post by: vice on September 25, 2008, 11:27:01 am
I want to create a form in run-time. I follow this steps:

Quote

Run-time form creation

It is possible to create several instances of the same form at run-time. And at least, it is possible to make form not AutoCreate, and create it programmatically when needed. Use global function NewForm1 (replacing Form1 with your mirror form name), for instance:

Code: [Select]
TempForm1 := NewForm1( Applet );

To make this possible, NEVER access global variable created in the unit during conversation, unless You know why You are doing so. Refer to Form variable instead.


This is my code:

unit1.pas

Code: [Select]

...
implementation

uses Unit2;

procedure TForm1.N1Menu(Sender: PMenu; Item: Integer);
var
 Modal: TForm2;
begin
 Modal := NewForm2( Applet );
 try
  Modal.Form.ShowModal;
 finally
  Modal.Form.Free;
 end;
end;


but I get then next error message: Unit1.pas(59,28) Error: Wrong number of parameters specified for call to "NewForm2"

Why?

Regards.
Title: KOL-CE - compact applications for WinCE
Post by: yuriy_sydorov on September 25, 2008, 12:29:39 pm
The correct code is:
Code: [Select]
NewForm1( TempForm1, Applet );
I corrected wiki page.
Title: KOL-CE - compact applications for WinCE
Post by: vice on September 25, 2008, 12:35:59 pm
Which is the type of TempForm1?

Which is the correct way?
Code: [Select]

NewForm1( TempForm1, Applet );


or

Code: [Select]
<Something> := NewForm1( TempForm1, Applet );

Thanks
Title: KOL-CE - compact applications for WinCE
Post by: yuriy_sydorov on September 25, 2008, 01:06:32 pm
The correct code in your case is:

Code: [Select]
procedure TForm1.N1Menu(Sender: PMenu; Item: Integer);
var
 Modal: PForm2;
begin
 NewForm2( Modal, Applet );
 try
  Modal.Form.ShowModal;
 finally
  Modal.Form.Free;
 end;
end;
Title: KOL-CE - compact applications for WinCE
Post by: vice on September 25, 2008, 01:23:26 pm
My application is bad when I add a secondary form.

Why?

This is my code:

Cli.lpr

Code: [Select]

{ KOL MCK } // Do not remove this line!
{$DEFINE KOL_MCK}
{$ifdef FPC} {$mode delphi} {$endif}
program Cli;

uses
  KOL,
  Unit1, Unit2;

begin // PROGRAM START HERE -- Please do not remove this comment

{$IFNDEF LAZIDE_MCK} {$I Cli_0.inc} {$ELSE}

  Application.Initialize;
  Application.CreateForm(TForm1, Form1);
  Application.Run;

{$ENDIF}

end.


Unit1.pas

Code: [Select]

{ KOL MCK } // Do not remove this line!
{$DEFINE KOL_MCK}
{$ifdef FPC} {$mode delphi} {$endif}
unit Unit1;

interface

uses Windows, Messages, KOL {place your units here->}
{$IFDEF LAZIDE_MCK}, Forms, mirror, Classes, Controls, mckCtrls, mckObjs, Graphics;
{$ELSE} ; {$ENDIF}

type

  { TForm1 }

  {$I MCKfakeClasses.inc}
  {$IFDEF KOLCLASSES} TForm1 = class; PForm1 = TForm1; {$ELSE OBJECTS} PForm1 = ^TForm1; {$ENDIF CLASSES/OBJECTS}
  TForm1 = {$IFDEF KOLCLASSES}class{$ELSE}object{$ENDIF}({$IFDEF LAZIDE_MCK}TForm{$ELSE}TObj{$ENDIF})
    Button1: TKOLButton;
    Button2: TKOLButton;
    Form: PControl;
    KOLApplet1: TKOLApplet;
    KOLForm1: TKOLForm;
    KOLProject1: TKOLProject;
    MainMenu1: TKOLMainMenu;
    procedure N1Menu(Sender: PMenu; Item: Integer);
  private
    { private declarations }
  public
    { public declarations }
  end;

var
  Form1 {$IFDEF KOL_MCK} : PForm1 {$ELSE} : TForm1 {$ENDIF} ;

{$IFDEF KOL_MCK}
procedure NewForm1( var Result: PForm1; AParent: PControl );
{$ENDIF}

implementation

uses Unit2;

{$IFDEF KOL_MCK}
{$I unit1_1.inc}
{$ENDIF}

{ TForm1 }

procedure TForm1.N1Menu(Sender: PMenu; Item: Integer);
var
 Modal: PForm2;
begin
 NewForm2( Modal, Applet );
 try
  Modal.Form.ShowModal;
 finally
  Modal.Form.Free;
 end;
end;

initialization
{$IFNDEF KOL_MCK} {$I unit1.lrs} {$ENDIF}

end.


Unit2.pas

Code: [Select]

{ KOL MCK } // Do not remove this line!
{$DEFINE KOL_MCK}
{$ifdef FPC} {$mode delphi} {$endif}
unit Unit2;

interface

uses Windows, Messages, KOL {place your units here->}
{$IFDEF LAZIDE_MCK}, Forms, mirror, Classes, Controls, mckCtrls, mckObjs, Graphics;
{$ELSE} ; {$ENDIF}

type

  { TForm2 }

  {$I MCKfakeClasses.inc}
  {$IFDEF KOLCLASSES} TForm2 = class; PForm2 = TForm2; {$ELSE OBJECTS} PForm2 = ^TForm2; {$ENDIF CLASSES/OBJECTS}
  TForm2 = {$IFDEF KOLCLASSES}class{$ELSE}object{$ENDIF}({$IFDEF LAZIDE_MCK}TForm{$ELSE}TObj{$ENDIF})
    Button1: TKOLButton;
    Form: PControl;
    KOLForm1: TKOLForm;
    procedure Button1Click(Sender: PObj);
  private
    { private declarations }
  public
    { public declarations }
  end;

var
  Form2 {$IFDEF KOL_MCK} : PForm2 {$ELSE} : TForm2 {$ENDIF} ;

{$IFDEF KOL_MCK}
procedure NewForm2( var Result: PForm2; AParent: PControl );
{$ENDIF}

implementation

{$IFDEF KOL_MCK}
{$I unit2_1.inc}
{$ENDIF}

{ TForm2 }

procedure TForm2.Button1Click(Sender: PObj);
begin
  Form.Close;
end;

initialization
{$IFNDEF KOL_MCK} {$I unit2.lrs} {$ENDIF}

end.
Title: KOL-CE - compact applications for WinCE
Post by: yuriy_sydorov on September 25, 2008, 02:15:40 pm
Did you remove form2 from autocreation list?
Did you set defaultSize and defaultPosition properties to True for form2?
Title: KOL-CE - compact applications for WinCE
Post by: vice on September 25, 2008, 02:42:11 pm
Quote from: "yury_sidorov"
Did you remove form2 from autocreation list?


Yes

Quote from: "yury_sidorov"
Did you set defaultSize and defaultPosition properties to True for form2?


No. That was the problem, thanks.
Title: KOL-CE - compact applications for WinCE
Post by: vice on September 25, 2008, 03:49:58 pm
Whithout KOL-CE componentes I normally use a TDataModule and I access to its properties, methods and attributes by means of the DataModule1 variable.

Which is the correct way to use a TKOLDataModule?

Best regards.
Title: KOL-CE - compact applications for WinCE
Post by: vice on September 26, 2008, 01:37:16 am
If I put a lNet component onto KOL-CE application I get the run-time error: Project raised exception class 'External: SIGSEGV'.

Why?
Title: Re: RE: Events lost when transferring sources to other PC
Post by: Legolas on September 30, 2008, 01:24:40 pm
Quote from: "yury_sidorov"
If you are using Lazarus 0.9.25 or later you need to rebuld Lazarus with DisableFakeMethods defined before installing MCK package.

To do that:

   1. Run Lazarus.
   2. Choose Tools > Configure "Build Lazarus"... menu item.
   3. Choose Clean Up + Build all on Quick Build Options page.
   4. Open Advanced Build Options page and add -dDisableFakeMethods into Options input field.
   5. Click Build button to rebuild Lazarus.


Although I have followed these steps, I can't get events working at design time. However, adding events on form create, they are fired :?:


EDIT
The patch provided here (http://bugs.freepascal.org/view.php?id=12248) solves the problem after a Lazarus rebuild
Title: lNet: I can´t assign callbacks
Post by: vice on December 09, 2008, 10:20:12 pm
I can´t assign callbacks in the unit DataModule.pas, I get the error: datamodule.pas(48,28) Error: Variable identifier expected

The problem is in the KOLForm3BeforeCreateWindow method of the datamodule unit.

This is my code:

Code: [Select]
{ KOL MCK } // Do not remove this line!
{$DEFINE KOL_MCK}
{$ifdef FPC} {$mode delphi} {$endif}
unit DataModule;

interface

uses Windows, Messages, KOL {place your units here->}, lNet
{$IFDEF LAZIDE_MCK}, Forms, mirror, Classes, Controls, mckCtrls, mckObjs, Graphics;
{$ELSE} ; {$ENDIF}

type
  { TForm3 }
  {$I MCKfakeClasses.inc}
  {$IFDEF KOLCLASSES} TForm3 = class; PForm3 = TForm3; {$ELSE OBJECTS} PForm3 = ^TForm3; {$ENDIF CLASSES/OBJECTS}
  TForm3 = {$IFDEF KOLCLASSES}class{$ELSE}object{$ENDIF}({$IFDEF LAZIDE_MCK}TForm{$ELSE}TObj{$ENDIF})
    Form: PControl;
    KOLForm3: TKOLForm;
    procedure KOLForm3BeforeCreateWindow(Sender: PObj);
    procedure OnDs(aSocket: TLSocket);
    procedure OnRe(aSocket: TLSocket);
    procedure OnEr(const msg: string; aSocket: TLSocket);
  private
    { private declarations }
  public
    { public declarations }
    Conexion: TLTcp;
  end;

var
  Form3 {$IFDEF KOL_MCK} : PForm3 {$ELSE} : TForm3 {$ENDIF} ;

{$IFDEF KOL_MCK}
procedure NewForm3( var Result: PForm3; AParent: PControl );
{$ENDIF}

implementation

{$IFDEF KOL_MCK}
{$I datamodule_1.inc}
{$ENDIF}

{ TForm3 }

procedure TForm3.KOLForm3BeforeCreateWindow(Sender: PObj);
begin
  Conexion := TLTCP.Create(nil); // create new TCP connection with no parent component
  Conexion.OnError := @OnEr; // assign callbacks
  Conexion.OnReceive := @OnRe;
  Conexion.OnDisconnect := @OnDs;
  Conexion.Timeout := 100; // responsive enough, but won't hog cpu
  ShowMessage('Componente para la conexión creado');
end;

procedure TForm3.OnDs(aSocket: TLSocket);
begin
  ShowMessage('Lost connection');
end;

procedure TForm3.OnRe(aSocket: TLSocket);
var
  s: string;
begin
  if aSocket.GetMessage(s) > 0 then
    ShowMessage(s);
end;

procedure TForm3.OnEr(const msg: string; aSocket: TLSocket);
begin
  ShowMessage(msg); // if error occured, write it
end;

initialization
{$IFNDEF KOL_MCK} {$I datamodule.lrs} {$ENDIF}

end.


The solution:

Delphi mode is used for MCK generated source files.

Assign event without @

Conexion.OnError := OnEr;
Title: KOL and VGA support
Post by: jabu on December 16, 2008, 07:54:55 pm
Hello Yury,

do you have any news on VGA support on KOL-CE that you mention on 12th Nov?

regards

jabu
Title: Re: KOL-CE - compact applications for WinCE
Post by: alepio on January 03, 2009, 11:24:06 am
Sorry,
It don't work.
This is my error:
Quote
Compiling resource C:\Documents and Settings\lisa\Documenti\_LAZARUS\kol-ce-2.80.2\KOL-CE\kol\KOL-CE.rc
C:\lazarus\fpc\2.2.2\bin\i386-win32\arm-wince-windres.exe: no resources
C:\Documents and Settings\lisa\Documenti\_LAZARUS\kol-ce-2.80.2\KOL-CE\kol\KOL.PAS(57970) Error: Error while linking
C:\Documents and Settings\lisa\Documenti\_LAZARUS\kol-ce-2.80.2\KOL-CE\kol\KOL.PAS(57970) Fatal: There were 1 errors compiling module, stopping
I read all Documentation and add this PATH in the Env. System.
Quote
c:\lazarus\fpc\2.2.2\source\;c:\lazarus\fpc\;C:\lazarus\fpc\2.2.2\bin\i386-win32\;C:\Documents and Settings\lisa\Documenti\_LAZARUS\kol-ce-2.80.2\KOL-CE\kol;C:\Documents and Settings\lisa\Documenti\_LAZARUS\kol-ce-2.80.2\KOL-CE\mck;C:\Documents and Settings\lisa\Documenti\_LAZARUS\kol-ce-2.80.2\KOL-CE\mck\lib\i386-win32;C:\Documents and Settings\lisa\Documenti\_LAZARUS\kol-ce-2.80.2\KOL-CE\mck\lib\arm-wince;C:\Documents and Settings\lisa\Documenti\_LAZARUS\kol-ce-2.80.2\KOL-CE\kol

someone can help me?
Title: Re: KOL-CE - compact applications for WinCE
Post by: Legolas on January 03, 2009, 08:17:38 pm
Sorry,
It don't work.
This is my error:
Quote
Compiling resource C:\Documents and Settings\lisa\Documenti\_LAZARUS\kol-ce-2.80.2\KOL-CE\kol\KOL-CE.rc
C:\lazarus\fpc\2.2.2\bin\i386-win32\arm-wince-windres.exe: no resources
C:\Documents and Settings\lisa\Documenti\_LAZARUS\kol-ce-2.80.2\KOL-CE\kol\KOL.PAS(57970) Error: Error while linking
C:\Documents and Settings\lisa\Documenti\_LAZARUS\kol-ce-2.80.2\KOL-CE\kol\KOL.PAS(57970) Fatal: There were 1 errors compiling module, stopping
I read all Documentation and add this PATH in the Env. System.
Quote
c:\lazarus\fpc\2.2.2\source\;c:\lazarus\fpc\;C:\lazarus\fpc\2.2.2\bin\i386-win32\;C:\Documents and Settings\lisa\Documenti\_LAZARUS\kol-ce-2.80.2\KOL-CE\kol;C:\Documents and Settings\lisa\Documenti\_LAZARUS\kol-ce-2.80.2\KOL-CE\mck;C:\Documents and Settings\lisa\Documenti\_LAZARUS\kol-ce-2.80.2\KOL-CE\mck\lib\i386-win32;C:\Documents and Settings\lisa\Documenti\_LAZARUS\kol-ce-2.80.2\KOL-CE\mck\lib\arm-wince;C:\Documents and Settings\lisa\Documenti\_LAZARUS\kol-ce-2.80.2\KOL-CE\kol

someone can help me?

You have installed kol-ce in a folder with spaces ("C:\Documents and Settings\lisa\Documenti\_LAZARUS\kol-ce-2.80.2\"). Try to put all kol-ce stuff in a folder without spaces.
Title: Re: KOL-CE - compact applications for WinCE
Post by: alepio on January 06, 2009, 10:53:13 am
Now Work.
Thank you
Title: Re: KOL-CE - compact applications for WinCE
Post by: chrgra on January 18, 2009, 03:25:28 pm
I thought I understand Kolce, but when I use  2.80.2

I make a new application but the onshow event of kolform is nog fired.
Other events like onbutton click does work.

Lazarus 9.2.7 fpc 2.2.3

I added also an example in test2.zip
Title: Re: KOL-CE - compact applications for WinCE
Post by: Dibo on January 19, 2009, 10:36:01 am
My exe with empty form have 180kB. Why? Strip.exe doesn't help.
Title: Re: KOL-CE - compact applications for WinCE
Post by: oranke on January 28, 2009, 04:19:25 pm
......
I make a new application but the onshow event of kolform is nog fired.
Other events like onbutton click does work.
......

I have same problem. So I forced "Form.Show" on "OnFormCreate" event:


procedure TForm1.KOLForm1FormCreate(Sender: PObj);
begin
  Form.Visible := false;
  Form.CreateWindow;
  Form.Show;
end;


and It works fine~ :)
Title: Re: KOL-CE - compact applications for WinCE
Post by: yuriy_sydorov on January 30, 2009, 04:17:38 pm
I make a new application but the onshow event of kolform is nog fired.
Other events like onbutton click does work.

Please report bugs on KOL-CE project page on sourceforge: http://sourceforge.net/projects/kol-ce
TinyPortal © 2005-2018