* * *

Recent Posts

Pages: [1] 2 3 ... 10
1
LCL / Re: TValueListEditor - A Cell is cleared after sorting
« Last post by egsuh on Today at 04:59:17 am »
I applied valedit.sort.6.diff, but the problem still exists --- the FOCUSED cell content is not changed after sorting.  My application has no problem once I move away the focus from valuelisteditor before the sorting.

BTW,  please add some documentation on TValueLsitEditor.InsertRow method^^. I cannot find it anywhere.
2
Thank you!

Code: Pascal  [Select]
  1. //Laz\fpc\3.0.4\source\packages\rtl-console\src\unix\crt.pp
  2. Initialization
  3. ...
  4.    { Get current X,Y if not set already }
  5.      GetXY(CurrX,CurrY);
  6.      if (CurrX=0) then
  7.       begin
  8.         CurrX:=1;
  9.         CurrY:=1;
  10.         ttySendStr(#27'[H');
  11.       end;
  12.    {Reset Attribute (TextAttr=7 at startup)}
  13.       ttySendStr(#27'[m');
  14. ..

Code: Pascal  [Select]
  1. //Laz\fpc\3.0.4\source\packages\rtl-console\src\unix\crt.pp
  2. procedure GetXY(var x,y:byte);
  3. ...
  4.   s:=#27'[6n';
  5.   fpWrite(0,s[1],length(s));
  6. ..

Edit:
ESC 0 J: clear from cursor to end of the screen.
ESC 1 J: clear from cursor to beginning of the screen.
ESC 2 J: clear entire screen.

Source.
3
However - try looking up the TDBstringGrid in it. When you have failed at that, just give up and look up 'grid'. I got 2 hits in the whole 3700+ pages, neither of them relevant or helpful.

Have you seen the following?

http://wiki.freepascal.org/TDBGrid
http://wiki.freepascal.org/Grids_Reference_Page#Differences_between_Lazarus_and_Delphi_grids


4
General / Re: can 2 event handlers be running simultaneously?
« Last post by PaulRowntree on Today at 04:06:18 am »
If you use only the client and do not override the DefaultIPCClientClass, then in Windows TSimpleIPCClient uses windows messages - so only one thread works. So you can be confident.
Thanks ASerge.  Actually, I was hoping to bundle a Client and a Server (ie put them in a wrapper, not subclassed) to make a bidirectional link.  The Client would be called by 'regular' routines, as a result of some action such as a button event or a timer event.  On the receiving end (the server), I wanted to install handlers that would get called when the server was polled to see if anything was in the pipe.
Does this start to shake my confidence?
5
General / Re: Useful Oxygene Features for FPC?
« Last post by lucamar on Today at 03:52:34 am »
IIRC TP3 did not do inline asm the way it is done in lazarus. One did the declaration and then included an object file (asm source assembled to .o(bj) with the TASM assembler) with $L.

Nope! TP3 did *inline* "assembler" this  way:
Code: Pascal  [Select]
  1. { XMODEM-CRC calculation by Scott Murphy }
  2. procedure updcrc(a : byte);
  3. begin
  4.    inline( $8A/$46/$04/        {MOV     AL,[BP+04]}
  5.            $8B/$1E/crcval/     {MOV     BX,crcval}
  6.            $B9/$08/$00/        {MOV     CX,0008}
  7. {loop0}    $D0/$E0/            {SHL     AL,1}
  8.            $D1/$D3/            {RCL     BX,1}
  9.            $73/$04/            {JNC     loop1}
  10.            $81/$F3/$21/$10/    {XOR     BX,$1021}
  11. {loop1}    $E2/$F4/            {LOOP    loop0}
  12.            $89/$1E/crcval)     {MOV     crcval,BX}
  13. end;
  14.  

It was TP4 which introduced $L and .obj linking. The internal assembler, asm and the assembler directive weren't introduced until TP6 or 7. There were then units and programs which were more assembler with a Pascal veneer than Pascal proper  :D
6
General / Re: If - Then - Else and Try - Except
« Last post by Odanka on Today at 03:44:30 am »
I'm happy to get some solution, opinion from all of you. Thank you very much. :)
7
General / Re: If - Then - Else and Try - Except
« Last post by Odanka on Today at 03:39:54 am »
Well, to my opinion it is NOT solved:
What is somevar? An integer? Then you should use 'div' instead of '/'.
Pascal is not C, although C has pretentions...

Thank You Thaddy, here somevar is Double
8
General / Re: can 2 event handlers be running simultaneously?
« Last post by ASerge on Today at 03:29:09 am »
If you use only the client and do not override the DefaultIPCClientClass, then in Windows TSimpleIPCClient uses windows messages - so only one thread works. So you can be confident.
9
Below is the code and the console output using Lazarus Terminal Output.

The bug already existed since first time I used Lazarus on Ubuntu. But because I think it wasn't critical and I do not write console program, I just ignore it. The result binaries will show correctly if I run them using the Terminal provided by Ubuntu.

Code: Pascal  [Select]
  1. program Project1;
  2.  
  3. uses
  4.   Crt;
  5.  
  6. begin
  7.   WriteLn('Hello');
  8.   WriteLn('World.');
  9.   ReadLn;
  10. end.
10
General / Re: Useful Oxygene Features for FPC?
« Last post by marcov on Today at 03:09:13 am »
440bx: good point with the variable declarations.

IIRC TP3 did not do inline asm the way it is done in lazarus. One did the declaration and then included an object file (asm source assembled to .o(bj) with the TASM assembler) with $L.  In that case there is no asm, and possibly the assembler directive signalled that option.

In newer TPs and Delphi this concept isn't used much.
Pages: [1] 2 3 ... 10

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus