[Lazarus] Trying to install Lazarus with fpc setup for debugging its libraries.

2018-06-01 Thread Donald Ziesig via Lazarus
I needed to compile fpc and the rtl and fpl libraries for debugging so I 
downloaded the sources from SourceForge.


I built fpc from the sources (with -gl flag for debugging - it runs) 
using the instructions in (modified for 3.0.4):

*http://wiki.freepascal.org/Installing_Lazarus#Installing_Free_Pascal_from_source_under_Linux.2FBSD*

which fpc
*fpc is /usr/local/bin/fpc**
**fpc is /usr/bin/fpc**
*

I can't install Lazarus from either:

ll lazarus*
*-rw-rw-r-- 1 donz donz 88M May 30 14:47 lazarus-project_1.8.4-0_amd64.deb**
**-rw-rw-r-- 1 donz donz 88M Jun  1 14:30 lazarus-project_1.8.4-0_amd64 
(1).deb*


The package installer say:

*Error: Dependency is not satisifiable: fpc(=3.0.4)|fp-compiler(=3.0.4)*

When I start fpc it says:

fpc -i
*Free Pascal Compiler version 3.0.4**
**
**Compiler date  : 2018/05/31**
**Compiler CPU target: x86_64**
**
**Supported targets (targets marked with '{*}' are under development):**
**  Linux: Linux for x86-64**
**  FreeBSD: FreeBSD for x86-64**
**  Win64: Win64 for x64**
**  Darwin: Darwin for x86_64**
**  solaris: Solaris for x86-64 {*}**
**  OpenBSD: OpenBSD for x86-64 {*}**
**  NetBSD: NetBSD for x86-64 {*}**
**  DragonFly: DragonFly for x86-64*

etc.

/usr/local/bin/fpc -i
*Free Pascal Compiler version 3.0.4**
**
**Compiler date  : 2018/05/31**
**Compiler CPU target: x86_64**
**
**Supported targets (targets marked with '{*}' are under development):**
**  Linux: Linux for x86-64**
**  FreeBSD: FreeBSD for x86-64**
**  Win64: Win64 for x64**
**  Darwin: Darwin for x86_64**
**  solaris: Solaris for x86-64 {*}**
**  OpenBSD: OpenBSD for x86-64 {*}**
**  NetBSD: NetBSD for x86-64 {*}**
**  DragonFly: DragonFly for x86-64**
*

/usr/bin/fpc -i
*Free Pascal Compiler version 3.0.4**
**
**Compiler date  : 2018/05/31**
**Compiler CPU target: x86_64**
**
**Supported targets (targets marked with '{*}' are under development):**
**  Linux: Linux for x86-64**
**  FreeBSD: FreeBSD for x86-64**
**  Win64: Win64 for x64**
**  Darwin: Darwin for x86_64**
**  solaris: Solaris for x86-64 {*}**
**  OpenBSD: OpenBSD for x86-64 {*}**
**  NetBSD: NetBSD for x86-64 {*}**
**  DragonFly: DragonFly for x86-64**
*

I'm using Linux Mint 18.3.
**

Why doesn't the installer recognize fpc?  Where does it look for it?  
What am I missing?


Thanks,

Don

-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] How to debug DB errors.

2018-05-30 Thread Donald Ziesig via Lazarus

On 05/30/2018 12:05 PM, Joost van der Sluis via Lazarus wrote:

Op 30-05-18 om 17:38 schreef Donald Ziesig via Lazarus:

I found the fpmake.pp file in 
/usr/share/fpcsrc/3.0.4/packages/fcl-db. Using sudo -i, I ran:


fppkg install -o -gl

It responded "Error code 301", then "Compile successful".

I ran it again:

hp-laptop fcl-db # fppkg install -o -gl
Warning: Unexpected response status code: 301
The FPC Package tool encountered the following error:
Found broken packages, run "fppkg fixbroken" first

hp-laptop fcl-db # fppkg fixbroken
Warning: Unexpected response status code: 301
Re-install packages which are dependent on just installed packages
The FPC Package tool encountered the following error:
Stream read error

All google searches for error 301 showed "Moved permanently" as the 
meaning.  Unfortunately, it doesn't show where it was looking when it 
got the 301 error.  Any suggestions?


The URL to the central repository has changed from 'http' to 'https', 
so that's why you see the redirect. But the main repository won't help 
you, it is almost empty.


But in your case you can just ignore all this. Fppkg tries to 
recompile all packages which are depending on fcl-db. But the only 
change is that you added debug-info. So the recompile is not necessary.


Try to build your project, and see what happens.



(There is another repository you could try, search for your fppg.cfg 
(run 'fppkg listsettings') and adapt the url to the central repository 
to: http://fpc.cnoc.nl/repo/testing/mirrors.xml.


If you still miss any packages, ask me to add them.)

Regards,

Joost.


Well, the IDE recompiles, but my app is having problems with my own 
libraries that use *sqldb*.  The error message says that the checksum 
has changed.  I tried recompiling all or the dependencies, but the error 
does not change.


I am now going to uninstall Lazarus and FPC and re-installing it from 
scratch.  Hopefully that will fix it.  If not, I'll let you know.


BTW, is there any log file that I might be missing that will get me 
closer to the problem?


Don


-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] How to debug DB errors.

2018-05-30 Thread Donald Ziesig via Lazarus

On 05/30/2018 10:42 AM, Joost van der Sluis via Lazarus wrote:

Op 30-05-18 om 16:24 schreef Donald Ziesig via Lazarus:
I have been developing database apps for years and I have finally 
reached my limit.  Occasionally I get exceptions in the db code but 
the Call Stack is truncated as is shown below.  I usually just "bite 
the bullet" and single step through the code till I find the 
offending line.  This time, I got an exception after 8 hours of 
execution.  Is there any way that I can set this up so that I get a 
location in my own code?


You could try to install the LazDebuggerFP package, and switch to the 
FPDebug debugger in your debugger-options. In a lot of cases it shows 
a more complete callstack.


And did you already tried to use the fcl-db package with debug-info? 
If you want to, go to a terminal, change to current directory to the 
fcl-db source (where the fpmake.pp file is). Then do:


fppkg install -o -gl

Then build your application in Lazarus, and you will have fcl-db with 
debug-info.


Regards,

Joost.




Hi Joost!

Thanks for the quick response.

I found the fpmake.pp file in /usr/share/fpcsrc/3.0.4/packages/fcl-db.  
Using sudo -i, I ran:


fppkg install -o -gl

It responded "Error code 301", then "Compile successful".

I ran it again:

hp-laptop fcl-db # fppkg install -o -gl
Warning: Unexpected response status code: 301
The FPC Package tool encountered the following error:
Found broken packages, run "fppkg fixbroken" first

hp-laptop fcl-db # fppkg fixbroken
Warning: Unexpected response status code: 301
Re-install packages which are dependent on just installed packages
The FPC Package tool encountered the following error:
Stream read error

All google searches for error 301 showed "Moved permanently" as the 
meaning.  Unfortunately, it doesn't show where it was looking when it 
got the 301 error.  Any suggestions?


Don

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] How to debug DB errors.

2018-05-30 Thread Donald Ziesig via Lazarus

Hi Everyone,

I have been developing database apps for years and I have finally 
reached my limit.  Occasionally I get exceptions in the db code but the 
Call Stack is truncated as is shown below.  I usually just "bite the 
bullet" and single step through the code till I find the offending 
line.  This time, I got an exception after 8 hours of execution.  Is 
there any way that I can set this up so that I get a location in my own 
code?


The error message said there was a syntax error in the DBConnection 
object caused by the letter 's'


#0 fpc_raiseexception at :0
#1 SQLITE3CONN$_$TSQLITE3CONNECTION_$__$$_CHECKERROR$LONGINT at :0
#2 SQLITE3CONN$_$TSQLITE3CURSOR_$__$$_CHECKERROR$LONGINT at :0
#3 ?? at :0
#4 SQLITE3CONN$_$TSQLITE3CURSOR_$__$$_PREPARE$ANSISTRING$TPARAMS at :0
#5 .Ld24 at :0
#6 ?? at :0

Thanks,

Don Ziesig


--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Restart Lazarus after rebuild crashes

2018-05-11 Thread Donald Ziesig via Lazarus

Hi All!

Brand new Laptop :-). Clean installation of Linux Mint 18.3.:-) New 
download of Lazarus.  Version 18.2, Date 2018=-05-10, FPC 3.0, 
x86_64-linux-gtk2 8-).


Added simple component, interface section and mostly stubbed methods 
(only Create and Destroy have code).  After Lazarus successfully 
installs the component (rebuilding), the IDE crashes when trying to 
restart with the following:


Hint: (lazarus) TMainIDE.DoRestart
WARNING: TMenuItem.Destroy with LCLRefCount>0. Hint: Maybe the component 
is processing an event?
WARNING: TToolBar.Destroy with LCLRefCount>0. Hint: Maybe the component 
is processing an event?

TApplication.HandleException Access violation
  Stack trace:
  $
  $0060C5CE line 69 of include/toolbutton.inc
  $0060C550 line 116 of include/toolbutton.inc
  $0059876A line 2292 of include/control.inc
  $00598C37 line 2430 of include/control.inc
  $0043281F
  $00596C38 line 1571 of include/control.inc
  $0058956B line 4735 of include/wincontrol.inc
  $0058AC51 line 5362 of include/wincontrol.inc
  $00756032 line 112 of lclmessageglue.pas
  $00657825 line 3702 of gtk2proc.inc
  $00666F6D line 2194 of gtk2callback.inc
  $006665D8 line 1949 of gtk2callback.inc
  $7FB43DD42AEC
Exception at : EAccessViolation:
Access violation.

(lazarus:28802): GLib-GObject-CRITICAL **: g_object_get_data: assertion 
'G_IS_OBJECT (object)' failed

TApplication.HandleException Access violation
  Stack trace:
  $00432718
  $0044 line 1964 of gtk2callback.inc
  $7FB43DD42AEC
Exception at 00432718: EAccessViolation:
Access violation.
LAZARUS END - cleaning up ...
[FORMS.PP] ExceptionOccurred
  Sender=EAccessViolation
  Exception=Access violation
  Stack trace:
  $7FB43D9DE820
TApplication.HandleException Access violation
  Stack trace:
  $7FB43D9DE820
Exception at 7FB43D9DE820: EAccessViolation:
Access violation.


The offending line is:

    pt := ScreenToClient(Mouse.CursorPos);

and based on the stacktrace I would beleive that Mouse.CursorPos is 
nil!  I then added:


if not Assigned(Mouse) then exit;

This moved the location of the Access Violation, confirming that Mouse 
is indeed nil.  At that point I figured that I should report this and 
leave further debugging to the experts.:-[


~/.lazarus/bin/lazarus and
~./lazarus/bin/lazarus.old

both have the correct timestamps.

I saw this before on my old machine, but at that point I had installed a 
large library of components and I thought that maybe I had caused the 
problem.  This time I have a new, up-to-date installation which crashed 
the first time I added a trivial component and rebuild the IDE.


I will try to submit a bug report, but trying to replicate for the 
report may be a step too far.


Thanks,

Don Ziesig

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] 'WARNING: TGtk2WidgetSet.InvalidateRect refused invalidating during paint message:

2018-05-03 Thread Donald Ziesig via Lazarus

Hi All!

I have written a control that works fine except that it produces the 
subject WARNING twice for every time it is painted.  The problem comes 
from a single line:


    Canvas.Draw(0, 0, Bitmap);

I do much drawing to the Bitmap's Canvas (behind the scenes to avoid 
flicker) before calling the Draw method.


I have stepped through this call and sure enough, it calls 
InvalidateRect twice before returning.  Otherwise it does exactly what 
it is supposed to do.


Unfortunately, the calls it makes to DebugLn are time consuming and 
produces a noticable delay in program execution when I try to paint.


The source code (in gtk2winapi.inc) does not offer a way of disabling 
the warning message.  Googling for the message said that it should never 
be left as is, but I can't see any way around calling Draw from within 
an OnPaint handler.  Also, sample apps do the same thing!


I could bite the bullet and comment out the DebugLn in the source, but I 
worry that that is "a hack to far".


Suggestions as to how to overcome this problem will be truly appreciated.

Thanks,

Don Ziesig


--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Unknown error codes.

2018-04-29 Thread Donald Ziesig via Lazarus

On 04/29/2018 03:00 PM, Carlos E. R. via Lazarus wrote:

Hi,

The other day I got this error in a program (on Linux):

cer@Telcontar:~/bin/lazarus/mios> ./crc32test ./crc32test
An unhandled exception occurred at $00400951:
EInOutError: Unknown Run-Time error : 026
   $00400951 line 26 of crc32test.lpr
   $00400A5C line 42 of crc32test.lpr

crc32 = cer@Telcontar:~/bin/lazarus/mios>


Notice the "Unknown" there. And indeed, error 26 is not listed here:




A friend pointed me to this file:

/usr/include/asm-generic/errno-base.h

and there it is indeed listed:

#define ETXTBSY 26  /* Text file busy */

The error number does match the situation: the IDE has hold of that file
for debugging. Interesting.


But the problem is, why is that error not listed, unknown?

Today a poster wrote about this other error (subject: [Lazarus] Runtime
error: INCLOCKED):

Runtime error 216 at $00400BD5
   $00400BD5  INCLOCKED
   $00400216  DISPLAY,  line 23 of project1.lpr
   $00400360  main,  line 32 of project1.lpr
   $0042BE00  SYSENTRY,  line 129 of system.pp
   $004001D2


which is not listed. I do not know if he is running Linux or Windows, so
I have no idea either what the error is in his case.

Do we know of more places that list those error numbers? Can we compose
a full list?

By the way, C has a function: "strerror(26)" which returns the text
message for the error. I don't know if we have.







216 is a General Protection Fault.

for other errors see: https://freepascal.org/docs-html/user/userap4.html

Don Ziesig

-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Drag (and show) images

2018-04-13 Thread Donald Ziesig via Lazarus

On 04/13/2018 04:45 AM, Giuliano Colla via Lazarus wrote:


Il 13/04/2018 02:40, Donald Ziesig via Lazarus ha scritto:

You're right.  It gets *close* but not quite there.  I can move the 
control so long as the mouse is *not* over the control while it is 
moving :-(. I will look at this closer in the morning and see if I 
can work around it (or if there is something I am missing).




You might find useful, as a guideline, the code I'm using in one of my 
application to drag a button so that it doesn't cover the useful part 
of an image. Just using the OnMouseDown, OnMouseMove and OnMouseUp of 
your TImage, and getting rid of the code you don't need, to perform an 
extra action on OnMouseUp, you should be able to do the trick.



  TErrForm = class(TForm)
..
  protected
    ResetDragged: Boolean;
    CursorPos: TPoint;
    ObjectPos: TPoint;


procedure TErrForm.ResetBtnMouseDown(Sender: TObject; Button: 
TMouseButton;

  Shift: TShiftState; X: LongInt; Y: LongInt);
begin
  ResetDragged := True;
  CursorPos.X := Mouse.CursorPos.X;
  CursorPos.Y := Mouse.CursorPos.Y;
  with ResetBtn do begin;
    ObjectPos.X := Left;
    ObjectPos.Y := Top;
    end;
end;

procedure TErrForm.ResetBtnMouseMove(Sender: TObject; Shift: TShiftState;
  X: LongInt; Y: LongInt);
begin
  if ResetDragged then begin
    with ResetBtn do begin
  Left := ObjectPos.X + (Mouse.CursorPos.X - CursorPos.X);
  Top := ObjectPos.Y +  (Mouse.CursorPos.Y - CursorPos.Y);
  ResetPos.X := (Left * NormalGeometry.ClientWidth div 
CurrImage.Width) + HorzScrollBar.Position;
  ResetPos.Y := (Top * NormalGeometry.ClientHeight div 
CurrImage.Height) + VertScrollBar.Position;

  end;
    end;
end;

procedure TErrForm.ResetBtnMouseUp(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X: LongInt; Y: LongInt);
begin
  if ResetDragged then begin
    ResetDragged := False;
    Paint;
    end;
  if (abs(Mouse.CursorPos.X - CursorPos.X) < 10) and 
(abs(Mouse.CursorPos.Y - CursorPos.Y)< 10) then Close;

end;


Hope that it helps.

Giuliano




Hi Giuliano!

It works perfectly. 8-) The best part is that it doesn't use any poorly 
documented library code and it doesn't hog the CPU either.


Many thanks,

Don

-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Drag (and show) images

2018-04-12 Thread Donald Ziesig via Lazarus

On 04/11/2018 07:18 PM, Werner Pamler via Lazarus wrote:

Am 12.04.2018 um 00:02 schrieb Donald Ziesig via Lazarus:
I am trying to write an app that allows me to drag images and show 
them while they are being dragged (like the cards in Solitaire).


I have been able to drag images (showing only the drag cursor) and 
drop them appropriately, but I haven't been able to find any recent 
documentation showing the use of TDragImageList and TDragObject.


The only articles that I have found are for Delphi from 2011 (which 
translates to Lazarus but doesn't work correctly) and some more 
recent that don't show the dragged image while the drag is taking 
place (I have that part working).


I was able to show a dragged image by adding code to the DragOver 
event, but that seems to take more time than it should.


Can anyone point me in the right direction for this?


There is a sample in folder examples/dragimagelist of your Lazarus 
installation - maybe it gets close to what you need?


You're right.  It gets *close* but not quite there.  I can move the 
control so long as the mouse is *not* over the control while it is 
moving :-(. I will look at this closer in the morning and see if I can 
work around it (or if there is something I am missing).


Thanks!

Don

-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Drag (and show) images

2018-04-11 Thread Donald Ziesig via Lazarus

Hi All!

I am trying to write an app that allows me to drag images and show them 
while they are being dragged (like the cards in Solitaire).


I have been able to drag images (showing only the drag cursor) and drop 
them appropriately, but I haven't been able to find any recent 
documentation showing the use of TDragImageList and TDragObject.


The only articles that I have found are for Delphi from 2011 (which 
translates to Lazarus but doesn't work correctly) and some more recent 
that don't show the dragged image while the drag is taking place (I have 
that part working).


I was able to show a dragged image by adding code to the DragOver event, 
but that seems to take more time than it should.


Can anyone point me in the right direction for this?

Thanks,

Don Ziesig


--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Beep?

2018-03-29 Thread Donald Ziesig via Lazarus

On 03/29/2018 06:12 AM, Carlos E. R. via Lazarus wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



On Monday, 2018-03-26 at 06:09 +0200, Carlos E. R. via Lazarus wrote:


On 2018-03-26 04:02, Donald Ziesig via Lazarus wrote:

Hi Everyone!

I am using Lazarus 1.8 on Linux Mint.  I would like to use the
Windows.Beep( Freq, Duration) function, or (if not available)
SysUtils.Beep subprograms.


AFAIK, you can not call Windows functions in Linux.


Further, my understanding is that the loudspeaker is associated to the 
terminal in Linux. You can not thus beep from a daemon, something that 
would be useful. We apparently do not get access to program the chip 
as in MsDOS, nor freq,duration.



Here I post an attempt I did back on 2005. It doesn't compile, and 
this moment I can't check why. Nor, of course, do I remember what I 
was trying.


program beeper;

uses linux;

var
    Saved43, Saved61: byte;
    LoadClock: word;
    frequency: word;
    duration:  real;
    RequestedDuration, RemainingDuration: timespec;

    hh,mm,ss, msec, usec: word;
begin
(*
    if paramcount <> 2 then begin
    writeln('Produces a beep of the indicated frequency 
and duration.');

    writeln('Usage: beeper frequency duration');
    halt(1);
    end;


    frequency:= round(ParamStr(1));
    duration:= ParamStr(2);
*)

    frequency:= 500;
    duration:=  1.2;


    RequestedDuration.tv_sec:=  trunc(duration);
    RequestedDuration.tv_nsec:= trunc(frac(duration)*1e9);

    {ioperm(from, num, value)}
    writeln($61, '   ', $42);
    writeln(ioperm($61, 1, 1), ' ', ioperm($42, 2, 1));

    {timer prepare}
    ReadPort($43, Saved43);
    writeln('43h', ' ', Saved43);
    writeport($43, byte($B6));  {Channel 2, LSB/MSB}

    LoadClock:= 1193180 div frequency;
    writeport($42, Lo(LoadClock));
    writeport($42, Hi(LoadClock));

    ReadPort($61, Saved61);
    writeln('61h', ' ', Saved61);
    writeport($61, byte(Saved61 or $3));    {Speaker on}


    {Select(0, nil, nil, nil, 1000);}
    gettime(hh,mm,ss, msec, usec);
    writeln(hh,':', mm, ':', ss, '.', msec, ' ', usec);
    nanosleep(RequestedDuration, RemainingDuration);
    gettime(hh,mm,ss, msec, usec);
    writeln(hh,':', mm, ':', ss, '.', msec, ' ', usec);

    writeport($61, Saved61);    {Speaker off}

end.


I also have copies of some c code I got from fidonet posts that I can 
look at another day, in assembler. I don't remember if they worked, 
probably not.



- -- Cheers,
   Carlos E. R.
   (from openSUSE 42.3 x86_64 "Malachite" at Telcontar)

-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iEYEARECAAYFAlq8vCgACgkQtTMYHG2NR9W0MQCfW3PJfWFopnrWMV9V+bCcA1ZQ
2goAn3C6b2V2kwsunTiqB5o1vIQIaF8H
=v6dw
-END PGP SIGNATURE-



Thanks Carlos!

I am presently recovering from surgery and taking medication for pain.  
I will try your suggestion once my pain is gone and I can think straight 
;-).


Don

-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Compilation aborted!

2018-02-18 Thread Donald Ziesig via Lazarus

On 02/18/2018 04:02 AM, Mattias Gaertner via Lazarus wrote:

On Sat, 17 Feb 2018 22:35:17 -0500
Donald Ziesig via Lazarus <lazarus@lists.lazarus-ide.org> wrote:


[...]
Isolated it to FPC.  Ran fpc from terminal without IDE.  Got same error
(AV).  It is getting late here. I will look at this in the morning.

Maybe you got messed up ppu files, or you messed up unit paths.

Mattias


I found the problem!  It is definitely a compiler bug (compiler did NOT 
report the actual error, all it did was throw an Access Violation).


Unfortunately, I had changed one more line than I remembered during the 
last edit before the failure.


That line was (in the type(s) declaration:

    TAMBytes = array[0..1] of Byte;

I changed it to:

  TAMBytes = array[0..High(Integer)] of Byte;

Type TAMBytes was used as the return type is several functions. When I 
commented out ALL of the code that used TAMBytes, the error went away.  
Since TAMBytes was the only consistent item in that code, I checked its 
declaration and remembered the other :-[ change I made. Reverted that to 
the original version and the compilation succeeded.  Finally changed it to:


  TAMBytes = array[0..32767] of Byte;

This also compiled successfully, and was big enough that it will handle 
much bigger arrays than I expected to use.


I will create a simplified test case and submit a bug report to Free Pascal.

Thanks for putting up with my earlier complaints.

Don Ziesig


--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Compilation aborted!

2018-02-17 Thread Donald Ziesig via Lazarus

Hi Everyone:

I am writing a package that currently has one unit file which, in turn, 
has two inter-related classes.


Until just now, the package compiled (some empty methods) with only 
expected info and warnings.  I just did some minor editing (added 6 
contiguous lines) and now I get "FATAL Compilation aborted".  I 
commented out the newly entered code, but the compilation aborts.  I 
removed the newly entered code but it still aborts.


I ran the IDE from a terminal and it suggested that I look at the State 
file (.compiled).  I did, but it has nothing of interest.


Can anyone suggest what to do next to isolate the problem?

Thanks,

Don Ziesig

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] ppu's in wrong directory.

2018-02-06 Thread Donald Ziesig via Lazarus
I am working on updates to some free pascal database code.  In order to 
do this, I used fpcupdelux to download and build the entire app into a 
private folder so I don't mess up my normal installation.


I made one change to db.pas (changed a private to protected) and 
re-compiled it and the IDE and my code.  After doing this, I am getting 
many errors of the type:


"bufdataset_parser.pp(13,3) Fatal: Cannot find dbf_prscore used by 
bufdataset_parser. Make sure all ppu files of a package are in its 
output directory. ppu in wrong 
directory=/home/donz/Desktop/Lazarus/fpc/units/x86_64-linux/fcl-db/dbf_prscore.ppu.."


This is just one of many with the same theme (ppu in wrong directory).

I'm working on Linux Mint 18.3, Lazarus 1.8.0, FPC 3.0.4,  SVN 57265M, 
x86_64-linux-gtk2


How can I recover from this?

Thanks,

Don Ziesig


--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] IDE focused window after app terminates

2018-01-28 Thread Donald Ziesig via Lazarus

On 01/28/2018 05:44 PM, Bart via Lazarus wrote:

On Sun, Jan 28, 2018 at 11:13 PM, Donald Ziesig via Lazarus
<lazarus@lists.lazarus-ide.org> wrote:


I have noticed a similar problem with Lazarus 1.8.0 that did not happen in
earlier versions.  When I click on a tab in the Source Editor with the focus
in an editor window, the focus switches somewhere not in the window I
switched to.  IIRC it used to remember where the cursor and focus was for
each window, but now I have to explicitly click on the selected editing
surface (which changes the cursor position).


IIRC this was fixed some time ago.

Bart

Thanks, I'll give it a try.
--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] IDE focused window after app terminates

2018-01-28 Thread Donald Ziesig via Lazarus

On 01/27/2018 07:16 PM, Graeme Geldenhuys via Lazarus wrote:

Hi,

I never noticed this before, but I'm working on a project where I 
switch very fast and frequently between coding and running the 
program, then back to coding... repeat.


The annoyance I never noticed before is that when my application 
terminates (run via F9 from within the IDE), the Main Window of 
Lazarus IDE always gets focus, instead of the Source Editor window. So 
this forces me to use the mouse to click the Source Editor window to 
get focus, before I can make my next small code change.


I'm using a 2-3 month old Lazarus Trunk (Lazarus 1.9.0 r55733 FPC 
3.0.4 x86_64-freebsd-gtk2). Maybe I missed it, but does the IDE have 
an option to tell it to focus the Source Editor window instead of the 
Main IDE window after the debugged application terminates? If so, 
where is that option.


Regards,
  Graeme

I have noticed a similar problem with Lazarus 1.8.0 that did not happen 
in earlier versions.  When I click on a tab in the Source Editor with 
the focus in an editor window, the focus switches somewhere not in the 
window I switched to.  IIRC it used to remember where the cursor and 
focus was for each window, but now I have to explicitly click on the 
selected editing surface (which changes the cursor position).


If I do an operation in another kind of window (e.g. the Object 
Inspector), then move the mouse back to the Source Editor, the cursor 
position and focus are restored correctly.


This is particularly annoying :-\

Regards,

Don Ziesig

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] How to find stream contents for component?

2018-01-21 Thread Donald Ziesig via Lazarus

Hi All!

I am developing a component and made the mistake of not re-installing it 
often enough :'(. I after considerable editing, I re-installed it and 
when Lazarus re-started I got errors about an AV at "stream position 2486".


Is there any way to inspect the contents of stream position 2486 so I 
can get a hint as to what is wrong?


I tried examining the lfm file with "od -A d -c" which gives me the 
character count, but the text at that point has nothing to do with the 
component I am working on.  I suspect that this is not the right "stream".


Thanks,

Don Ziesig

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] I've been defeated. (Dataset Problem)

2018-01-17 Thread Donald Ziesig via Lazarus

On 01/17/2018 04:41 PM, Michael Van Canneyt via Lazarus wrote:



On Wed, 17 Jan 2018, Donald Ziesig via Lazarus wrote:


Hi All!

I give up! :'(

After four solid days of hacking through undocumented code, I have to 
admit defeat.


I have a component derived from TDataSet.  This component uses 
TFieldDefs and TIndexDefs.  The problem is that when I edit the 
TIndexDef, the underlying form does NOT see the change!  When I edit 
the TFieldDef the form does see the change.


As a result, if I want to update an IndexDef, I must make the change, 
then change ANYTHING ELSE on the form (and change it back) so that 
the change to the IndexDef is saved and recompiled.  While this is a 
work around, I invariably forget to make the second change and lose 
any updates to the IndexDef.


Can anyone help me with this?


I have seen your bugreport about it. I assigned it to myself, but I need
some time to debug it. If you need a solution FAST, someone else will 
need

to look at it...

Michael.



Hi Michael,

Now that I figured out what the underlying problem is and have a work 
around, I can wait. ;-)


Thanks,

Don

-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] I've been defeated. (Dataset Problem)

2018-01-17 Thread Donald Ziesig via Lazarus

Hi All!

I give up! :'(

After four solid days of hacking through undocumented code, I have to 
admit defeat.


I have a component derived from TDataSet.  This component uses 
TFieldDefs and TIndexDefs.  The problem is that when I edit the 
TIndexDef, the underlying form does NOT see the change!  When I edit the 
TFieldDef the form does see the change.


As a result, if I want to update an IndexDef, I must make the change, 
then change ANYTHING ELSE on the form (and change it back) so that the 
change to the IndexDef is saved and recompiled.  While this is a work 
around, I invariably forget to make the second change and lose any 
updates to the IndexDef.


Can anyone help me with this?

Thanks,

Don Ziesig


--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Minor Annoyance update

2018-01-17 Thread Donald Ziesig via Lazarus

On 01/17/2018 12:54 PM, Bart via Lazarus wrote:

> Startup of the IDE also fails with the menu selection:  File | Restart

How do you start the IDE: lazarus or startlazarus?

From an panel button.  The command is:

startlazarus %f


Bart


Also:

Menu->Tools->Configure Build Lazarus: check: Restart after building IDE. is 
CHECKED.

Don






-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Minor Annoyance update

2018-01-17 Thread Donald Ziesig via Lazarus

Update:

Startup of the IDE also fails with the menu selection:  File | Restart



 Forwarded Message 
Subject:[Lazarus] Minor Annoyance
Date:   Wed, 17 Jan 2018 12:46:34 -0500
From:   Donald Ziesig via Lazarus <lazarus@lists.lazarus-ide.org>
Reply-To:   Lazarus mailing list <lazarus@lists.lazarus-ide.org>
To: lazarus@lists.lazarus-ide.org
CC: Donald Ziesig <don...@ziesig.org>



Hi Everyone!

I am working on a component and having some issues with the property
interface.  This means that I have to occasionally rebuild the IDE to
update the component's definition.

I have done this in the past, and when I did, the IDE would restart
automatically when the re-build was done.  With 1.8 the IDE closes and
must be manually restarted.  As the subject says, this is a minor
annoyance.  Is there some parameter that i can change to revert this
behavior to that of 1.6?

Using Linux Mint 18.3 with Lazarus 1.8.0 2018-01-10.

Thanks,

Don Ziesig


--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus

-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Minor Annoyance

2018-01-17 Thread Donald Ziesig via Lazarus

Hi Everyone!

I am working on a component and having some issues with the property 
interface.  This means that I have to occasionally rebuild the IDE to 
update the component's definition.


I have done this in the past, and when I did, the IDE would restart 
automatically when the re-build was done.  With 1.8 the IDE closes and 
must be manually restarted.  As the subject says, this is a minor 
annoyance.  Is there some parameter that i can change to revert this 
behavior to that of 1.6?


Using Linux Mint 18.3 with Lazarus 1.8.0 2018-01-10.

Thanks,

Don Ziesig


--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Recommended practices for Win / Linux development.

2018-01-11 Thread Donald Ziesig via Lazarus

On 01/11/2018 03:21 AM, Mattias Gaertner via Lazarus wrote:

On Wed, 10 Jan 2018 19:16:25 -0500
Donald Ziesig via Lazarus <lazarus@lists.lazarus-ide.org> wrote:


Hi Everyone!

A long time ago, I tried to develop common software for Windows and
Linux.  I remember having problems keeping the object files, etc,
separated so that the two versions of Lazarus would re-compile the
appropriate files.  I have been working almost exclusively on Linux
since then, but now I need to use both with shared source code files.

Shared by svn/git or shared on disk/network share?


Shared Folders on Dropbox (for now).  GitHub later.

Are there any recommended practices for setting up Lazarus and various
directories that would make this easier?

By default Lazarus projects use
lib/$(TargetCPU)-$(TargetOS)
as unit output directory.


Got It.

How about Line Endings?



Mattias


Thanks,

Don

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Recommended practices for Win / Linux development.

2018-01-10 Thread Donald Ziesig via Lazarus

Hi Everyone!

A long time ago, I tried to develop common software for Windows and 
Linux.  I remember having problems keeping the object files, etc, 
separated so that the two versions of Lazarus would re-compile the 
appropriate files.  I have been working almost exclusively on Linux 
since then, but now I need to use both with shared source code files.


Are there any recommended practices for setting up Lazarus and various 
directories that would make this easier?


Thanks,

Don Ziesig


--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Source | complete code - does nothing.

2018-01-09 Thread Donald Ziesig via Lazarus

On 01/09/2018 12:03 PM, Vojtěch Čihák via Lazarus wrote:


Hi,

example - you write:

i:=5;

and hit Ctrl+Shift+X on that line and it will open dialog where you 
can choose if you want to create "i" as a local or class variable.


V.

______
> Od: Donald Ziesig via Lazarus <lazarus@lists.lazarus-ide.org>
> Komu: lazarus@lists.lazarus-ide.org
> Datum: 09.01.2018 17:54
> Předmět: [Lazarus] Source | complete code - does nothing.
>

Hi All:

I was just playing with text editing "toys" such as code completion, 
outlines, etc.  While doing this I discovered that clicking on the 
menu entry:


Source
  Complete Code (with Dialog)   Ctrl-Shift-X

does nothing.  No dialog, no changes to text in editor.

I  then tried Ctrl-Shift-X with similar (no) results.

This is not a major issue for me, I was just being curious, but I 
would think that a main menu entry should do *something* ;-).


What is it supposed to do?

I am using the release version of Lazarus 1.8 (dated 2017-12-13) on 
Linux Mint 18.3 with gtk2.


Thanks,

Don Ziesig



--

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Thanks, got it.  I thought if I entered "i :=" then ctrl-shift-x it 
would ask for a value and type, but it just throws an error in the 
messages form.


Don

-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Source | complete code - does nothing.

2018-01-09 Thread Donald Ziesig via Lazarus

Hi All:

I was just playing with text editing "toys" such as code completion, 
outlines, etc.  While doing this I discovered that clicking on the menu 
entry:


Source
  Complete Code (with Dialog)   Ctrl-Shift-X

does nothing.  No dialog, no changes to text in editor.

I  then tried Ctrl-Shift-X with similar (no) results.

This is not a major issue for me, I was just being curious, but I would 
think that a main menu entry should do *something* ;-).


What is it supposed to do?

I am using the release version of Lazarus 1.8 (dated 2017-12-13) on 
Linux Mint 18.3 with gtk2.


Thanks,

Don Ziesig


-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] lazarus-ccr (or other) TBufDataSet Documentation?

2018-01-07 Thread Donald Ziesig via Lazarus

On 01/07/2018 03:32 AM, Michael Van Canneyt via Lazarus wrote:



On Sat, 6 Jan 2018, Donald Ziesig via Lazarus wrote:


Hi All!

I have been trying to find documentation for the TBufDataSet (or 
TMemDataSet) as is available for most other components in the Lazarus 
Code and Component Repository Documentation.  So far I have had no 
success.  Do I have to use the source alone?


Yes, for the time being...

BufDataset is one of the next units on my list of units to document.

Michael.



Michael,

I'm looking forward to that.  Keep up the good work.

Don

-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] lazarus-ccr (or other) TBufDataSet Documentation?

2018-01-07 Thread Donald Ziesig via Lazarus

On 01/07/2018 03:33 AM, leledumbo via Lazarus wrote:

So far I have had no success.  Do I have to use the source alone?

I think there's none officially, but google gives me these:
-
http://wiki.lazarus.freepascal.org/How_to_write_in-memory_database_applications_in_Lazarus/FPC
- http://www.pp4s.co.uk/main/tu-db-bufdataset.html



--
Sent from: http://free-pascal-lazarus.989080.n3.nabble.com/


Thanks, I found both of those.  Unfortunately, they don't describe the 
api (especially the protected methods).


--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Debugging libraries which define generics.

2017-12-15 Thread Donald Ziesig via Lazarus

On 12/15/2017 01:33 PM, Martin Frb via Lazarus wrote:

On 15/12/2017 18:29, Martin Frb via Lazarus wrote:

On 15/12/2017 15:46, Donald Ziesig via Lazarus wrote:


 1. When the mouse hovers over a variable, the debugger (and program
being debugged) frequently crashes with the error:
"-data-evaluate-expression TCQPiece(ITEM)^" did not return any
result.
This is particularly annoying because it inevitably happens just
as I am getting close to finding a problem and I move the mouse
across the editor window :'(.

These problems do not occur when debugging non-generic code.


This is an issue in gdb.

First make sure to use dward (debug info).

^^^ "dwarf"


You can try (if it currently compiles / its a package, install it)  
lazdebuggerfpgdbmi.lpk  (must be the one with gdbmi *and* fp)
just remembered, not sure if this works for libraries (.so). You may 
have to compile an app that includes the code directly.




Thanks Martin.  I changed all of the packages and the main project to 
use Dwarf3 and it looks as if it has solved the problem. 8-) I'll keep 
debugging and let you know if it reappears.


Don


-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Debugging libraries which define generics.

2017-12-15 Thread Donald Ziesig via Lazarus

Hi All,

I have been working on some *serious* :-$ software libraries that 
declare generic subprograms and classes.


While debugging these I noticed:

1. When single-stepping, the line being highlighted in the editor
   window is almost always (but not exclusively) one line *after* the
   line which is about to be executed.
2. When the mouse hovers over a variable, the debugger (and program
   being debugged) frequently crashes with the error:
   "-data-evaluate-expression TCQPiece(ITEM)^" did not return any result.
   This is particularly annoying because it inevitably happens just as
   I am getting close to finding a problem and I move the mouse across
   the editor window :'(.

These problems do not occur when debugging non-generic code.

I am currently using Linux Mint 18 on an Intel core-i5 processor with 
gdb 7.11.1 (the Ubuntu version).  IIRC, I have had similar problems with 
Lazarus versions back as far as 1.2 and earlier versions of Debian, but 
I never had major generic software to debug until now.


I found reports of similar problems caused by line endings (Windows vs. 
Unix).  Is it possible that the code generated by generic specialization 
does not observe the OS-specific line endings and confuses gdb?  This is 
beyond my abilities to fix.


Any suggestions and/or further speculations will be welcome :-).

Don Ziesig


-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Lazarus 1.8

2017-12-14 Thread Donald Ziesig via Lazarus

Many thanks to all who worked on 1.8.0.  It looks great and works better.

Don Ziesig


--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] A later version is already installed.

2017-12-13 Thread Donald Ziesig via Lazarus

Hi All!

I currently have 1.8.0RC4 installed on my machine.  When I try to install


lazarus-project_1.8.0-1_amd64.deb 



it says "A later version is already installed."

Fortunately, RC4 still works.

Am I doing something wrong?

Don Ziesig
 

-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Compiling/linking/debugging package with generics

2017-11-28 Thread Donald Ziesig via Lazarus

On 11/28/2017 05:50 AM, Mattias Gaertner via Lazarus wrote:

On Tue, 28 Nov 2017 08:41:05 -0200
"Marcos Douglas B. Santos via Lazarus" 
wrote:


[...]

Are your 'Other unit files (-Fu)' paths in project inspector and
your package empty?

And is this correct, package empty?

It is normal.

Mattias


I posted a bug-tracker entry (twice, the first one was rejected due 
tothe size of the demo).  Issue 32739 is the correct one


Don

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Compiling/linking/debugging package with generics

2017-11-27 Thread Donald Ziesig via Lazarus

On 11/27/2017 04:27 PM, Mattias Gaertner via Lazarus wrote:

On Mon, 27 Nov 2017 15:52:09 -0500
Donald Ziesig via Lazarus <lazarus@lists.lazarus-ide.org> wrote:


[...]

Are your 'Other unit files (-Fu)' paths in project inspector and
your package empty?

Yes, both are empty.

Good.
If your project and packages have their own directories, it seems
you found a compiler bug.
Can you reproduce it in a small example?

Will do.


Mattias



--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Compiling/linking/debugging package with generics

2017-11-27 Thread Donald Ziesig via Lazarus

On 11/27/2017 01:41 PM, Mattias Gaertner via Lazarus wrote:

On Mon, 27 Nov 2017 13:33:13 -0500
Donald Ziesig via Lazarus <lazarus@lists.lazarus-ide.org> wrote:


[...]

When you change a pas file of your package and you compile your project,
does the IDE automatically compile your package?

Yes (at least it catches typos).  Also, the same problem occurs when I
compile the package manually, then run the program without using
"cleanup and build".  (I am gradually discovering the extent of the
problem ;-)).

Are your 'Other unit files (-Fu)' paths in project inspector and
your package empty?

Yes, both are empty.


Mattias



--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Compiling/linking/debugging package with generics

2017-11-27 Thread Donald Ziesig via Lazarus

On 11/27/2017 01:28 PM, Mattias Gaertner via Lazarus wrote:

On Mon, 27 Nov 2017 13:15:36 -0500
Donald Ziesig via Lazarus <lazarus@lists.lazarus-ide.org> wrote:


[...]
TL;DR   Library packages which declare generics do compile, but do not
get included in the code that specializes them unless I "Cleanup and
build" the whole program.  (Workable, but much *slower* than programs
without generics).

I searched the bug tracker, but did not see anything resembling this
problem.  I would submit a bug report but I'm not sure whether this is
an IDE problem, a package problem or a compiler/linker problem.  Would
someone more familiar with this part of the architecture give me pointers?

When you change a pas file of your package and you compile your project,
does the IDE automatically compile your package?
Yes (at least it catches typos).  Also, the same problem occurs when I 
compile the package manually, then run the program without using 
"cleanup and build".  (I am gradually discovering the extent of the 
problem ;-)).


Mattias



--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Todo lists.

2017-11-26 Thread Donald Ziesig via Lazarus

Hi Everyone!

I used to (infrequently) use the Menu command or the hot key 
ctrl-shift-t to add properly formatted Todo comments in my code. I 
believe it was in the Source sub-menu.  I remember using an entry in the 
Source sub-menu to show a list of Todo's in the program.


I can't find either of the menu items for Todo, nor does the hot key 
work in v1.80RC4.


What am I missing :'( ?

Thanks

Don Ziesig


--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Center text in multi-line hints?

2017-11-15 Thread Donald Ziesig via Lazarus

Hi All!

This is just a minor annoyance fpr me (it grates on my sense of 
esthetics :-)), but is there any way to center the text in a multi-line 
hint?  In the current app, the hint is for a TPaintBox, but I've 
occasionally wanted to do this for other controls in the past.


I could almost do this by pre-processing the hint text, but it would not 
take into account even/odd character counts (better than nothing, but 
not optimal).


Thanks,

Don Ziesig

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Howto disable Lazarus IDE using a XFCE dark theme

2017-11-07 Thread Donald Ziesig via Lazarus

On 11/07/2017 03:20 PM, Michael Van Canneyt via Lazarus wrote:



On Tue, 7 Nov 2017, Graeme Geldenhuys via Lazarus wrote:


On 2017-11-06 23:58, R0b0t1 wrote:
Integrated theming is a good idea because unless all assets are 
obtained
from the windowing toolkit then there is no way to know they will 
mesh well

with a given color scheme.


As the saying goes: “You are preaching to the choir”. ;-) I fully 
agree with you, hence fpGUI Toolkit supports individual application 
theming. As standard, every fpGUI application can also switch between 
the 8 built-in standard themes with the --theme command line parameter.


  http://geldenhuys.co.uk/~graemeg/themes/start.html


GTK can do this out of the box.

https://unix.stackexchange.com/questions/14129/gtk-enable-set-dark-theme-on-a-per-application-basis 



No doubt, so can Qt.

Michael.


I give up!  After looking at most of the links in this thread, I can not 
get the Lazarus IDE to use anything other than the default theme ('black 
on white - with language highlighting).  I would really like to use a 
dark theme (white on black or gray - again with language highlighting).


I normally start lazarus from a .desktop file, but even dropping back to 
the command line (with --pcp= ... ) nothing I have done changes the theme.


Could someone give me a command line that I could adapt to produce a 
dark theme?


Thanks,

Don Ziesig


-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Annoyance with 1.8RC5

2017-10-26 Thread Donald Ziesig via Lazarus

On 10/26/2017 09:42 PM, kapibara wrote:
I agree with Don, Object Inspector "always on top" is in the way for 
other forms. Actually, this issue came up a year ago and was resolved. 
Now popped up again.


@Don did you find and report the revision that reintroduced this 
behaviour?


I found that it appeared (in the source) going from RC4 to RC5.  I 
dropped back to RC4 so I can get some work done;-).

I tried to find the exact units involved but I couldn't find them.


On 10/15/2017 05:05 PM, Donald Ziesig via Lazarus wrote:

Hi All!

I have been using RC5 for a couple of days and am annoyed by one 
change.  Maybe its a configuration item that I can't find, but I 
would really like to turn off 'Always on Top' for the Object 
Inspector, Messages, Call Stack and other IDE forms.


I've been using Delphi since version 1 and got used to being able to 
click on an IDE form to bring it to the front.  Now I have to slide 
it out of the way or minimize it (if possible) to get access to other 
forms or the running application.


What can I do about this?

Thanks,

Don







--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Fatal IO error 11

2017-10-23 Thread Donald Ziesig via Lazarus

Hi All!

How can I isolate the source of "Fatal IO error 11 (Resource temporarily 
unavailable) on X server :0.0. Xlib: request 67 length 20 would exceed 
buffer size."  The program halts without calling the debugger or 
throwing an exception.  The only indication I have is this error message 
in the Console.


I can't even identify the unit where the problem lies.

Thanks,

Don Ziesig

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] How to enable Code outline feature of the IDE

2017-10-20 Thread Donald Ziesig via Lazarus

On 10/20/2017 05:51 PM, Mattias Gaertner via Lazarus wrote:

On Fri, 20 Oct 2017 11:07:51 -0400
Donald Ziesig via Lazarus <lazarus@lists.lazarus-ide.org> wrote:


[...]I
looked at the release notes, etc. for 1.8 again with negative results.

It is mentioned in the release notes:
http://wiki.freepascal.org/Lazarus_1.8.0_release_notes

"New colored outline of source structure."

A link to a description would be nice.

Mattias


Dang!  I searched for "code outline" and didn't find it. :-(   I just 
tried only "outline" and there it was!:-)


Thanks,

Don

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] How to enable Code outline feature of the IDE

2017-10-20 Thread Donald Ziesig via Lazarus

Hi All!

The new code outline feature of the IDE sounds interesting but I must 
have missed something along the way. :-[


I perused what I thought were the appropriate IDE Menu items but didn't 
see anything that matched.  I have searched all the messages on this 
list and the only ones that mention this feature arrived today.  I 
looked at the release notes, etc. for 1.8 again with negative results.


What magic do I need to enable this feature? :-D

Thanks,

Don Ziesig
--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Annoyance with 1.8RC5

2017-10-15 Thread Donald Ziesig via Lazarus

On 10/15/2017 01:51 PM, Ondrej Pokorny wrote:

On 15.10.2017 17:05, Donald Ziesig via Lazarus wrote:

What can I do about this?


Find the revision that broke it and fill a bug report. And please give 
information about your OS and WS. I assume you are on Linux/Gtk2.


Ondrej



ok  I'll try


--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Annoyance with 1.8RC5

2017-10-15 Thread Donald Ziesig via Lazarus

Hi All!

I have been using RC5 for a couple of days and am annoyed by one 
change.  Maybe its a configuration item that I can't find, but I would 
really like to turn off 'Always on Top' for the Object Inspector, 
Messages, Call Stack and other IDE forms.


I've been using Delphi since version 1 and got used to being able to 
click on an IDE form to bring it to the front.  Now I have to slide it 
out of the way or minimize it (if possible) to get access to other forms 
or the running application.


What can I do about this?

Thanks,

Don

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Installation of 1.8 RC4 fails.

2017-10-13 Thread Donald Ziesig via Lazarus

On 10/13/2017 03:58 AM, Mattias Gaertner via Lazarus wrote:

On Thu, 12 Oct 2017 20:39:44 -0400
Donald Ziesig via Lazarus <lazarus@lists.lazarus-ide.org> wrote:


[...]
I've done this many times over on many machines (all Debian derivatives)
in the past and never had a problem like this.

I validated the checksums on all three files.

Then I double clicked on /home/donz/Downloads/fpc_3.0.4-rc1_amd64.deb to
activate "Package Installer".  Then clicked "Install Package".  Result
seems to be success (but with no sign of the compiler).  What is the
standard path for the installation?

Same as for 3.0.0 and 3.0.2:
/usr/lib/fpc//

What do you get when doing "dpkg -l | grep fpc"?

I got the opposite on a fresh Linux Mint 18: When using the command line 
directly there was
no error. When using the graphical installer the installation showed a
conflict error, but the package was installed successfully.

dpkg -i fpc_3.0.4-rc1_amd64.deb



[...]
I am about to remove all vestiges of Lazarus and FPC from my system and
start over, but I really would like to know what is going wrong before I
do. :'(

Probably the old 3.0.2 packages bite the new.

Mattias


Mattias,

I got it installed! 8-). The problem I had was with a bunch of 
fp-*-3.0.0 packages that were not removed when I uninstalled 1.6.2 and 
fpc 3.0.0.  They did not show up in any of the gui package managers 
either.  Only when I tried to install 3.0.4 was the fp-compiler-3.0.0* 
shown in the error messages.  I removed it and another fp-* package was 
reported.  I finally had to remove each of them individually (about 10 
or 12), then log out and back in (I think that cleared some kind of 
cache, but that is speculation on my part).  I was finally able to 
install fpc 3.0.4 and lazarus 1.8RC5.


So far it looks good.  Now I have to install all my components, then 
resume work on my current project (as a guinea pig for RC5).


Thanks for the help.

Don

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Installation of 1.8 RC4 fails.

2017-10-13 Thread Donald Ziesig via Lazarus

On 10/13/2017 03:58 AM, Mattias Gaertner via Lazarus wrote:

On Thu, 12 Oct 2017 20:39:44 -0400
Donald Ziesig via Lazarus <lazarus@lists.lazarus-ide.org> wrote:


[...]
I've done this many times over on many machines (all Debian derivatives)
in the past and never had a problem like this.

I validated the checksums on all three files.

Then I double clicked on /home/donz/Downloads/fpc_3.0.4-rc1_amd64.deb to
activate "Package Installer".  Then clicked "Install Package".  Result
seems to be success (but with no sign of the compiler).  What is the
standard path for the installation?

Same as for 3.0.0 and 3.0.2:
/usr/lib/fpc//

What do you get when doing "dpkg -l | grep fpc"?

I got the opposite on a fresh Linux Mint 18: When using the command line 
directly there was
no error. When using the graphical installer the installation showed a
conflict error, but the package was installed successfully.

dpkg -i fpc_3.0.4-rc1_amd64.deb



[...]
I am about to remove all vestiges of Lazarus and FPC from my system and
start over, but I really would like to know what is going wrong before I
do. :'(

Probably the old 3.0.2 packages bite the new.

Mattias


Mattias,

dpkg -l | grep fpc
ii  fpc 3.0.0+dfsg-2 all  Free 
Pascal - SDK suite dependency package
ii  fpc-3.0.0 3.0.0+dfsg-2 all  
Free Pascal - SDK-3.0.0 suite
ii  fpc-source 3.0.0+dfsg-2 all  
Free Pascal - SDK source code dependency package
ii  fpc-source-3.0.0 3.0.0+dfsg-2 
all  Free Pascal - SDK source code


This is consistent with:

fpc -v
Free Pascal Compiler version 3.0.0+dfsg-2 [2016/01/28] for x86_64
Copyright (c) 1993-2015 by Florian Klaempfl and others
Fatal: No source file name in command line
Fatal: Compilation aborted
Error: /usr/bin/ppcx64 returned an error exitcode

Then:

sudo dpkg -i fpc_3.0.4-rc1_amd64.deb
dpkg: regarding fpc_3.0.4-rc1_amd64.deb containing fpc:
 fpc conflicts with fpc
  fpc-3.0.0 provides fpc and is present and installed.

dpkg: error processing archive fpc_3.0.4-rc1_amd64.deb (--install):
 conflicting packages - not installing fpc
Errors were encountered while processing:
 fpc_3.0.4-rc1_amd64.deb

Unfortunately the gui installer did NOT produce any error messages so I 
was misled into thinking that it was successful.


This gives me enough information that I can continue.  I'll keep you 
informed of my progress.


Thanks,

Don

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] Debugger constantly crashing.

2017-08-27 Thread Donald Ziesig via Lazarus

On 08/27/2017 04:43 PM, Martin Frb via Lazarus wrote:

On 27/08/2017 20:51, Donald Ziesig via Lazarus wrote:


The GDB command:
"-data-evaluate-expression CQ2WORLDDM.CQWORLDDATA^"
did not return any result.

The only thing that seems to be consistent with all of the crashes is 
that the expression being evaluated is dereferencing a pointer.  (I 
might be wrong about this; I just don't recall any other cases).


Has anyone else seen this and come up with a solution, or should I 
create a bug report?


This is a bug in gdb, so we can not fix it on our end.

But a couple of notes that may help.

1) You can turn of the debug hint somewhere in the options (codetools) 
IIRC


2) Try compiling with dwarf or stabs (project options / debugging). I 
think the default is stabs, so you should try dwarf.


BUT: You need to apply that to all packages too (each package has an 
option). Easiest way to do this is "Additions and Overrides"


3) Try a different version of GDB.
I have not tested this on Linux, but on win only. But it may be 
similar on Linux.
My observation is that gdb at version 7.7 and above crashes more often 
(and especially with stabs).



Thanks Martin.  I'll try these suggestions and let you (and the list) 
know how they work.


Don


--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Debugger constantly crashing.

2017-08-27 Thread Donald Ziesig via Lazarus

Hi All,

I have been having trouble debugging some simple programs using Lazarus 
1.9 with FPC 3.0.2 on Linux Mint 18.


When I move my mouse over certain variables the debugger crashes with 
error messages similar to:


The GDB command:
"-data-evaluate-expression CQ2WORLDDM.CQWORLDDATA^"
did not return any result.

The only thing that seems to be consistent with all of the crashes is 
that the expression being evaluated is dereferencing a pointer.  (I 
might be wrong about this; I just don't recall any other cases).


This is really frustrating.  At the point where I think I am getting 
close to finding the bug, the debugger crashes :'(.  Its especially 
frustrating when I happen to move the cursor over something that I am 
not interested in and crash!


Has anyone else seen this and come up with a solution, or should I 
create a bug report?


Thanks,

Don Ziesig


--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] List down?

2017-08-10 Thread Donald Ziesig via Lazarus

On 08/10/2017 02:47 PM, wkitty42--- via Lazarus wrote:

On 08/10/2017 05:11 AM, John Landmesser via Lazarus wrote:

just to see if my post will be shown on

lazarus-ide.org




the list seems to be fine to me from wy over here...



because:

*Last message date:*/Sat Aug 5 16:27:27 CEST 2017/

/
/

/... or just holiday?
/



but i do see the same wherein the last posts were on 5 Aug 2017... 
five of them...




Likewise in Florida.


Don Z.

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] TStatusBar initialization problem.

2017-07-28 Thread Donald Ziesig via Lazarus

Hi Everyone!

I am writing a new app that will use a StatusBar at the bottom of the 
main window (just like I have done many times in the past - with both 
Delphi and Lazarus).  Strangely enough, even though I have nothing but 
the gui implemented (no app specific code, etc.), the StatusBar does NOT 
display until I manually resize the main window, at which time, it 
appears as appropriate with its two panels visible.  To isolate the 
problem further, I temporarily set the color to blue to see if it were 
only panel contents that were not showing.  In this test, the blue 
status bar again does not appear until the main form is manually resized.


I have tried a number of hacks, such as programatically changing the 
Height and/or Width during 1) OnCreate, 2) OnShow, 3) OnPaint, 4) 
OnTimer (added a hack timer and tried resizing during the event).  None 
of these worked :-(.


I am running Lazarus 1.9 dated 2017-04-17 with high resolution (144 
DPI), FPC 3.0.2 (I think I am running the qt toolset, but don't know how 
to determine that.)  This mostly works well (I have a few minor problems 
with the internal sizing of some controls and control-editors).


Does anyone have an idea for a work around, or suggestions as to where 
to find the code for TStatusBar?


Thanks,

Don Ziesig

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Building a project with generics in libraries Laz1.9, FPC 3.0.2.

2017-05-22 Thread Donald Ziesig via Lazarus

Hi All!

I have a rather large project that I have been refactoring from an 
earlier version that works. It is implemented in Laz 1.6.2. The new 
version takes considerable advantage of generics (which I learned first 
from Ada in the 1970s, then from C++ in the 1980s). The resulting code 
is much smaller and cleaner than the old code.


During the development process I noticed some strangeness while 
debugging.  Frequently I will step through code and the debugger behaves 
as if recent changes have not been made (even though the source shows 
the changes).  This has cost me days of debugging before the problem 
/miraculously /seems to be cured.  In other words I could not figure out 
why all of my earlier edits seemed to take effect without my doing 
anything explicitly to fix the problem.  (One other side effect is that 
gdb will occasionally crash when I let the mouse hover over certain 
identifiers after a breakpoint).


I have finally discovered the apparent cause and a magic (but annoying) 
workaround.


The steps in the cause:

A)

a1) Edit a library routine that contains generic code.

a2) Run with or without Debug.  (The IDE recompiles the library first).  
The code executes as if the edits never were made.


or

B)

b1) Edit a library routine that contains generic code.

b2) Compile the library using the Library Inspector.

b3) Run with or without Debug.  The code executes as if the edits never 
were made.



The magic workaround is very simple:

C)

c1) Edit a library routine that contains generic code.

c2) Compile the library using the Library Inspector.

*c3) Build the program using "Run | Cleanup and build..." or sometimes 
just "Run | Build"*  (I haven't found a pattern to decide which needs to 
be used so I currently use the Cleanup and build option).


c4) Run with or without Debug.  The edited code executes as written.


Note that the workaround is only necessary if the library's generic code 
is edited.  If the generic code is in the main code tree, the normal 
process of edit, run, debug, ... builds and runs correctly.


I think the problem is that the modules in the main source tree that 
instantiate the generics are not being updated unless the project is 
re-built explicitly (why? I don't know).


I will try to submit a bug report with a sample project after my current 
refactoring job is done (tight schedule, needs to be installed by the 
end of June).


Don Ziesig



-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] IDE complains about missing Register procedure. [SOLVED]

2017-04-27 Thread Donald Ziesig via Lazarus

On 04/27/2017 05:52 PM, Donald Ziesig via Lazarus wrote:


Well, I found a bug in Lazarus 1.9 that I thought went away with 
Lazarus 1.2.


It is not a bug in the code, just a very obscure and not well documented 
checkbox that only appears when the particular file is selected in the 
Package dialog.  The option is "Register unit" and it must be checked so 
the IDE knows what to do with it.


I am in the process of refactoring the code from libraries I created 
in Delphi back in the early 1990's (I learned a lot since then :-D).


I created a package, and copied a previously working component's .pas 
file into its directory, then added it to the package itself.  The 
Package compiles with no errors.


When I clicked on Use | Install, I got the error message:

/The package arsmagicagui does not have any "Register" procedure, 
which typically means, it does not provide any IDE addon. Installing 
it will probably only increase the size of the IDE and may even make 
it unstable./


Within the component code I have:

procedure Register;

implementation

uses
  LazLogger,
  Math;

procedure Register;
begin
  RegisterComponents('Ars Magica',[TAMFormPanel]);
end;

Within the package code I have:

uses
  AMFormPanel, LazarusPackageIntf;

implementation

procedure Register;
begin
  AMFormPanel.Register;// I added this.  It did not change the error.
end;

initialization
  RegisterPackage('arsmagicagui', @Register);
end.

Years ago, I remember getting this error while I was first 
experimenting with Lazarus, but it went away (not sure why) and I have 
been able to create many components in the intervening time.


What did I do wrong? :-[

Thanks,

Don Ziesig






-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Lazarus 1.9 ???

2017-04-27 Thread Donald Ziesig via Lazarus

Hi All!

I have been using Lazarus 1.7 with fpc 3.0.0 since February with 
excellent results (until Tuesday).  Somehow, I managed to corrupt that 
installation (spent the last two days trying to isolate newly appearing 
Segfaults in the IDE which occurred when I tried to install 
components).  Nothing I did seemed to help, including Rebuilding the 
IDE, FPC, looking for modified source files, etc.


Today I gave up and decided to try the latest Lazarus and Fpc using 
fpcupdelux.  I expected to get a later implementation of Lazarus 1.7, or 
perhaps 1.8.  To my amazement I got 1.9!


With the limited amount of testing I've done so far, it seems to be 
excellent.  I'll let you know when I successfully install a few 
components ;-).


Keep up the great work.

Don Ziesig


--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] HI-DPI Strangeness

2017-03-11 Thread Donald Ziesig via Lazarus

Hi All!

I have noticed strange behavior with Lazarus 1.7 in the HI-DPI mode.  
This took some trial and error to find since the connections are not at 
all obvious.  I am using Linux Mint 18 and have the same problem with 
both MATE and XFCE desktop managers.


When I log out/shutdown/restart and return to Lazarus, the Object 
Inspector DPI settings are all at 96 (even though they were all at 144 
when I shutdown Lazarus).  The IDE Icons are all tiny (almost 
invisible), the source editor windows all had a very small font size, 
the Form designers were all hosed, and the programs built with Lazarus 
(after the restart) all appear to be compiled with 96 DPI.  I tried 
rebuilding the IDE, but that had no impact.  The DPI remained at 96 as 
did everything else.


Here is the weird part.

After restarting, I opened a terminal and entered the command "xdpyinfo 
| grep dots" to see how it was set.  The response was 144x144.   
Apparently the window manager(s) got the message ;-) even if Lazarus did 
not.  Note that I did NOT enter any other commands except for the xdpyinfo.


BUT

When I restarted Lazarus the IDE Icons, the Form Designers and the 
source editor fonts were were correctly sized, and the programs built 
with Lazarus were correctly sized for 144dpi.


I have appropriate xrandr and xdpyinfo commands in .bash_profile and 
.bash_login (redundancy can't hurt :-D).  They don't seem to help.  I 
restarted again, opened a terminal (which showed my debug "echo"s so the 
two files were executed) and did nothing else.  I then CLOSED the 
terminal and started Lazarus.  It came up in 144dpi mode!!!.


I can not tell where the interaction between Lazarus and the window 
managers fails, and I have a work-around (open terminal before starting 
Lazarus) so the problem is not serious, but it remains an annoyance.


=

One more minor issue.  The Main Menu editor still has issues with the 
height of fonts in HI-DPI mode, as in:


Again this is not serious, just annoying.


Thanks,

Don Ziesig


-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] LCL High-DPI request for help adding images

2017-02-27 Thread Donald Ziesig via Lazarus

On 02/26/2017 04:13 PM, Ondrej Pokorny via Lazarus wrote:

On 26.02.2017 17:01, Donald Ziesig via Lazarus wrote:
I agree.  I just spent most of two days rescaling the icons with 
gimp, then registering them.  It looks good, but I sure would not 
want to have to repeat for 200%, etc.


Do you mean that you took Lazarus original 16px icons, scaled them up 
to 24px one by one and registered them for Lazarus?


Ondrej


Precisely! :-D

I tried to use Script-fu on Gimp, but I thought it would take me longer 
the learn it than doing the conversion manually.


Don

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] LCL High-DPI request for help adding images

2017-02-26 Thread Donald Ziesig via Lazarus

On 02/26/2017 10:33 AM, Vojtěch Čihák via Lazarus wrote:


Wouldn't be better (or would it be possible) to have *.svg icons in 
resources and generate *.png icons on start of IDE? Now you add 150% 
and 200%, later will come 250, 300% as 4k, 5k and 8k monitors come to 
market.


V.

__
> Od: Ondrej Pokorny via Lazarus 
> Komu: Lazarus mailing list 
> Datum: 22.02.2017 00:33
> Předmět: [Lazarus] LCL High-DPI request for help adding images
>

Update: I worked further today (unfortunately...)

I also added icon scaling support to the IDE. The IDE now can load 150%
and 200% versions of the icons. If a High-DPI icon is missing, the
normal icon is upscaled (with the worst algorithm, but that's what is
available in the IDE).

Request: search for volunteers who would add at least the most important
IDE icons (open, save, desktops - basically what is visible in the
coolbars). Please see images/README.txt for more info.

Note: the High-DPI icons are used only from 144DPI (150%) upwards.
120DPI (125%) uses the original icons (which is default on Windows, 
AFAIK).


Thanks
Ondrej

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


I agree.  I just spent most of two days rescaling the icons with gimp, 
then registering them.  It looks good, but I sure would not want to have 
to repeat for 200%, etc.


Don

-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] LCL High-DPI request for help adding images

2017-02-24 Thread Donald Ziesig via Lazarus

On 02/24/2017 05:03 AM, Ondrej Pokorny via Lazarus wrote:

On 22.02.2017 17:55, Donald Ziesig via Lazarus wrote:

Hi Ondrej!

I downloaded the latest lazarus from svn. Then make bigide.

When I started lazarus, the CoolBar is empty (except for the Save 
icon which is the correct size).  The component icons are definitely 
bigger than the last version, but appear more like 125% rather than 
the 150% that I would expect for 144 dpi.


I rebuilt the laz_images.res (at least the file time stamp changed) 
and the ide but there was no change in the empty CoolBar.


images/README.txt says:

To use a high-DPI icon, register the icon with the suffix "_150" 
(150%) or "_200" (200%). See e.g. actions/laz_save_150.png


How do I do that?  I can create the bigger icons with gimp and store 
them in the actions directory but that doesn't seem to help (tried 
this with the menu_run icon but it still uses the old one.


You have to register them in laz_images_list.txt as well and recreate 
res files. Please read the whole README.txt, not only the last chapter.


*I mis-understood what "register" meant.  I thought there was a process 
that needed to be done, rather than just adding the image file name to 
the list.  I am trying that now.*


Also, in the sub-menus there is only ONE icon (for File|Save).


What is you OS/WidgetSet? It looks like the icons don't scale for you 
- you are obviously getting empty icons.


*linux mint 18 / gtk2*


Ondrej



-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] LCL High-DPI request for help adding images

2017-02-22 Thread Donald Ziesig via Lazarus

Hi Ondrej!

I downloaded the latest lazarus from svn. Then make bigide.

When I started lazarus, the CoolBar is empty (except for the Save icon 
which is the correct size).  The component icons are definitely bigger 
than the last version, but appear more like 125% rather than the 150% 
that I would expect for 144 dpi.


I rebuilt the laz_images.res (at least the file time stamp changed) and 
the ide but there was no change in the empty CoolBar.


images/README.txt says:

To use a high-DPI icon, register the icon with the suffix "_150" (150%) 
or "_200" (200%). See e.g. actions/laz_save_150.png


How do I do that?  I can create the bigger icons with gimp and store 
them in the actions directory but that doesn't seem to help (tried this 
with the menu_run icon but it still uses the old one.


Also, in the sub-menus there is only ONE icon (for File|Save).

What am I missing?

Thanks,

Don


On 02/21/2017 06:33 PM, Ondrej Pokorny via Lazarus wrote:

Update: I worked further today (unfortunately...)

I also added icon scaling support to the IDE. The IDE now can load 
150% and 200% versions of the icons. If a High-DPI icon is missing, 
the normal icon is upscaled (with the worst algorithm, but that's what 
is available in the IDE).


Request: search for volunteers who would add at least the most 
important IDE icons (open, save, desktops - basically what is visible 
in the coolbars). Please see images/README.txt for more info.


Note: the High-DPI icons are used only from 144DPI (150%) upwards. 
120DPI (125%) uses the original icons (which is default on Windows, 
AFAIK).


Thanks
Ondrej



--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] LCL High-DPI

2017-02-21 Thread Donald Ziesig via Lazarus
One more question.  Where can I find documentation for 
TControl.ScaleCoord() or ScaleCoord96()?  It is not in the CCR.  I will 
search the source.


Don


On 02/20/2017 11:46 AM, Ondrej Pokorny via Lazarus wrote:
I'd like to announce that I finished the concept of DPI scaling in 
Lazarus / LCL.


It's quite easy for the programmer. Documented here: 
http://wiki.lazarus.freepascal.org/High_DPI (details are in "High DPI 
in Lazarus 1.7 and above").


1.) I made the Lazarus IDE High-DPI aware - the IDE itself and its 
windows should scale correctly.


2.) To make your own application use the new LCL scaling and to make 
sure your layouts don't get destroyed, do the following:


a.) Make sure you don't change the system DPI settings during the 
proccess.

b.) Update the IDE to the latest trunk and rebuild it.
c.) Open your project in the IDE.
d.) Enable LCL scaling for your application DPI awarness in Project 
Options -> Application -> "Use LCL scaling (Hi-DPI).
e.) On Windows: enable DPI awarness in Project Options -> Application. 
Decide if you want to support per monitor DPI awarness or not.

f.) Make sure TForm.Scaled=True for all your forms (default value).
g.) Make sure you use TControl.ScaleCoord() or ScaleCoord96() to scale 
coordinates during the run-time.


And you are ready. Your forms will scale both in runtime and design 
time nicely.


For those who followed my last announcement: as Zeljko and Michael 
requested, I removed the LCLScaleForms define and introduced the 
Application.Scaled property instead (that you set in step 2d). The 
default value is Application.Scaled=False.


If you keep Application.Scaled=False, there won't be any changes in 
your application.


Please report issues or comment on problems. I have still time to 
change things until Lazarus 1.8 is out (you can expect RC1 in April).


Ondrej



--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] LCL High-DPI

2017-02-21 Thread Donald Ziesig via Lazarus

Hi Ondrej!

Your work has made a major improvement in Lazarus.  It is much more 
enjoyable to use.  I have converted my most recent major APP using it 
and it was mostly straight forward.


I will continue using it and report back to you as my work permits.

Thank you,

Don Ziesig


On 02/20/2017 11:46 AM, Ondrej Pokorny via Lazarus wrote:
I'd like to announce that I finished the concept of DPI scaling in 
Lazarus / LCL.


It's quite easy for the programmer. Documented here: 
http://wiki.lazarus.freepascal.org/High_DPI (details are in "High DPI 
in Lazarus 1.7 and above").


1.) I made the Lazarus IDE High-DPI aware - the IDE itself and its 
windows should scale correctly.


2.) To make your own application use the new LCL scaling and to make 
sure your layouts don't get destroyed, do the following:


a.) Make sure you don't change the system DPI settings during the 
proccess.

b.) Update the IDE to the latest trunk and rebuild it.
c.) Open your project in the IDE.
d.) Enable LCL scaling for your application DPI awarness in Project 
Options -> Application -> "Use LCL scaling (Hi-DPI).
e.) On Windows: enable DPI awarness in Project Options -> Application. 
Decide if you want to support per monitor DPI awarness or not.

f.) Make sure TForm.Scaled=True for all your forms (default value).
g.) Make sure you use TControl.ScaleCoord() or ScaleCoord96() to scale 
coordinates during the run-time.


And you are ready. Your forms will scale both in runtime and design 
time nicely.


For those who followed my last announcement: as Zeljko and Michael 
requested, I removed the LCLScaleForms define and introduced the 
Application.Scaled property instead (that you set in step 2d). The 
default value is Application.Scaled=False.


If you keep Application.Scaled=False, there won't be any changes in 
your application.


Please report issues or comment on problems. I have still time to 
change things until Lazarus 1.8 is out (you can expect RC1 in April).


Ondrej



--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] IDE main window?

2016-12-04 Thread Donald Ziesig via Lazarus

Now that I have Lazarus 1.6.2 working :-D, I have a few questions:

Is there any way to resize the IDE main window so that it extends the 
full width of the display?  Right now it only extends 2/3 of the way 
across and I have to manually scroll the components to the right.  
Earlier versions of lazarus allowed re-sizing to full width.


Can I resize the component icons so that they can be seen without a 
magnifying glass?  It seems that the icon files are all 16x16 pixels.  I 
can use gimp to resize the individual icons, but would the ide use the 
larger images?  I did reset the linux screen resolution to 144x144 and 
lazarus' source editor responded with appropriately larger text.


Can I extend the time display of the Messages window tooltip, or can the 
messages window wrap text so the entire message is visible?


Thanks,

Don Ziesig

--
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] High Res Screen, problems with IDE

2016-11-29 Thread Donald Ziesig via Lazarus

Hi Everyone!


I have recently upgraded my linux machine to a laptop with high screen 
resolution (1920 x 1080) that for most programs is beautiful.


Unfortunately, parts of the Lazarus IDE do not respect the screen 
resolution (in at least one case only in the vertical direction!).


For example, the Menu Editor only resolves the horizontal resolution, 
resulting to the following display:



The Component Palette fails in both directions, as in:


If anyone can give me a hint as to where I should look for the code that 
causes this, I will be glad to try to patch it appropriately.


Thanks,

Don Ziesig


P.S.  Lazarus is not the only program that has similar problems, the 
Postgres Admin III program has a similar problem with vertical 
resolution when it displays table data, but that's not as critical.  The 
problems may be caused by Linux itself, but there are enough programs 
that display properly that I can't be sure.


-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
http://lists.lazarus-ide.org/listinfo/lazarus