* * *

Recent Posts

Pages: [1] 2 3 ... 10
1
Graphics / Re: BGRABitmap Thread Problem in Android
« Last post by mercury on Today at 02:16:40 pm »
I think I cannot help you any further unfortunately.
It’s ok. Thanks anyway.
2
Other / Re: Working with Microseconds
« Last post by enko on Today at 02:08:17 pm »
Thaddy
can you tell me what I must to do to upgrade FPC e Lazarus IDE to lastest release for RaspBerry ??
Thanks a lot for your patience.
3
Something is wrong with the source editor drawing on gtk2/opensuse.
May be a GTK2 version dependent problem in Suse. It uses the QT based KDE. I guess your editor starts to work when you compile the IDE for QT.
4
I tried lazarus 18 rc4 on linux mint using the amd64 deb files provided on sourceforge, the property editor doesn't work. I can't set any properties and the existing properties are not shown.

This happens with and without anchordockingdsgn Everything worked well in rc3,
https://image.ibb.co/neXkbk/Screenshot_from_2017_08_19_14_57_11.png
5
Other / Re: Working with Microseconds
« Last post by Eugene Loza on Today at 01:48:31 pm »
You may do it this way (don't mix records with pointers to records):
Code: Pascal  [Select]
  1. function GetTickCount: Int64;
  2. var
  3.   tv: TTimeval;
  4. begin
  5.   FpGettimeofday(@tv, nil);
  6.   Result := Int64(tv.tv_sec) * 1000000 + Int64(tv.tv_usec);
  7. end;
or
Code: Pascal  [Select]
  1. function GetTickCount: Int64;
  2. var
  3.   tv: PTimeval;
  4. begin
  5.   FpGettimeofday(tv, nil);
  6.   Result := Int64(tv^.tv_sec) * 1000000 + Int64(tv^.tv_usec);
  7. end;
Similar code works fine for me.
6
LCL / Re: CopyToClipboard not working for TEdit
« Last post by Bazzao on Today at 01:43:39 pm »
Now here is some evidence ...

Originally I had the Memo as a variable under Private (Form), and the CopyToClipboard did not work.

Thinking it was my coding, I added a Memo to the form and duplicated the code so the new Memo would receive data (it is used for concatenation).

CopyToClipboard then worked.  ;D

So I deleted the original variable, hid the new Memo, and placed it down the Z order.

CopyToClipboard then failed.  >:(

At that point I found the solution in this thread.

After posting my previous reply, I commented out the solution, I made the Memo visible again, and the CopyToClipboard then worked. Weird.

Violent coding does not work and neither does hiding things.  :-\

B
7
LCL / Re: CopyToClipboard not working for TEdit
« Last post by Thaddy on Today at 01:39:35 pm »
It does not work the first time indeed, it works the second time, though. That's a bug. Tested arm-linux Raspbian-jessie
Under Windows works as expected.

Yes I know, but not under linux -gtk 2.
8
Other / Re: Working with Microseconds
« Last post by enko on Today at 01:35:45 pm »
It seems I have an old version ...

pi@raspberrypi:~ $ fpc
Free Pascal Compiler version 2.6.4+dfsg-4+rpi1 [2014/10/21] for arm
9
Other / Re: Working with Microseconds
« Last post by Thaddy on Today at 01:12:20 pm »
Also
Code: Pascal  [Select]
  1. uses sysutils;
  2. begin
  3. writeln(GetTickCount64);
  4. end.
  5.  

On compiling I have Error: Identifier not found "GetTickCount64"

That's very very strange because I wrote the example (and this reply!) from a Raspberry Pi 3. Are you sure you are not using an old version? Did you upgrade to Stretch already? (That has FPC 3.0.0)..
That should not be necessary, but at least 3 is still a supported version:
Code: [Select]
pi@raspberrypi:~/fpcdemos $ fpc -CX -XXs counter.pas
Free Pascal Compiler version 3.1.1-r36940 [2017/08/18] for arm
Copyright (c) 1993-2017 by Florian Klaempfl and others
Target OS: Linux for ARMHF
Compiling counter.pas
Linking counter
7 lines compiled, 0.9 sec
pi@raspberrypi:~/fpcdemos $ ./counter
20724027

Anyway, your homebrew gettickkount is wrong, I am not going to debug that any further.

The standard implementation in sysutils looks like this:
Code: Pascal  [Select]
  1. function GetTickCount64: QWord;
  2. var
  3.   tp: TTimeVal;
  4.   {$IFDEF HAVECLOCKGETTIME}
  5.   ts: TTimeSpec;
  6.   {$ENDIF}
  7.  
  8. begin
  9.  {$IFDEF HAVECLOCKGETTIME}
  10.    if clock_gettime(CLOCK_MONOTONIC, @ts)=0 then
  11.      begin
  12.      Result := (Int64(ts.tv_sec) * 1000) + (ts.tv_nsec div 1000000);
  13.      exit;
  14.      end;
  15.  {$ENDIF}
  16.   fpgettimeofday(@tp, nil);
  17.   Result := (Int64(tp.tv_sec) * 1000) + (tp.tv_usec div 1000);  // look here!
  18. end;

Since RPi does have HAVECLOCKGETTIME that is the version that gets executed.
10
LCL / Re: CopyToClipboard not working for TEdit
« Last post by Bazzao on Today at 01:08:21 pm »
I had the same issue with a TMemo.  >:(

I tried Application.ProcessMessages while assembling the data in the Memo.

I tried CopyToClipboard twice in a row. Even a few more times in a row, in case I had to bash Memo into submission.

No luck, even with the violent coding.  >:D

Then I discovered the solution above, ("Clipboard.AsText:=MyEdit.Text;") and that worked.

B

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