Recent

Author Topic: [solved] Lazarus/FPC compiled behaviour giving me heaps of grief!  (Read 3539 times)

AlistairG

  • Jr. Member
  • **
  • Posts: 70
Hi for a while now I have been battling with clipboard and image performance.
For example there is no way I can get access to the clipboard when something is pasted to it eg there is no cf_text property shown and graphics problems as well, reported elsewhere on this forum.
Today i finally tweaked when assign to a timage :
image1.picture:=nil; // the image remained!
Also if I select some text and copy it the following never gets set:
if clipboard.HasFormat(CF_TEXT) then  

Compiler compiles quite happily, but the resultant does not behave at all.
I suspected install of Lazarus, but after removing (in Ubuntu/Linux) and install again, no difference in bad performing program.

Lazarus 0.9.28.2-10ubuntu1 r22277 FPC 2.4.0 i386-linux-gtk 2 (beta)

Any suggestions as there are no error messages from compiler and to all intense purposes it looks like its doing the job as expected.
Alistair


« Last Edit: March 09, 2011, 08:07:51 am by Alistair George/Laz 2.4 »
Lazarus 0.9.28.2-10ubuntu1 r22277 FPC 2.4.0 i386-linux-gtk 2 (beta)
       My pledge - if I waste your time, I donate to Lazarus.

AlistairG

  • Jr. Member
  • **
  • Posts: 70
Re: [solved] Lazarus/FPC compiled behaviour giving me heaps of grief!
« Reply #1 on: March 09, 2011, 08:10:48 am »
Problem with clipboard was that I had insufficient documentation and did not realise that
clipboard.open //gives exclusive use of the clipboard to your application.

My app used this function on every use of clipboard. Once clipboard.open and close were removed, the clipboard started behaving as it should!

As for the timage problem I am not sure, as timage.picture:=nil; should clear the bitmap

Cheers,
Alistair
Lazarus 0.9.28.2-10ubuntu1 r22277 FPC 2.4.0 i386-linux-gtk 2 (beta)
       My pledge - if I waste your time, I donate to Lazarus.

 

TinyPortal © 2005-2018