Recent

Author Topic: KOL-CE - compact applications for WinCE  (Read 126379 times)

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
RE: Re: Cannot install
« Reply #60 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).

oraitecamonyes

  • New Member
  • *
  • Posts: 31
    • http://blog.ptvet.com
RE: Re: Cannot install
« Reply #61 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

JohnvdWaeter

  • Full Member
  • ***
  • Posts: 171
    • http://www.jvdw.nl
How to set cursor to something like crHourglass?
« Reply #62 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

yuriy_sydorov

  • Full Member
  • ***
  • Posts: 158
KOL-CE - compact applications for WinCE
« Reply #63 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));

JohnvdWaeter

  • Full Member
  • ***
  • Posts: 171
    • http://www.jvdw.nl
Error when jumping to event-code:
« Reply #64 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

JohnvdWaeter

  • Full Member
  • ***
  • Posts: 171
    • http://www.jvdw.nl
Setting Penwidth?
« Reply #65 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

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: Error when jumping to event-code:
« Reply #66 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.

JohnvdWaeter

  • Full Member
  • ***
  • Posts: 171
    • http://www.jvdw.nl
Re: Error when jumping to event-code:
« Reply #67 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.

yuriy_sydorov

  • Full Member
  • ***
  • Posts: 158
KOL-CE - compact applications for WinCE
« Reply #68 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.

Chainfire

  • New Member
  • *
  • Posts: 28
KOL-CE - compact applications for WinCE
« Reply #69 on: April 04, 2008, 08:15:21 am »
I may be completely overlooking this, but how do I use Unicode text with KOL components ?

yuriy_sydorov

  • Full Member
  • ***
  • Posts: 158
KOL-CE - compact applications for WinCE
« Reply #70 on: April 05, 2008, 10:24:55 pm »
KOL-CE uses KOLString type for strings. KOLString = widestring on wince.

Chainfire

  • New Member
  • *
  • Posts: 28
KOL-CE - compact applications for WinCE
« Reply #71 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.

JohnvdWaeter

  • Full Member
  • ***
  • Posts: 171
    • http://www.jvdw.nl
Changing captions at runtime?
« Reply #72 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

yuriy_sydorov

  • Full Member
  • ***
  • Posts: 158
KOL-CE - compact applications for WinCE
« Reply #73 on: April 20, 2008, 01:32:54 am »
Try this:
Code: [Select]
TabControl1.TC_Pages[0].Caption:='test';

Chainfire

  • New Member
  • *
  • Posts: 28
KOL-CE - compact applications for WinCE
« Reply #74 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 ?

 

TinyPortal © 2005-2018