Recent

Author Topic: Lazarus Release Candidate 3 for 2.0  (Read 103490 times)

soerensen3

  • Full Member
  • ***
  • Posts: 213
Re: Lazarus Release Candidate 3 for 2.0
« Reply #75 on: January 01, 2019, 09:05:44 pm »
I have  an issue in the Lazarus-IDE with DockMgrDsgn for a long time. When docking packages into a couple of tabs they are undocked again after restarting the IDE. This can be pretty annoying (especially in combination with hidden docker headers) when working with a lot of packages. I have seen an issue has been fixed related to anchordockmgr, that did not save tabbed pages.
https://bugs.freepascal.org/view.php?id=34727
I don't know if these two issues are related however the patch did not resolve the issue above.

I have installed the latest git version through fpcdeluxe:
Lazarus version: 2.1.0
Lazarus svn revision: 59960
Lazarus build date: 2019/01/01
Lazarus was compiled for x86_64-linux
Lazarus was compiled with fpc 3.3.1
Lazarus 1.9 with FPC 3.0.4
Target: Manjaro Linux 64 Bit (4.9.68-1-MANJARO)

BrunoK

  • Sr. Member
  • ****
  • Posts: 452
  • Retired programmer
Re: Lazarus Release Candidate 3 for 2.0
« Reply #76 on: January 03, 2019, 08:24:06 am »
1) The issue is still open (assigned). So no it has not yet been fixed.
Actualy MY version of lazarus solves 0034763 without me doing anything.

My current version of lazarus works since 5 months (July 2018 I think) with my own revisions. These revisions only apply to Windows and do not interferer with the other widgets sets.

If someone engage to TEST and scrutinize them , it is not enough to say the are stupid, I would try to recreate the patches matching my current version (the one I use ~4-6 hours a day on ~5 days a week).

I have reread my interventions in https://bugs.freepascal.org/view.php?id=33923 and I stand by what I analyzed and how things should be done.

Actually most of the changes made by the TEAM were reverted, as I said they should, and you have in the current trunk my original emergency patch. That does NOT solve issue 0034763.

PeterX

  • Sr. Member
  • ****
  • Posts: 404
Re: Lazarus Release Candidate 3 for 2.0
« Reply #77 on: January 04, 2019, 04:26:45 pm »
I added some components just to play around.

TExtendedTabControl throws exception on runtime:  EClassNotFound

Example project added.


I just installed 2.0 RC3 64bit, and there was no Lazarus installed on this PC before.

And installed the "lazarus-2.0.0RC3-fpc-3.0.4-cross-i386-win32-win64.exe"
« Last Edit: January 04, 2019, 04:50:50 pm by PeterX »
usually using latest Lazarus release version with Windows 10

kft

  • Newbie
  • Posts: 3
Re: Lazarus Release Candidate 3 for 2.0
« Reply #78 on: January 07, 2019, 01:13:02 pm »
Hi
If you place a dbgid or dbnavigator on a TPage Control tab, they only show in the selected tab.  If you place a Button or edit control on a tab, they show in all tabs.  This is a current problem for me, do I need to post it in another forum?

Secondly, old problem, if you develop on a machine with a second screen, if the graphical layout form is on the second screen for development, the compiled program will open at the same coordinates, which creates a problem if it is opened on a machine without a second screen.

Lastly some comment on Lazarus.  I developed most of a simple contact manager in a day, which is great.  The sad part is that most of my time was spent searching forums for workarounds to every type of non trivial statement that I used.  This means that the application could have been developed in less than half of that time, which is incredible.
Problems that I encountered included:
Sqlite varchar fields show up as '(memo)' in a dbgrid - half of the lines of code that I wrote were to remedy this!
Can't use '... where field = :VAR' for a sql query.
I think Lazarus has great potential as a RAD tool, but it needs to be consistent, intuitive and reasonably well documented in order to gain greater acceptance.

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: Lazarus Release Candidate 3 for 2.0
« Reply #79 on: January 07, 2019, 02:12:10 pm »
Secondly, old problem, if you develop on a machine with a second screen, if the graphical layout form is on the second screen for development, the compiled program will open at the same coordinates, which creates a problem if it is opened on a machine without a second screen.

That is as designed (and IMHO quite logical); just change the form Position to (almost) anything other than poDesigned or set the desired postion/size in the form's OnCreate event.
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

kft

  • Newbie
  • Posts: 3
Re: Lazarus Release Candidate 3 for 2.0
« Reply #80 on: January 07, 2019, 04:19:55 pm »
Thanks for that, I tested and found poDefault to be the best for my purposes.

dbannon

  • Hero Member
  • *****
  • Posts: 2778
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Lazarus Release Candidate 3 for 2.0
« Reply #81 on: January 08, 2019, 12:15:39 pm »
I note a problem with pasting images into at TImage on Linux at least. I'm away from home and unable to confirm Windows/mac but think it might be important ....

Superficially, this looks like things discussed on https://forum.lazarus.freepascal.org/index.php/topic,43750.0.html and now submitted as a bug in 1.8.4 etc. But in fact, its not similar at all, its a problem in RC3 / Fixes_2_0 that does not exist in 1.8.4

I believe RC3 is unable to paste an image into a TImage if the image was copied from another application. The attached demo (built on a demo from engkin) shows the problem, easy demo if you build one binary from RC3 and one from 1.8.4 and run each side by side.

Both versions will copy the Leopard into the clipboard and paste it into the timage on the right. However, only the 1.8.4 can do the paste if the copy was done elsewhere, ie the other demo app. Similarly, if you copy an image from a webpage.

The 'Info' button show what formats appear to be available - in the RC3 version, none if copy was from an app other than itself.

I cannot test this problem on Window, Mac or another linux box, so could someone else please test before you/me logs a bug report ?

Davo

Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

Bart

  • Hero Member
  • *****
  • Posts: 5265
    • Bart en Mariska's Webstek
Re: Lazarus Release Candidate 3 for 2.0
« Reply #82 on: January 08, 2019, 04:01:15 pm »
Lazarus trunk (Lazarus 2.1.0 r59932 FPC 3.0.4 i386-win32-win32/win64)

When I copy an image (running cheetah from freepascal.org) from Firefox I get:
Format=DataObject
Format=text/html
Format=HTML Format
Format=text/_moz_htmlinfo
Format=text/_moz_htmlcontext
Format=application/x-moz-file-promise-url
Format=application/x-moz-file-promise-dest-filename
Format=Preferred DropEffect
Format=application/x-moz-nativeimage
Format=image/bmp

------image/bmp------
(
Format=Ole Private Data
Format=image/bmp

------image/bmp------
(
End of format list, count=14
Image Format ID = 2

And then when I try to paste, I get an exception:
[Window Title]
project1

[Content]
Wrong image format.

Press OK to ignore and risk data corruption.
Press Abort to kill the program.

[OK] [Abort]

I get the same exception if I try to paste from IrfanView or MS Paint.

I can paste a screenshot from my desktop (made outside the test application) into the second TImage without problems though.

[Edit]
The exception goes away and the image pastes when I change the code:
Code: Pascal  [Select][+][-]
  1.     Fmt := clipboard.FindPictureFormatID;
  2.     if 0 = Fmt then     //  ret first picture format found
  3.         memo1.append('fmt = 0, nothing we can paste as image')
  4.     else begin
  5.          //Image2.Picture.Bitmap.assign(Clipboard);
  6.         Image2.Picture.LoadFromClipboardFormat(Fmt);

Bart
« Last Edit: January 08, 2019, 04:13:27 pm by Bart »

wp

  • Hero Member
  • *****
  • Posts: 11830
Re: Lazarus Release Candidate 3 for 2.0
« Reply #83 on: January 08, 2019, 05:03:57 pm »
I think the safest code to paste, to a TImage, a picture that was copied to the clipboard by other applications is this:

Code: Pascal  [Select][+][-]
  1. procedure TForm1.Button3Click(Sender: TObject);
  2. begin
  3.   if Clipboard.HasPictureFormat then begin
  4.      Image1.Picture.LoadFromClipboardFormat(Clipboard.FindPictureFormatID);
  5.   end;
  6. end;

This works for all formats registered within the LCL. Unfortunately TPicture.LoadFromClipboardFormat raises an exception if the provided format identifier is not an image format; therefore, the valididty of the format must be checked separately.

Maybe there should be an overloaded TPicture method without format parameter which does exactly the same, i.e.:
- Check whether the clipboard contains an image
- Call Clipboard.FindPictureFormatID
- Call LoadFromClipboardFormat
- Should be a function which returns false if the clipboard cannot be pasted to the picture.
« Last Edit: January 08, 2019, 05:07:53 pm by wp »

dbannon

  • Hero Member
  • *****
  • Posts: 2778
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Lazarus Release Candidate 3 for 2.0
« Reply #84 on: January 08, 2019, 11:31:57 pm »
Further to pasting image issue ....

I incorporated the ideas suggested by WP and (apparently required on windows) by Bart - my paste method now has -

Code: Pascal  [Select][+][-]
  1.     if not Clipboard.HasPictureFormat then
  2.     // if 0 = clipboard.FindPictureFormatID then     //  ret first picture format found
  3.         memo1.append('fmt = 0, nothing we can paste as image')
  4.     else begin
  5.          // Image2.Picture.Bitmap.assign(Clipboard);
  6.          Image2.Picture.LoadFromClipboardFormat(Clipboard.FindPictureFormatID);
  7.          memo1.append('pasted as FormatID ' + inttostr(clipboard.FindPictureFormatID));
  8.      end;

On my Ubuntu Linux 18.04 64bit, still fails to paste when image copied from another application. I cannot reproduce Bart's crash on windows right now but it sounds like a separate issue to me. (sounds a bit ugly too) I am not really surprised the issue I am banging on about is Linux only, the code that responds differently to an in app copy compared to an external app is mostly widget specific.

Any linux users playing ?

Davo


Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

jamie

  • Hero Member
  • *****
  • Posts: 6077
Re: Lazarus Release Candidate 3 for 2.0
« Reply #85 on: January 09, 2019, 12:01:52 am »
I am not really sure what it is you are trying to do here however, if you use the LoadfromClipboard
function it will fail if there isn't a supported format.

 This has been documented for a long time now starting in the days of Delphi....

 You need to use a TRY finally or On EInvalidGraphic exception...

 Or you first check the clipboard formats currently loaded....

 I don't know what else you expect …

 at some point you need to intervene with your own code to correct things.
The only true wisdom is knowing you know nothing

dbannon

  • Hero Member
  • *****
  • Posts: 2778
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Lazarus Release Candidate 3 for 2.0
« Reply #86 on: January 09, 2019, 03:23:39 am »
I am not really sure what it is you are trying to do here however, if you use the LoadfromClipboard
function it will fail if there isn't a supported format.

Indeed Jamie. I guess I have not been clear, the issue is that on RC3, there are no graphic formats available if copied from another app. I fully understand (and expect) a failure if you try and load a non existing format and discussion did wander into identifying the formats. But in RC3 (unlike 1.8.4) no graphic formats are available !

For example, a call to ClipBoard.SupportedFormats(List); will return an empty list. As long as you test before pasting you won't get a crash (good) but you cannot ever paste if there is (apparently) nothing there to paste (bad).

What I am trying to do is point out that RC3 does not work as 1.8.4 does and thats not what anyone wants.

As I am away from home at present, I cannot test on other platforms, thus a call for help. I'd hate to sit on this issue until 2.0 was released. Incidentally, its no direct interest to me, my app does not do images, its just something I noticed and saw a need to track down.

Davo
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

kft

  • Newbie
  • Posts: 3
Re: Lazarus Release Candidate 3 for 2.0
« Reply #87 on: January 09, 2019, 07:26:42 am »
I found what caused the bug with controls appearing on all tabs of a pagecontrol.  If you create the control on the main form, and then move it to the pagecontrol tab, it will appear on all tabs.

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Lazarus Release Candidate 3 for 2.0
« Reply #88 on: January 09, 2019, 10:25:28 am »
Bugs reported to bugtracker have much better chance to get fixed
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

wp

  • Hero Member
  • *****
  • Posts: 11830
Re: Lazarus Release Candidate 3 for 2.0
« Reply #89 on: January 09, 2019, 10:34:32 am »
Indeed Jamie. I guess I have not been clear, the issue is that on RC3, there are no graphic formats available if copied from another app. I fully understand (and expect) a failure if you try and load a non existing format and discussion did wander into identifying the formats. But in RC3 (unlike 1.8.4) no graphic formats are available !
I installed RC3 and 1.8.4 to a Linux VM and can confirm your observation. Please file a bug report. No developer will see this description in this monster thread.

 

TinyPortal © 2005-2018