[Lazarus] MSSQL howto catch a TMSSQLConnection Error without Messagebox?

2021-01-27 Thread Andreas Frieß via lazarus

No, befor the try is  a ping to test if the server itself is reachable.
This is done with a 'ShowOnTop' Form - but not showmodal. It looks like

isOk := pingtheserver();  // <-- here is a form with showontop
created and destoyed
if isOk then begin
  try
 (IsOk);
  except
  end;
end;

No showmodal inside the try/except block. But i will check if i need the
re-raise in the inner block.

Andreas

Am 27.01.2021 um 16:12 schrieb Mattias Gaertner via lazarus:

On Wed, 27 Jan 2021 16:02:40 +0100 (CET)
Michael Van Canneyt via lazarus  wrote:


If you don't do a re-raise, I don't understand where the dialog box
comes from, since you're catching all exceptions...

Maybe

try
      (IsOk);
except
end;

The xxx contains a ShowModal?

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


[Lazarus] MSSQL howto catch a TMSSQLConnection Error without Messagebox?

2021-01-27 Thread Andreas Frieß via lazarus

Hi Michael,

no, i did not re-raise there.

I want only a silent flag. This should done by the Result:= false in the
calling function.

regards

Andreas

Am 27.01.2021 um 12:46 schrieb Michael Van Canneyt:



On Wed, 27 Jan 2021, Andreas Frieß via lazarus wrote:


On my Raspi/Debian i got on a TMSSQLConnection a messagebox if the
server is not reachable. The connection is not my problem, but i am not
able to cach this exeption silent without poping up this messagebox.

The problem is, the messagebox pops up and want an OK or ABORT.
In my code i catch the exception, set a flag and reraise

try
  if IsOk then AConnection.Connected := true;
 except
  on E : Exception do begin
    IsOk:=false;
    raise;
  end;
 end;

The calling function does this
Quote
  Result := false;
  try
    (IsOk);
    Result := true;
  except
    on E : Exception do begin
     .


Do you also re-raise here ?



    end;
  end;

So the exception should silent catched and i can handle if a connection
is ok or not.

How can i avoid the unwanted box ?


Normally catching the exception is enough.

Michael.

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


[Lazarus] MSSQL howto catch a TMSSQLConnection Error without Messagebox?

2021-01-26 Thread Andreas Frieß via lazarus

On my Raspi/Debian i got on a TMSSQLConnection a messagebox if the
server is not reachable. The connection is not my problem, but i am not
able to cach this exeption silent without poping up this messagebox.

The problem is, the messagebox pops up and want an OK or ABORT.
In my code i catch the exception, set a flag and reraise

try
  if IsOk then AConnection.Connected := true;
 except
  on E : Exception do begin
    IsOk:=false;
    raise;
  end;
 end;

The calling function does this
Quote
  Result := false;
  try
    (IsOk);
    Result := true;
  except
    on E : Exception do begin
     .

    end;
  end;

So the exception should silent catched and i can handle if a connection
is ok or not.

How can i avoid the unwanted box ?

regards

Andreas

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


Re: [Lazarus] fpreport: Rendering Report to Printer did not work on RasPi (arm-linux)

2019-08-13 Thread Andreas Frieß via lazarus
Who is the renderer for printer (gtk2/linux/arm) used in fpreport ? The
printer itself is cupsprinters (found in OSPrinters). But i have not
the glue which renderer is used, because the output in cupsprinters is
postscript.

Have somebody a hint for the used renderer for me? Or should i file a
bug ?

With qtprinters it is correct rendered.

Andi


Andreas Frieß via lazarus wrote:

> I have created a report with fpreport (in code) and it works on
> Windows (32-bit app) with Rendering to LCLCanvas, PDF  and Printer
> without problems.
>
> On a RasPi with rasbian (on Jessy, Wheezy the same) rendering to
> LCLCanvas and PDF works, but on printer it shows not the text.
> pictures are correct rendered. The text is not rendered or only some
> points, except the footerband.  It looks in some test like the drawn
> text is overwritten.
>
> I have dived a little into fpreport and found out, it must have to do
> with Canvas.Textout in TFPReportExportCanvas.RenderMemo. The
> parameters of Canvas.TextOut are imho correct, but not the rendered
> result. If i change Canvas.TextOut to Canvas.TextRect (as in
> designmode) and use the same parameters, the text is written to the
> printer, it looks like something goes wrong on arm-linux with
> Canvas.TextOut.
>

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


[Lazarus] fpreport: Rendering Report to Printer did not work on RasPi (arm-linux)

2019-08-11 Thread Andreas Frieß via lazarus

I have created a report with fpreport (in code) and it works on Windows
(32-bit app) with Rendering to LCLCanvas, PDF  and Printer without problems.

On a RasPi with rasbian (on Jessy, Wheezy the same) rendering to
LCLCanvas and PDF works, but on printer it shows not the text. pictures
are correct rendered. The text is not rendered or only some points,
except the footerband.  It looks in some test like the drawn text is
overwritten.

I have dived a little into fpreport and found out, it must have to do
with Canvas.Textout in TFPReportExportCanvas.RenderMemo. The parameters
of Canvas.TextOut are imho correct, but not the rendered result. If i
change Canvas.TextOut to Canvas.TextRect (as in designmode) and use the
same parameters, the text is written to the printer, it looks like
something goes wrong on arm-linux with Canvas.TextOut.

I am using fpc fixes32 (42593) and Laz Fixes20 (61645) and tested with
Lazarus 2.1.0 r61504:61683M FPC 3.3.1 i386-win32-win32/win64 (42644) too

I have post this on the freepascalforum
https://forum.lazarus.freepascal.org/index.php/topic,46343.msg329973.html#msg329973
with an adapted sample of the fpreport-excample from Lazarus.

Regards

Andi

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


Re: [Lazarus] Makefile error or what else?

2019-02-18 Thread Andreas Frieß via lazarus
See https://bugs.freepascal.org/view.php?id=34787

i delete the whole installation and it works. At this time i think i
was alone with this issue. But now i see more and more people with the
same issue.

For a fast fix, delete the extra lines in the makefile.

Andreas

Joe via lazarus wrote:

> Hi,
> 
> under Raspbian Stretch (current version) on a Pi 3B+,  making of
> Lazarus 2 fails. What's the reason, how to fix?
> 
> Log:
> Executing: /usr/bin/svn info /home/pi/fpcupdeluxe/lazarus (working
> dir: ) url:  https://svn.freepascal.org/svn/lazarus/tags/lazarus_2_0_0
> Revision: 60442
> Letzter Autor: mattias
> Letzte geänderte Rev: 60307
> Letztes Änderungsdatum: 2019-02-02 21:09:45 +0100 (Sam, 02. Feb 2019)
> ...
> fpcupdeluxe: info: LazarusNativeInstaller (BuildModuleCustom:
> Lazarus):  Running make all
> fpcupdeluxe: info: LazarusNativeInstaller (BuildModuleCustom:
> Lazarus):  make. Params: 
> FPC=/home/pi/fpcupdeluxe/fpc/bin/arm-linux/fpc.sh,PP=/home/pi/fpcupdel
> uxe/fpc/bin/arm-linux/ppcarm,USESVN2REVISIONINC=0,--directory=.,INSTAL
> L_PREFIX=/home/pi/fpcupdeluxe/lazarus,FPCDIR=/home/pi/fpcupdeluxe/fpcs
> rc,FPCMAKE=/home/pi/fpcupdeluxe/fpc/bin/arm-linux/fpcmake,PPUMOVE=/hom
> e/pi/fpcupdeluxe/fpc/bin/arm-linux/ppumove,OPT=-vw-n-h-l-d-u-t-p-c-,al
> l Executing: make FPC=/home/pi/fpcupdeluxe/fpc/bin/arm-linux/fpc.sh
> PP=/home/pi/fpcupdeluxe/fpc/bin/arm-linux/ppcarm USESVN2REVISIONINC=0
> --directory=. INSTALL_PREFIX=/home/pi/fpcupdeluxe/lazarus
> FPCDIR=/home/pi/fpcupdeluxe/fpcsrc
> FPCMAKE=/home/pi/fpcupdeluxe/fpc/bin/arm-linux/fpcmake
> PPUMOVE=/home/pi/fpcupdeluxe/fpc/bin/arm-linux/ppumove
> OPT=-vw-n-h-l-d-u-t-p-c- all (working dir:
> /home/pi/fpcupdeluxe/lazarus) make: Verzeichnis
> »/home/pi/fpcupdeluxe/lazarus« wird betreten Makefile:3388: *** Es
> ist nur ein »else« pro Bedingung erlaubt. Schluss.  make: Verzeichnis
> »/home/pi/fpcupdeluxe/lazarus« wird verlassen fpcupdeluxe: ERROR:
> LazarusNativeInstaller (BuildModuleCustom: Lazarus):  make returned
> error code #512
> 
> Regards --  Joe


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


Re: [Lazarus] windows EStackOverflow if compiled with -WG

2018-07-23 Thread Andreas Frieß via Lazarus
Andreas Frieß via Lazarus wrote:

> I make a project according the sample in 
> http://wiki.freepascal.org/Form_in_DLL
> 
> Compile the programm with -WG activated and started in Commandline 
> direct, i got a EStackOverflow if i open the form in the dll
> 

With the actual trunk (fpc&Lazarus) i get a EInOutError -> Disk full

I found the reason:
When i activate LazLogger in the DLL, the error is raised. If i remove
LazLogger it works as expected.

Is this a Bug in LazLogger or by design ?

Andreas 

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


[Lazarus] windows EStackOverflow if compiled with -WG

2018-07-20 Thread Andreas Frieß via Lazarus
I make a project according the sample in 
http://wiki.freepascal.org/Form_in_DLL


Compile the programm with -WG activated and started in Commandline 
direct, i got a EStackOverflow if i open the form in the dll


Compile the programm with -WG deactivated and started in Commandline 
direct, it runs normal


Compile the programm with -WG activate and started in Lazarus (with gdb) 
it runs normal


Compile the programm with -WG deactivate and started in Lazarus (without 
gdb), i got a EStackOverflow if i open the form in the dll


Any hints whats the diffence, or can happens ?


Andreas


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


[Lazarus] Unittesting and find memleaks

2018-06-28 Thread Andreas Frieß via Lazarus
Is it possible to make a heaptrace for a (one) testcase (FPCUnit) only ? 
Or is there an other good way to test code for memleaks ?


Andreas

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


Re: [Lazarus] Lazarus win32 with fpc-3.0.4 no memory left problem

2018-05-25 Thread Andreas Frieß via Lazarus
Mattias Gaertner via Lazarus wrote:

> On Mon, 21 May 2018 21:44:59 +0200
> Andreas Frieß via Lazarus  wrote:
> 
> > If someone can backport this please. The fix from Bugreport 0031517
> > to the actual stable or must this a extra feature report ?
> 
> See
> https://bugs.freepascal.org/view.php?id=31517
> 
> Is the bug present in fpc 3.0.4?
> 
IMHO yes. 

I think its not direct a bug, but the linking of Lazarus need sometimes
(with more packages) more memory in fpc.
The same problem occours if you ask for more memory on windows.

See also
http://forum.lazarus.freepascal.org/index.php/topic,40351.0.html

> Mattias

Andreas


 A shot test for win 32 from the thread above
--
procedure TForm1.BuTestitClick(Sender: TObject);
const
  coTestsize = 10*1024*1024;
  coKB = 1024;
  coMB = coKB * 1024;
var
  list : TList;
  i,j,aktIDX : Integer;
begin
  list := TList.Create;
  //
  for i := 1 to 1 do begin
if i mod 5 = 0 then Memo1.Append('Used size: ' +
IntToStr((i*coTestsize) div (coMB))+ ' MB');
aktIDX := list.Add(getmem(coTestsize)); // List of PChar
if list.Items[aktIDX] = pointer(0) then begin
  Memo1.Append('No memory at : ' + IntToStr(i));
  exit;
end;
for j := 0 to coTestsize-1 do begin
  PChar(list.Items[aktIDX])[j] := #$FA;
end;
  end;
  list.Free;
end;
 

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


Re: [Lazarus] Lazarus win32 with fpc-3.0.4 no memory left problem

2018-05-21 Thread Andreas Frieß via Lazarus
If someone can backport this please. The fix from Bugreport 0031517 to
the actual stable or must this a extra feature report ?

Andreas


Werner Pamler via Lazarus wrote:

> Am 13.05.2018 um 12:00 schrieb zeljko via Lazarus:
> > Hi,
> > Using trunk lazarus r57911 and fpc-3.0.4 (32 bit), Windows 10.
> > When rebuilding ide from lazarus got "No memory left" while linking
> > IDE.  I have bunch of 3rd party packages so I guess that too many
> > units triggers this error since "make bigide" from cmd works fine.
> > With fpc-3.0.0 everything works fine. Both win32 and win32-qt shows 
> > same error.
> > Does anybody have such problem ? Is there any way to fix it ?
> > Does 3.1.1 trunk have such problem ?
> 
> I have that issue, too. It happens on the 32-bit IDE only, when
> "many" packages are installed. Since I work on the JVCL port which
> consists of a lot of packages, this happens regularly. I have to
> remove other packages to get some memory back.
> 
> There was a discussion on this issue recently: 
> https://forum.lazarus.freepascal.org/index.php/topic,40351.0.html. If
> I read correctly they seemed to fix the issue by a modified pp.pas
> (reply -62), I did not test it myself, though.


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


Re: [Lazarus] Dark themed lazarus

2018-05-04 Thread Andreas Frieß via Lazarus
Maciej Izak via Lazarus wrote:

> 2018-04-05 12:16 GMT+02:00 Anthony Walter via Lazarus <
> lazarus@lists.lazarus-ide.org>:
> 
> > Next I might tackle the lagginess in drag moving controls on the
> > form designer. Does that seem like a laggy problem to anyone else?
> > 
> 
> Probably you mean : https://bugs.freepascal.org/view.php?id=33486

This Bugreport have not only to do with moving a component. Switching
between code and design is the strangest lag.

> 
> I was not able to spend enough time on this problem, so any patch is
> welcome.
> 
> -- 
> Best regards,
> Maciej Izak

Andreas

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


Re: [Lazarus] fpreport designer

2018-02-26 Thread Andreas Frieß via Lazarus

The second bug is in the standalone-designer too.

Andreas


Am 26.02.2018 um 19:03 schrieb Andreas Frieß via Lazarus:

Acknowledge of the two Bugs

-> Bug1: The page properties are not displayed in the designer's 
object inspector

-> Bug2: The designer freezes and cannot be closed anymore

i can reproduce this with actual trunk fpc/ trunk Lazarus.


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


Re: [Lazarus] fpreport designer

2018-02-26 Thread Andreas Frieß via Lazarus

Acknowledge of the two Bugs

-> Bug1: The page properties are not displayed in the designer's object 
inspector

-> Bug2: The designer freezes and cannot be closed anymore

i can reproduce this with actual trunk fpc/ trunk Lazarus.

Another goal is, if you install lazideintfreport, the lazarus won't 
start without a message, if you switch logging on, you find the reason: 
freetype-56.dll is missing. The problem is, you have NO indication, no 
messagebos, nothing, why Lazarus wont start and exit immedatly.


sing config file C:\Data\lazdev\trunk_trunk\lazarus\lazarus.cfg
[FORMS.PP] ExceptionOccurred
  Sender=EInOutError
  Exception=Can not load Freetype library "freetype-6.dll". Check your 
installation.

  Stack trace:
  $00E41D99  INITIALIZEFREETYPE,  line 529 of 
./fcl-image/src/libfreetype.inc
  $00E41E1D  INITIALIZEFREETYPE,  line 536 of 
./fcl-image/src/libfreetype.inc

  $00E41E9A  FREETYPEHDYN_$$_init$,  of ./fcl-image/src/libfreetype.inc
TApplication.HandleException Can not load Freetype library 
"freetype-6.dll". Check your installation.

  Stack trace:
  $00E41D99  INITIALIZEFREETYPE,  line 529 of 
./fcl-image/src/libfreetype.inc
  $00E41E1D  INITIALIZEFREETYPE,  line 536 of 
./fcl-image/src/libfreetype.inc

  $00E41E9A  FREETYPEHDYN_$$_init$,  of ./fcl-image/src/libfreetype.inc


Andreas

Am 26.02.2018 um 18:52 schrieb patspiper via Lazarus:

On 26/02/18 19:27, Michael Van Canneyt via Lazarus wrote:

1. Agreed about the use of trunk FPC/lazarus.
I can't build the Lazarus IDE with FPC trunk because of an FPC bug 
(#33230) that makes a package fail to compile.


2. In the standalone designer, I can reproduce the bug in step 8, but 
not the one in step 4.


I will use the standalone designer (with FPC trunk) for the time being.

For step 4, add the page right after firing the designer (don't create 
a new report). Refer to bug report #33234.


I will proceed with creating bug reports. However, the bug tracker 
lacks an fpreport category. I am currently filing the bugs under 
packages.


Stephano


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


Re: [Lazarus] fpreport designer

2018-02-26 Thread Andreas Frieß via Lazarus
Actual it make IMHO only sense with the actual trunk fpc (and trunk 
Lazarus). Pls use the standalone designer too, to make a check if the 
problem is not only in the fp-report component.


Andreas


Am 25.02.2018 um 20:33 schrieb patspiper via Lazarus:

On 25/02/18 21:09, Michael Van Canneyt via Lazarus wrote:

On Sun, 25 Feb 2018, patspiper via Lazarus wrote:

Hi,

I am able to create fpreports by code.

However the graphical designer is riddled with serious bugs making 
it impossible to use. I haven't succeeded in creating a single 
report. Is something wrong with my installation, or is the designer 
still in alpha stage? I'll create bug reports if it's the latter case.


Hm. I don't know your installation of course, so it is hard to 
comment on that.


But you should definitely be able to make reports. I know I do. But 
then, I made it, so I will probably avoid doing things that confuse 
the designer...


If you do experience bugs, please report them, I will do my best to 
fix them ASAP.


I use FPC 3.0.5 with fpreport from trunk along with lazarus trunk.

Just to test the waters:

1- Create a new application
2- Place a TFPReport on the form
3- Double click the FPReport component to open the designer
4- Add a page by clicking the add page toolbutton
-> Bug1: The page properties are not displayed in the designer's 
object inspector

5- Add a databand and enlarge it
6- Click on memo toolbutton
7- Click on the databand without dragging. The memo will be created 
with 0 size.

8- Resize the memo with the mouse
-> Bug2: The designer freezes and cannot be closed anymore

If you can confirm these 2 bugs, i'll start creating bug reports in 
the tracker.


Stephano


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


Re: [Lazarus] OI / App crash - components with published interfaces

2018-02-18 Thread Andreas Frieß via Lazarus
THX for the information Martin, i have changed the line and it looks 
good. Very good.


This code is a prototype for me to inhibt unwanted Ref Counter changes.


Am 18.02.2018 um 16:32 schrieb Martin Schreiber via Lazarus:

pointer(FObjectHasInterface):= nil;


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


Re: [Lazarus] OI / App crash - components with published interfaces

2018-02-18 Thread Andreas Frieß via Lazarus
Now i have inserted code in the TIntfComp to remove the link to the 
interface




destructor TIntfComp.Destroy;
begin
  FObjectHasInterface := nil;  // <<-- Crahe here now
  inherited Destroy;
end;


And now i it crash explicitly  at the line wher i try to 'unlink'. And 
the Callstack from Lazarus give me some information. The setting to nil, 
call fpc_intf_assign and  call IUnknown(D)._Release. But this is 
absolutly unwated (and unexpected) for me here.


How can i release the link without calling  fpc_intf_assign. Or what is 
my mistake of understanding ?


Andreas

---

#0 fpc_intf_assign at :0
#1 DESTROY(0x3868750, 0x1) at intfcomp.pas:76
#2 CLASSES$_$TCOMPONENT_$__$$_DESTROYCOMPONENTS at :0
#3 CLASSES$_$TCOMPONENT_$__$$_DESTROY at :0
#4 ?? at :0
#5 DESTROY(0x3838d38, 0x0) at include\control.inc:5146
#6 DESTROY(0x3838d38, 0x0) at include\wincontrol.inc:6626
#7 DESTROY(0x3838d38, 0x0) at include\customcontrol.inc:40
#8 DESTROY(0x3838d38, 0x0) at include\scrollingwincontrol.inc:316
#9 DESTROY(0x3838d38, 0x1) at include\customform.inc:212
#10 SYSTEM$_$TOBJECT_$__$$_FREE at :0
#11 FREEUSEDOBJECTS(0x38648d8) at uoitest.pas:161
#12 BUFREECLICK(0x38648d8, 0x3865a58) at uoitest.pas:139
---


Am 17.02.2018 um 10:53 schrieb Andreas Frieß via Lazarus:
I have an appcrash when i use components with interfaces in the 
published part. See also Bug 32919. I have now simpilied the problem 
and isolated from Lazarus itself.


The component is on https://github.com/afriess/LazarusBug0032919 in 
OITestBasic, together with the testproject shown here.


Somethigs goes wrong , if call free for the Form ( SIGSEGV ). A 
sencond issue is, i did not see the value of the property 
ObjectHasInterface in the OI.  But i see the value if i click on the 
Combobox.


My Question:

Did i miss something in the definition of the Components ?

 definition components ---

type
  // define the Interface
  ITestInterface =  interface
  function OnlyDummy: integer;
    end;

  { TIntfComp }
  TIntfComp = class(TComponent)
  private
    FObjectHasInterface: ITestInterface;
    function GetObjectHasInterface: ITestInterface;
    procedure SetObjectHasInterface(AValue: ITestInterface);
  published
    property ObjectHasInterface: ITestInterface read 
GetObjectHasInterface write SetObjectHasInterface;

  end;

  { TCompHasIntf }
  TCompHasIntf = class(TComponent, ITestInterface)
  public
    function OnlyDummy: integer;
  end;

- test programm 

    DUT := TObjectInspectorDlg.Create(nil);
    DUT.Caption:= 'My ObjectInspector';

    // create the PropertyEditorHook (the interface to the properties)
    ThePropertyEditorHook:=TPropertyEditorHook.Create(DUT);
    DUT.PropertyEditorHook:=ThePropertyEditorHook;

    // Create components
    ATestForm :=  TForm.Create(nil);
    ATestForm.Name:= 'Main';

    ATestIntf := TIntfComp.Create(ATestForm);   // This componnets 
can hold a component with interface

    ATestIntf.Name := 'ATestIntf';
    ATestHasIntf := TCompHasIntf.Create(ATestForm); // This component 
has an Interface

    ATestHasIntf.Name:= 'ATestHasIntf';
    ATestIntf.ObjectHasInterface := ATestHasIntf;
    ATestIntf.GetParentComponent;
    ThePropertyEditorHook.LookupRoot:=ATestForm;

    PerList:=TPersistentSelectionList.Create;
    PerList.Add(ATestForm);
    DUT.Selection:=PerList;
    PerList.Free;

    DUT.Show;

...

  if DUT <> nil then begin
    ATestForm.Free;   // <- Appcrash
    FreeAndNil(DUT);
  end;
--- End --


-- Stack 

#0 fpc_intf_decr_ref at :0
#1 fpc_finalize at :0
#2 ?? at :0
#3 SYSTEM_$$_SETVARIANTMANAGER$TVARIANTMANAGER at :0
#4 ?? at :0
#5 DESTROY(0x3aa8868, 0x0) at include\control.inc:5146
#6 DESTROY(0x3aa8868, 0x0) at include\wincontrol.inc:6626
#7 DESTROY(0x3aa8868, 0x0) at include\customcontrol.inc:40
#8 DESTROY(0x3aa8868, 0x0) at include\scrollingwincontrol.inc:316
#9 DESTROY(0x3aa8868, 0x1) at include\customform.inc:212
#10 SYSTEM$_$TOBJECT_$__$$_FREE at :0
#11 FREEUSEDOBJECTS(0x3ad46f8) at uoitest.pas:161
#12 BUFREECLICK(0x3ad46f8, 0x3ad5878) at uoitest.pas:139
#13 CLICK(0x3ad5878) at include\control.inc:2929
#14 CLICK(0x3ad5878) at include\buttoncontrol.inc:55
#15 CLICK(0x3ad5878) at include\buttons.inc:169
#16 WMDEFAULTCLICKED(0x3ad5878, {MSG = 66567, WPARAM = 0, LPARAM = 0, 
RESULT = 0, WPARAMLO = 0, WPARAMHI = 0, WPARAMFILLER = {}, LPARAMLO = 
0, LPARAMHI = 0, LPARAMFILLER = {}, RESULTLO = 0, RESULTHI = 0, 
RESULTFILLER = {}}) at include\buttoncontrol.inc:21

#17 SYSTEM$_$TOBJECT_$__$$_DISPATCH$formal at :0
#18 ?? at :0
#19 VMT_$STDCTRLS_$$_TBUTTONCONTROL at :0
#20 VMT_$STDCTRLS_$$_TCUSTOMSTATICTEXT$indirect at :0
#21 STDCTRLS$_$TBUTTONCONTROL_$__$$_ISCHECKEDSTORED$$BOOLEAN at :0
#22 WNDPROC(0x3ad5878, {MSG = 6

[Lazarus] OI / App crash - components with published interfaces

2018-02-17 Thread Andreas Frieß via Lazarus
I have an appcrash when i use components with interfaces in the 
published part. See also Bug 32919. I have now simpilied the problem and 
isolated from Lazarus itself.


The component is on https://github.com/afriess/LazarusBug0032919 in 
OITestBasic, together with the testproject shown here.


Somethigs goes wrong , if call free for the Form ( SIGSEGV ). A sencond 
issue is, i did not see the value of the property ObjectHasInterface in 
the OI.  But i see the value if i click on the Combobox.


My Question:

Did i miss something in the definition of the Components ?

 definition components ---

type
  // define the Interface
  ITestInterface =  interface
  function OnlyDummy: integer;
    end;

  { TIntfComp }
  TIntfComp = class(TComponent)
  private
    FObjectHasInterface: ITestInterface;
    function GetObjectHasInterface: ITestInterface;
    procedure SetObjectHasInterface(AValue: ITestInterface);
  published
    property ObjectHasInterface: ITestInterface read 
GetObjectHasInterface write SetObjectHasInterface;

  end;

  { TCompHasIntf }
  TCompHasIntf = class(TComponent, ITestInterface)
  public
    function OnlyDummy: integer;
  end;

- test programm 

    DUT := TObjectInspectorDlg.Create(nil);
    DUT.Caption:= 'My ObjectInspector';

    // create the PropertyEditorHook (the interface to the properties)
    ThePropertyEditorHook:=TPropertyEditorHook.Create(DUT);
    DUT.PropertyEditorHook:=ThePropertyEditorHook;

    // Create components
    ATestForm :=  TForm.Create(nil);
    ATestForm.Name:= 'Main';

    ATestIntf := TIntfComp.Create(ATestForm);   // This componnets 
can hold a component with interface

    ATestIntf.Name := 'ATestIntf';
    ATestHasIntf := TCompHasIntf.Create(ATestForm); // This component 
has an Interface

    ATestHasIntf.Name:= 'ATestHasIntf';
    ATestIntf.ObjectHasInterface := ATestHasIntf;
    ATestIntf.GetParentComponent;
    ThePropertyEditorHook.LookupRoot:=ATestForm;

    PerList:=TPersistentSelectionList.Create;
    PerList.Add(ATestForm);
    DUT.Selection:=PerList;
    PerList.Free;

    DUT.Show;

...

  if DUT <> nil then begin
    ATestForm.Free;   // <- Appcrash
    FreeAndNil(DUT);
  end;
--- End --


-- Stack 

#0 fpc_intf_decr_ref at :0
#1 fpc_finalize at :0
#2 ?? at :0
#3 SYSTEM_$$_SETVARIANTMANAGER$TVARIANTMANAGER at :0
#4 ?? at :0
#5 DESTROY(0x3aa8868, 0x0) at include\control.inc:5146
#6 DESTROY(0x3aa8868, 0x0) at include\wincontrol.inc:6626
#7 DESTROY(0x3aa8868, 0x0) at include\customcontrol.inc:40
#8 DESTROY(0x3aa8868, 0x0) at include\scrollingwincontrol.inc:316
#9 DESTROY(0x3aa8868, 0x1) at include\customform.inc:212
#10 SYSTEM$_$TOBJECT_$__$$_FREE at :0
#11 FREEUSEDOBJECTS(0x3ad46f8) at uoitest.pas:161
#12 BUFREECLICK(0x3ad46f8, 0x3ad5878) at uoitest.pas:139
#13 CLICK(0x3ad5878) at include\control.inc:2929
#14 CLICK(0x3ad5878) at include\buttoncontrol.inc:55
#15 CLICK(0x3ad5878) at include\buttons.inc:169
#16 WMDEFAULTCLICKED(0x3ad5878, {MSG = 66567, WPARAM = 0, LPARAM = 0, 
RESULT = 0, WPARAMLO = 0, WPARAMHI = 0, WPARAMFILLER = {}, LPARAMLO = 0, 
LPARAMHI = 0, LPARAMFILLER = {}, RESULTLO = 0, RESULTHI = 0, 
RESULTFILLER = {}}) at include\buttoncontrol.inc:21

#17 SYSTEM$_$TOBJECT_$__$$_DISPATCH$formal at :0
#18 ?? at :0
#19 VMT_$STDCTRLS_$$_TBUTTONCONTROL at :0
#20 VMT_$STDCTRLS_$$_TCUSTOMSTATICTEXT$indirect at :0
#21 STDCTRLS$_$TBUTTONCONTROL_$__$$_ISCHECKEDSTORED$$BOOLEAN at :0
#22 WNDPROC(0x3ad5878, {MSG = 66567, WPARAM = 0, LPARAM = 0, RESULT = 0, 
WPARAMLO = 0, WPARAMHI = 0, WPARAMFILLER = {}, LPARAMLO = 0, LPARAMHI = 
0, LPARAMFILLER = {}, RESULTLO = 0, RESULTHI = 0, RESULTFILLER = {}}) at 
include\wincontrol.inc:5406

#23 DELIVERMESSAGE(0x3ad5878, 0) at lclmessageglue.pas:112
#24 DOWINDOWPROC(0x3b0d780) at win32\win32callback.inc:2534
#25 WINDOWPROC(199064, 273, 22648, 1705918) at win32\win32callback.inc:2696
#26 CUSTOMFORMWNDPROC(199064, 273, 22648, 1705918) at 
win32\win32wsforms.pp:386

#27 USER32!AddClipboardFormatListener at :0
#28 USER32!EndTask at :0
#29 DEBUGSTART_$WIN32WSFORMS at :0
#30 USER32!EndTask at :0
#31 ?? at :0
#32 USER32!EndTask at :0
#33 DEBUGSTART_$WIN32WSFORMS at :0
#34 USER32!SendMessageW at :0
#35 CreateMappedBitmap at :0
#36 ImageList_GetIconSize at :0
#37 USER32!AddClipboardFormatListener at :0
#38 USER32!EndTask at :0
#39 ImageList_GetIconSize at :0
#40 USER32!EndTask at :0
#41 ?? at :0
#42 USER32!EndTask at :0
#43 ImageList_GetIconSize at :0
#44 USER32!CallWindowProcW at :0
#45 CALLDEFAULTWINDOWPROC(1705918, 514, 0, 1310774) at 
win32\win32callback.inc:97

#46 DOWINDOWPROC(0x3b0d610) at win32\win32callback.inc:2442
#47 WINDOWPROC(1705918, 514, 0, 1310774) at win32\win32callback.inc:2696
#48 BUTTONWNDPROC(1705918, 514, 0, 1310774) at win32\win32wsstdctrls.pp:1791
#49 USER32!AddClipboardFormatListener at :0
#50 USER32!EndTask at :0
#51 
WIN32WSSTDCTRLS$_$TWIN32WSBUTTONCONTROL_$__

Re: [Lazarus] Nested Components in a Form at runtime

2018-02-15 Thread Andreas Frieß via Lazarus
Ondrej Pokorny via Lazarus wrote:

> I didn't know you can use the object inspector to inspect 
> controls/components in runtime. How to enable it? Is this documented 
> somewhere?
> 
> Ondrej

Yes, Lazarus/examples/objectinspetor/ is an example. My tests based on
this and mine is here https://github.com/afriess/LazarusBug0032919
because i am searching for a problem of using components with published
interfaces, see bug

0032919: Components with published properties of type "interface" does
not work, Access violation in IDE

My try is to isolate the problem completly, and i found only very
basically tests for the ObjectInspetor itself. If there are tests pls
correct me. So i want to write code to test this without recompiling
and debugging Lazarus itself.

Andreas

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


[Lazarus] Nested Components in a Form at runtime

2018-02-15 Thread Andreas Frieß via Lazarus
For testing purposes, i want to create a form at runtime with chained
panels - to make it simple.

I use this code


  // Create components
  ATestForm :=  TForm.Create(nil);
  ATestForm.Name:= 'Main';
  // Create a Panel
  ATestPanel := TPanel.Create(ATestForm);
  ATestPanel.Parent:=ATestForm;
  ATestPanel.Name:='PanelA';
  ATestPanel.Caption:= 'Panel';
  // Create in the panel a panel (to see the chain)
  ATestPanelSub := TPanel.Create(ATestPanel);
  ATestPanelSub.Parent := ATestPanel;
  ATestPanelSub.Name:= 'SubPanelA';
  ATestPanelSub.Caption:= 'Sub Panel';

but in the ObjectInspector (used at runtime) i see only the PanelA, not
the nested ATestPanel. What do i wrong or have misunderstood ?

What is the differnt to Lazarus at desdigntime ? When i place there a a
Pnale in a Panel it works.

Andreas   

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


Re: [Lazarus] fpReport - can not render pagefooter

2017-10-01 Thread Andreas Frieß via Lazarus
Done. The FAQ is started.

ANdreas

Michael Van Canneyt via Lazarus wrote:

> 
> Sure.
> 
> You can add pages to the wiki about fpreport:
> 
> http://wiki.freepascal.org/FPReport
> 
> I suggest adding a new page
> 
> http://wiki.freepascal.org/FPReport_FAQ
> 
> and linking to it from the main page. But don't add the FAQ directly
> in the main page itself.
> 
> Michael.
> 

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


Re: [Lazarus] fpReport - can not render pagefooter

2017-09-30 Thread Andreas Frieß via Lazarus
Is it possible to make a FAQ for fpreport ?

Regards
 Andreas

Graeme Geldenhuys via Lazarus wrote:

> On 2017-09-27 09:38, Andreas Frieß via Lazarus wrote:
> > What is my mistake of understanding ?
> 
> You made a couple of mistakes and highlighted a bug in the PDF
> exporter.
> 
> Mistakes:
> 
... 
> 
> Regards,
>Graeme


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


Re: [Lazarus] fpReport - can not render pagefooter

2017-09-27 Thread Andreas Frieß via Lazarus

THX Graeme

In windows this is possible and running: -> I have my sample extended

procedure TForm1.FormActivate(Sender: TObject);
begin
  if not FInit then begin
    gTTFontCache.ReadStandardFonts;
    gTTFontCache.BuildFontCache;
    if PaperManager.PaperCount=0 then
  PaperManager.RegisterStandardSizes;
    FInit:= true;
  end;
end;

The problem with fontcache, is not (maybe direct) visible in the demo on 
FPReport Usage.


BTW: point 3 -> the code is copied direct from the 'designer' :-) not 
made on my own - lol.


Bugreport for the designer problem with orientation is 32470, i will 
check this and close if running.


Andreas


Am 27.09.2017 um 12:50 schrieb Graeme Geldenhuys via Lazarus:

On 2017-09-27 09:38, Andreas Frieß via Lazarus wrote:

What is my mistake of understanding ?


You made a couple of mistakes and highlighted a bug in the PDF exporter.

Mistakes:

1.  You never registered the standard page sizes with:
 PaperManager.RegisterStandardSizes;

2.  Your report used LiberationSans font. Make sure you added
    the search paths to the font cache. eg:

  {$IFDEF UNIX}
    gTTFontCache.SearchPath.Add(GetUserDir + '.fonts/');

gTTFontCache.SearchPath.Add('/data/devel/Wisa/fonts/Liberation/');
  {$ENDIF}

3.  You positioned a lot of reporting elements overlapping each
    other. Correct positioning will help you see things better. ;-)


Bug:

   The PDF exporter didn't handle Page.Orientation of Landscape
   correctly, and rendered such pages from the bottom upwards.
   I supplied a patch to FPC's Mantis so hopefully Michael or
   somebody could commit that soon.

  https://bugs.freepascal.org/view.php?id=32478


After all that, the report renders just fine.


ps:
  Note that I compiled your project using the latest fpReport from
  FPC Trunk. I simply set the correct Unit Source Path in the project.
  You don't need to use FPC Trunk compiler - I used FPC 2.6.4.


Regards,
  Graeme



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


[Lazarus] fpReport -> dll loading Windows

2017-08-21 Thread Andreas Frieß via Lazarus

The loading of the freetype.dll is not optimal under Windows (10).

I have inserted the packages for Lazarus for fpReport and after the 
start i got an erroer because freetype-6.dll could not found (it reside 
in windows/system32) and the programm should be new installed.


I know the solution, but i think in freetypeh.pp should also search in 
the windowspath and not only in the programm dir and load the dll 
dynamicly.


Andreas


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


Re: [Lazarus] fpReport -> Lazarus reportdsg.lpr

2017-08-21 Thread Andreas Frieß via Lazarus
Is is not better to call the standard fonts of the system in 
TFPReportDesignerForm.FormCreate(Sender: TObject); ?


  if gTTFontCache.SearchPath.Count=0 then
begin
gTTFontCache.SearchPath.Add(ExtractFilePath(ParamStr(0))+'../demos/fonts/');
gTTFontCache.SearchPath.Add(GetUserDir + '.fonts/');
{$IFDEF UNIX}
gTTFontCache.SearchPath.Add('/usr/share/fonts/truetype/ubuntu-font-family/');
gTTFontCache.SearchPath.Add('/usr/share/fonts/truetype/dejavu/');
{$ENDIF}
end;
  if (gTTFontCache.Count=0) then
gTTFontCache.BuildFontCache;
  if (gTTFontCache.Count=0) then// <---
gTTFontCache.ReadStandardFonts;// <---

Because the standardfonts are not read in the designer.

Andreas



Am 21.08.2017 um 11:58 schrieb Andreas Frieß via Lazarus:

At first this should for the visual part (Designer eg.)

And should for windows this not added ? Because in windows the fonts 
should reside in %windir%\Fonts (see MS documentation)


  function GetWinDirFonts: string;
  var
dir: array [0..MAX_PATH] of Char;
  begin
GetWindowsDirectory(dir, MAX_PATH);
Result :=  StrPas(dir)+DirectorySeparator+'Fonts';
  end;

and

  {$ifdef mswindows}
  SearchPath.Add(GetWinDir);
  SearchPath.Add(GetWinDirFonts);
  {$endif}

in fpttf.pp around line 560

Andreas

Am 21.08.2017 um 11:49 schrieb Graeme Geldenhuys via Lazarus:

On 2017-08-21 10:35, Andreas Frieß via Lazarus wrote:
It is possible to use a standard font and give a warning instead of 
fire

an exception.

Eg. Font  not found, using standardfont instead  ?


I don't like that. First, how are you going to display the warning? 
Remember fpReport was designed to be able to run from console or 
headless servers too, not just desktop apps. Secondly, how are you 
going to substitute the font? Which font will you choose, and how 
will you make that choice? Using equivalent font metrics values, 
simply by name, some random standard font that might make your report 
look crap? My personal opinion - I like to see a report the way I 
designed it or not at all (until I fixed what was missing or broken).


Regards,
  Graeme





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


Re: [Lazarus] fpReport -> Lazarus reportdsg.lpr

2017-08-21 Thread Andreas Frieß via Lazarus

At first this should for the visual part (Designer eg.)

And should for windows this not added ? Because in windows the fonts 
should reside in %windir%\Fonts (see MS documentation)


  function GetWinDirFonts: string;
  var
dir: array [0..MAX_PATH] of Char;
  begin
GetWindowsDirectory(dir, MAX_PATH);
Result :=  StrPas(dir)+DirectorySeparator+'Fonts';
  end;

and

  {$ifdef mswindows}
  SearchPath.Add(GetWinDir);
  SearchPath.Add(GetWinDirFonts);
  {$endif}

in fpttf.pp around line 560

Andreas

Am 21.08.2017 um 11:49 schrieb Graeme Geldenhuys via Lazarus:

On 2017-08-21 10:35, Andreas Frieß via Lazarus wrote:

It is possible to use a standard font and give a warning instead of fire
an exception.

Eg. Font  not found, using standardfont instead  ?


I don't like that. First, how are you going to display the warning? 
Remember fpReport was designed to be able to run from console or 
headless servers too, not just desktop apps. Secondly, how are you 
going to substitute the font? Which font will you choose, and how will 
you make that choice? Using equivalent font metrics values, simply by 
name, some random standard font that might make your report look crap? 
My personal opinion - I like to see a report the way I designed it or 
not at all (until I fixed what was missing or broken).


Regards,
  Graeme



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


Re: [Lazarus] fpReport -> Lazarus reportdsg.lpr

2017-08-21 Thread Andreas Frieß via Lazarus
It is possible to use a standard font and give a warning instead of fire 
an exception.


Eg. Font  not found, using standardfont instead  ?

Andreas


Am 21.08.2017 um 11:25 schrieb Graeme Geldenhuys via Lazarus:

On 2017-08-21 10:18, Michael Van Canneyt wrote:



/usr/local/share/fonts
/usr/local/lib/X11/fonts
fonts

~/.fonts

Should indeed be easy to parse and handle...


I'll make it so. I guess the best option would be to add it as an 
option API call, so if somebody wants it, simply call 
.AddStandardFontPaths(). For those that don't want those font 
paths, simply do nothing.


Regards,
  Graeme



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


[Lazarus] fpReport -> Lazarus reportdsg.lpr

2017-08-21 Thread Andreas Frieß via Lazarus

I think there ara som issues with the fonts.

frmreportdesignermain.pp around line 395

  if gTTFontCache.SearchPath.Count=0 then
begin
{$IFDEF UNIX}
gTTFontCache.SearchPath.Add(ExtractFilePath(ParamStr(0))+'../demos/fonts/'); 


gTTFontCache.SearchPath.Add(GetUserDir + '.fonts/');
gTTFontCache.SearchPath.Add('/usr/share/fonts/truetype/ubuntu-font-family/'); 


gTTFontCache.SearchPath.Add('/usr/share/fonts/truetype/dejavu/');
{$ENDIF}
end;
  if (gTTFontCache.Count=0) then
gTTFontCache.BuildFontCache;  //  calls directly to fpTTF

in fpTTF

procedure TFPFontCacheList.BuildFontCache;
var
  lPath: String;
  i: integer;
begin
  if FSearchPath.Count < 1 then
raise ETTF.Create(rsNoSearchPathDefined);  // here is the exception 
raised


I think in windows is no searchpath definded by default. The lines in 
should: because its also true for windows.


  if gTTFontCache.SearchPath.Count=0 then
begin
gTTFontCache.SearchPath.Add(ExtractFilePath(ParamStr(0))+'../demos/fonts/'); 


gTTFontCache.SearchPath.Add(GetUserDir + '.fonts/');
{$IFDEF UNIX}
gTTFontCache.SearchPath.Add('/usr/share/fonts/truetype/ubuntu-font-family/'); 


gTTFontCache.SearchPath.Add('/usr/share/fonts/truetype/dejavu/');
{$ENDIF}
end;

-

If i say create a new report, another issue is, the DPI settings in 
Ruler are not initialised or set. So you get un runtimeerror here


procedure TDrawRuler.RecalcParams;
var I:Integer;
begin
  FPPU:=PixelsPerUnit(DPI,FUnits);// DPI is zero
  FMajorTicks:=(DPI/FPPU);  //<- FFPPU is zero -> 
divison by zero!

  I:=Trunc(FMajorTicks);
  case I of

Fix:

constructor TDrawRuler.Create(ACanvas: TCanvas);
begin
  FCanvas:=ACanvas;
  FFont:=TFont.Create;
  Color:=clWhite;
  FTickColor:=cldkGray;
  FType:=rtTop;
  FUnits:=ruCm;
  FZeroOffset:=0;
  FDPI:=96;//<--- should be an basic value
  RecalcParams;
end;


Andreas

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


Re: [Lazarus] fpReport released

2017-08-21 Thread Andreas Frieß via Lazarus
Thanks, its true for the app in fpc directory. So i have to look for the 
Lazarus Demos/Designer too.


Andreas


Am 21.08.2017 um 08:59 schrieb Michael Van Canneyt via Lazarus:



On Mon, 21 Aug 2017, Andreas Frieß via Lazarus wrote:

I'm on Win10 Pro/64 1703. The needed fonts are not found by the 
program, because they are not in my system (%windir%/fonts).   In 
fpTTF only the WinDir is added to the searchlist. So an Exception is 
raised and the execution of the lcldemo stops here. The fonts are in 
the fcl-report/demos/fonts.


The demos are normally adding the current dir+fonts to the search path.
udapp line 241.

Michael.




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


Re: [Lazarus] fpReport released

2017-08-20 Thread Andreas Frieß via Lazarus
I'm on Win10 Pro/64 1703. The needed fonts are not found by the program, 
because they are not in my system (%windir%/fonts).   In fpTTF only the 
WinDir is added to the searchlist. So an Exception is raised and the 
execution of the lcldemo stops here. The fonts are in the 
fcl-report/demos/fonts.


Regards

Andreas




Am 21.08.2017 um 01:38 schrieb Graeme Geldenhuys via Lazarus:

On 2017-08-20 21:16, Andreas Frieß via Lazarus wrote:

The freetype dll searched by the fpreport was freetype-6.dll, but the
actual freetype-2.3.5-1-bin.zip has only a freetype6.dll. (Renaming is
not a problem for me)


It seems FreeType has some inconsistencies with its releases and 
naming of the DLL. I have copies of freetype-6.dll, freetype6.dll and 
freetype.dll - all version 6 and all downloaded from somewhere on the 
Internet.


I guess the one good thing is that there is a fpReport TODO item to 
remove the freetype*.dll dependencies for Windows in the future. That 
is already possible with the AggPas exporter, but in that specific 
case I prefer the freetype usage as it generates better text via 
AggPas and has more features that the Windows Font API supports.


Regards,
  Graeme



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


Re: [Lazarus] fpReport released

2017-08-20 Thread Andreas Frieß via Lazarus
Thx Graeme, i some changes in the Lazarus trunk now too. I didnt 
reconiced this on Lazarus, because i'm actually on the 1.8RC path :-)


But i can backport this :-) Sorry for my noise.

Andreas


Am 20.08.2017 um 22:12 schrieb Graeme Geldenhuys via Lazarus:

On 2017-08-20 21:05, Andreas Frieß via Lazarus wrote:

But is there a fcl-report package for Lazarus, because the web-demo
asked me for ? Or should be an extra  package for Lazarus planned ?


There definitely was a fclfpreport.lpk package and the demo had a 
dependency on that. This was when everything was in a single reporting 
repository though. Maybe because of the repository split (FPC, Lazarus 
and fpGUI) things got lost along the way. I'll have to get a Lazarus 
repo update to double check what Michael committed in there.


Regards,
  Graeme



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


Re: [Lazarus] fpReport released

2017-08-20 Thread Andreas Frieß via Lazarus

If i want to start the demo in windows, some dll's are missing.

The freetype dll searched by the fpreport was freetype-6.dll, but the 
actual freetype-2.3.5-1-bin.zip has only a freetype6.dll. (Renaming is 
not a problem for me)


Source: http://gnuwin32.sourceforge.net/packages/freetype.htm (Binaries 
only)


Andreas




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


Re: [Lazarus] fpReport released

2017-08-20 Thread Andreas Frieß via Lazarus

Thx Michael & Graeme for the fcl-report.

But is there a fcl-report package for Lazarus, because the web-demo 
asked me for ? Or should be an extra  package for Lazarus planned ?


Andreas


Am 20.08.2017 um 21:16 schrieb Michael Van Canneyt via Lazarus:



On Sun, 20 Aug 2017, Michael W. Vogel via Lazarus wrote:


Am 20.08.2017 um 20:35 schrieb Michael Van Canneyt via Lazarus:

fpreport has been committed to FPC SVN: packages/fcl-report.
It should compile on windows, linux, freebsd and darwin.


I just tried to compile a clean fpc:
fpreportdb.pp(22,32) Fatal: Can't find unit db used by fpreportdb
Fatal: Compilation aborted


Missing dependency. I added it, please update and try again.

No idea why this always happens to me. I do a "make clean all" and it 
just works :/


Michael.


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


Re: [Lazarus] Reporting engine - What it's state?

2017-08-19 Thread Andreas Frieß via Lazarus

 and the week goes by :-)

Any news about the report-engine ? Or had i miss this in the (fpc) trunk ?

Andreas


Am 12.08.2017 um 11:03 schrieb Michael Van Canneyt via Lazarus:


Hi,

I will commit the code to FPC svn the coming  week.

Michael.

On Fri, 11 Aug 2017, Andreas Frieß via Lazarus wrote:


Hi,

pls, where can the actual 'unstable ?' Code found ? fpc trunk, where ?

Thanks
Andreas

Am 24.07.2017 um 08:54 schrieb Michael Van Canneyt via Lazarus:



On Mon, 24 Jul 2017, Gabor Boros via Lazarus wrote:


Hi All,

2015. 07. 09. 21:45 keltezéssel, Michael Van Canneyt írta:

Just an opinion:
I am working with Graeme Geldenhuys to create a reporting engine 
from scratch.
I think Lazreport's design contains some fundamental flaws, which 
can only be remedied by re-implementing a reporting engine from 
scratch.


Two years gone. Any news? I see "In progress" on the Foundation's 
page, but want to know more detailed informations.


https://foundation.freepascal.org/projects/reporting-engine


It's ready and waiting for release. I'm waiting for 2 small fixes 
still:

- Some strange error when exporting a custom element to PDF
- Removing a dependency on freetype.dll on windows.

Michael.










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


Re: [Lazarus] Reporting engine - What it's state?

2017-08-11 Thread Andreas Frieß via Lazarus

Hi,

pls, where can the actual 'unstable ?' Code found ? fpc trunk, where ?

Thanks
Andreas

Am 24.07.2017 um 08:54 schrieb Michael Van Canneyt via Lazarus:



On Mon, 24 Jul 2017, Gabor Boros via Lazarus wrote:


Hi All,

2015. 07. 09. 21:45 keltezéssel, Michael Van Canneyt írta:

Just an opinion:
I am working with Graeme Geldenhuys to create a reporting engine 
from scratch.
I think Lazreport's design contains some fundamental flaws, which 
can only be remedied by re-implementing a reporting engine from 
scratch.


Two years gone. Any news? I see "In progress" on the Foundation's 
page, but want to know more detailed informations.


https://foundation.freepascal.org/projects/reporting-engine


It's ready and waiting for release. I'm waiting for 2 small fixes still:
- Some strange error when exporting a custom element to PDF
- Removing a dependency on freetype.dll on windows.

Michael.




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


Re: [Lazarus] Status of namespace

2017-08-10 Thread Andreas Frieß via Lazarus

Hi Fabio,

i think, this is the Bug https://bugs.freepascal.org/view.php?id=32247 
you mean. It is in also in Lazarus 1.8RC3 with akctual FPC trunk


Andreas


Am 03.08.2017 um 00:27 schrieb Fabio Luis Girardi via Lazarus:



Em 2 de ago de 2017 11:46 AM, "Juha Manninen" 
mailto:juha.mannine...@gmail.com>> escreveu:




No. Instead please work with them and report problems.
I found 2 related bug reports:

https://bugs.freepascal.org/view.php?id=24269

- FPDoc. May not be relevant in your case. (?)


No.


https://bugs.freepascal.org/view.php?id=20892

- The original bug is fixed long time ago, but I understood there are
2 others that should be reported separately.
  - F12 in designer.
  - Codetools issues.
Can you please test and report the remaining issues. I will
resolve #20892 then.


My issues are related with Codetools. After insert a component or a 
control where the class is declared on dotted unit, I can't add a 
second component/control declared on other dotted unit. But I'll 
update my Lazarus first and then report my experiences.


Thanks

Fabio





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


Re: [Lazarus] Lazarus Release Candidate 1 of 1.8.0

2017-05-27 Thread Andreas Frieß via Lazarus

Am 19.05.2017 um 01:30 schrieb Werner Pamler via Lazarus:

Am 18.05.2017 um 00:41 schrieb Werner Pamler via Lazarus:

Am 17.05.2017 um 23:08 schrieb Andreas Frieß via Lazarus:
I see with the last patches something goes wrong after r54880 with 
frames and grid (specially TsWorkSheetGrid).


Lazarus claims, the is no valid parent and didnot load and crash. It 
is only happen if you use frames ? The trouble is, i can only 
shutdown Lazarus with the Processmanger.


Win10/64 with Lazarus 32/svn 1.9RC1


This is confusing: Are you using Laz trunk (v1.9) or 1.8RC1? I don't 
see an issue with WorksheetGrid on frames with Laz trunk. Can you 
post a demo?


Andreas, could you try r5868 of fpspreadsheet? I fixed a "Window has 
no parent" error with frames which had crept in, again...


Werner thank you, i will make a try and i will look for the changes, 
because i found other (older) components they have some trouble with 
frames (DirectShow) too. Next week i can spend some time to check this 
with a fresh installation to avoid side effects.


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


Re: [Lazarus] Lazarus Release Candidate 1 of 1.8.0

2017-05-17 Thread Andreas Frieß via Lazarus
I see with the last patches something goes wrong after r54880 with 
frames and grid (specially TsWorkSheetGrid).


Lazarus claims, the is no valid parent and didnot load and crash. It is 
only happen if you use frames ? The trouble is, i can only shutdown 
Lazarus with the Processmanger.


Win10/64 with Lazarus 32/svn 1.9RC1

Andreas

Any hints ?


Am 17.05.2017 um 14:39 schrieb Mattias Gaertner via Lazarus:

The Lazarus team is glad to announce the first release candidate of
Lazarus 1.8.




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


Re: [Lazarus] Projectgroups in Sourceeditor Toolbar

2017-03-13 Thread Andreas Frieß via Lazarus

THX Mattias.

Another Featurerequest, in the Project group windows, can you add the 
MRU-List "Open recent project groups" too please. Because it is not 
possible to open Lazarus with a Projectgroup ind winwows, with a simple 
doublecklick for me. It opens always the file in the editor, but doesn't 
load the project group itself.


Andreas


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


[Lazarus] Projectgroups in Sourceeditor Toolbar

2017-03-11 Thread Andreas Frieß via Lazarus
Is there an way to bring the menuentries of the projectgroups in the 
toolbar of the sourceeditor ?


If i go into the 'Toolbar Configuration', i didn't find the entries like 
'Open Projectgroup', in the mainmenu it is shown, but not in the editor.


Lazarus 1.7 rUnversioned directory FPC 3.1.1 i386-win32-win32/win64 
(Lazarus trunk/ FPC trunk)


Andreas

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


Re: [Lazarus] Error: No Memory left at linking Lazarus with fpc trunk

2017-03-09 Thread Andreas Frieß via Lazarus

Luiz Americo Pereira Camara via Lazarus wrote:

> Seems that code typhon fixed it. See entry 16-Nov-2016 ver 5.90 at

I looked for it and made a compare.

One change is in the pp.pas aroud line 150. Now i patched the actual 
trunk 35551. Now fpc compiles the 'Big' Lazarus for me.


Andreas

===

{$ifdef win32}
  { 256 MB stack }
  { under windows the stack can't grow }
  {$MAXSTACKSIZE 25600}
  {$setpeflags $20} //=== ct =
{$else win32}
  {$ifdef win64}
{ 512 MB stack }
{ under windows the stack can't grow }
{$MAXSTACKSIZE 51200}
  {$else win64}
{ 1 MB stack }
{$MINSTACKSIZE 100}
  {$endif win64}
{$endif win32}


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


Re: [Lazarus] Error: No Memory left at linking Lazarus with fpc trunk

2017-03-08 Thread Andreas Frieß via Lazarus

I have RAM of 24GB in this machine,

but its a Free Pascal Compiler version 3.1.1 [2017/03/08] for i386   so 
i think there is the RAM limited for this process.


I have tried this with different packages in different constellations to 
find out which package trigger this. But i have a lot of packages in the 
actual project and i need generics.


Can i change the heapsize with-Chx in the fpc.cfg  and what is the 
default heapsize ?


Andreas


Am 07.03.2017 um 13:37 schrieb Mattias Gaertner via Lazarus:

Andreas Frieß via Lazarus  hat am 7. März 2017 
um 13:12 geschrieben:

If i want to recompile Lazarus with some packages i got the following
error. If the fpc link Lazarus, it was running out of memory !?

git-svn-id: http://svn.freepascal.org/svn/lazarus/trunk@54324
4005530d-fff6-0310-9dd1-cebe43e6787f
FPC 3.1.1 i386-win32-win32/win64

with fpc 3.0.2 it works

How much RAM do you have?

FPC 3.1.1 is experimental. When you spot a bug, please try an older revision. 
If that works, try to find the revision that broke it.

Do you know what package triggers this?

Mattias


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


[Lazarus] Error: No Memory left at linking Lazarus with fpc trunk

2017-03-07 Thread Andreas Frieß via Lazarus
If i want to recompile Lazarus with some packages i got the following 
error. If the fpc link Lazarus, it was running out of memory !?


git-svn-id: http://svn.freepascal.org/svn/lazarus/trunk@54324 
4005530d-fff6-0310-9dd1-cebe43e6787f

FPC 3.1.1 i386-win32-win32/win64

with fpc 3.0.2 it works



make: Entering directory `C:/Data/Hugo/Komponenten/Lazarus'
C:/Data/development/fpctrunk/fpc/bin/i386-win32/make -C ide idepkg
make[1]: Entering directory `C:/Data/Hugo/Komponenten/Lazarus/ide'
../tools/svn2revisioninc.exe .. revision.inc
C:/Data/development/fpctrunk/fpc/bin/i386-win32/make 
--assume-new=lazarus.pp lazarus.exe OPT=' -WG 
@C:\Data\development\LazHugo\idemake.cfg'

make[2]: Entering directory `C:/Data/Hugo/Komponenten/Lazarus/ide'
C:/Data/development/fpctrunk/fpc/bin/i386-win32/fpc.exe -gl -vbqewnhi 
-Sci -dlclwin32 -Fu../designer -Fu../debugger -Fu../debugger/frames 
-Fu../converter -Fu../packager -Fu../packager/frames 
-Fu../components/custom -Fuinclude/win -Fuframes -Fu. -Fiinclude 
-Fiinclude/win32 -Fi../images -FE.. -FU../units/i386-win32/win32 -WG 
@C:\Data\development\LazHugo\idemake.cfg -di386 lazarus.pp
Hint: (11030) Start of reading config file 
C:\Data\development\fpctrunk\fpc\bin\i386-win32\fpc.cfg
Hint: (11031) End of reading config file 
C:\Data\development\fpctrunk\fpc\bin\i386-win32\fpc.cfg
Hint: (11030) Start of reading config file 
C:\Data\development\LazHugo\idemake.cfg
Hint: (11031) End of reading config file 
C:\Data\development\LazHugo\idemake.cfg

Free Pascal Compiler version 3.1.1 [2017/02/08] for i386
Copyright (c) 1993-2017 by Florian Klaempfl and others
(1002) Target OS: Win32 for i386
(3104) Compiling lazarus.pp
C:\Data\Hugo\Komponenten\Lazarus\ide\lazarus.pp(109,20) Warning: (5044) 
Symbol "MainFormOnTaskBar" is not portable
(9022) Compiling resource 
C:\Data\Hugo\Komponenten\Lazarus\units\i386-win32\win32\lazarus.or

(9015) Linking ..\lazarus.exe
C:\Data\Hugo\Komponenten\Lazarus\ide\lazarus.pp(159,1) Error: (1026) 
Compilation raised exception internally

Fatal: (1009) No memory left
Error: C:\Data\development\fpctrunk\fpc\bin\i386-win32\ppc386.exe 
returned an error exitcode

make[2]: *** [lazarus.exe] Error 1
make[2]: Leaving directory `C:/Data/Hugo/Komponenten/Lazarus/ide'
make[1]: *** [idepkg] Error 2
make[1]: Leaving directory `C:/Data/Hugo/Komponenten/Lazarus/ide'
make: *** [idepkg] Error 2
make: Leaving directory `C:/Data/Hugo/Komponenten/Lazarus'
#

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


[Lazarus] Generics diffence between Lazarus and Delphi Berlin

2017-02-28 Thread Andreas Frieß via Lazarus
I have found some interesting working Generics construct. I want to 
translate this code to Lazarus, but there are Generics often used.
In Delphi Berlin the following ist working, the inner array of Integer 
is normally 6 integer long, but once 7 integer and can filled in such 
way. Is it possible to do something similar in Lazarus ? Or how can i 
rewrite this to to the same in Lazarus/FPC


Andreas

var
  CODE_PATTERNS: TArray>;


  CODE_PATTERNS :=  [[2, 1, 2, 2, 2, 2], // 0
  [2, 2, 2, 1, 2, 2], [2, 2, 2, 2, 2, 1], [1, 2, 1, 2, 2, 3],
[1, 2, 1, 3, 2, 2], [1, 3, 1, 2, 2, 2], // 5
  [1, 2, 2, 2, 1, 3], [1, 2, 2, 3, 1, 2], [1, 3, 2, 2, 1, 2],
[2, 2, 1, 2, 1, 3], [2, 2, 1, 3, 1, 2], // 10
  [2, 3, 1, 2, 1, 2], [1, 1, 2, 2, 3, 2], [1, 2, 2, 1, 3, 2],
[1, 2, 2, 2, 3, 1], [1, 1, 3, 2, 2, 2], // 15
  [1, 2, 3, 1, 2, 2], [1, 2, 3, 2, 2, 1], [2, 2, 3, 2, 1, 1],
[2, 2, 1, 1, 3, 2], [2, 2, 1, 2, 3, 1], // 20
  [2, 1, 3, 2, 1, 2], [2, 2, 3, 1, 1, 2], [3, 1, 2, 1, 3, 1],
[3, 1, 1, 2, 2, 2], [3, 2, 1, 1, 2, 2], // 25
  [3, 2, 1, 2, 2, 1], [3, 1, 2, 2, 1, 2], [3, 2, 2, 1, 1, 2],
[3, 2, 2, 2, 1, 1], [2, 1, 2, 1, 2, 3], // 30
  [2, 1, 2, 3, 2, 1], [2, 3, 2, 1, 2, 1], [1, 1, 1, 3, 2, 3],
[1, 3, 1, 1, 2, 3], [1, 3, 1, 3, 2, 1], // 35
  [1, 1, 2, 3, 1, 3], [1, 3, 2, 1, 1, 3], [1, 3, 2, 3, 1, 1],
[2, 1, 1, 3, 1, 3], [2, 3, 1, 1, 1, 3], // 40
  [2, 3, 1, 3, 1, 1], [1, 1, 2, 1, 3, 3], [1, 1, 2, 3, 3, 1],
[1, 3, 2, 1, 3, 1], [1, 1, 3, 1, 2, 3], // 45
  [1, 1, 3, 3, 2, 1], [1, 3, 3, 1, 2, 1], [3, 1, 3, 1, 2, 1],
[2, 1, 1, 3, 3, 1], [2, 3, 1, 1, 3, 1], // 50
  [2, 1, 3, 1, 1, 3], [2, 1, 3, 3, 1, 1], [2, 1, 3, 1, 3, 1],
[3, 1, 1, 1, 2, 3], [3, 1, 1, 3, 2, 1], // 55
  [3, 3, 1, 1, 2, 1], [3, 1, 2, 1, 1, 3], [3, 1, 2, 3, 1, 1],
[3, 3, 2, 1, 1, 1], [3, 1, 4, 1, 1, 1], // 60
  [2, 2, 1, 4, 1, 1], [4, 3, 1, 1, 1, 1], [1, 1, 1, 2, 2, 4],
[1, 1, 1, 4, 2, 2], [1, 2, 1, 1, 2, 4], // 65
  [1, 2, 1, 4, 2, 1], [1, 4, 1, 1, 2, 2], [1, 4, 1, 2, 2, 1],
[1, 1, 2, 2, 1, 4], [1, 1, 2, 4, 1, 2], // 70
  [1, 2, 2, 1, 1, 4], [1, 2, 2, 4, 1, 1], [1, 4, 2, 1, 1, 2],
[1, 4, 2, 2, 1, 1], [2, 4, 1, 2, 1, 1], // 75
  [2, 2, 1, 1, 1, 4], [4, 1, 3, 1, 1, 1], [2, 4, 1, 1, 1, 2],
[1, 3, 4, 1, 1, 1], [1, 1, 1, 2, 4, 2], // 80
  [1, 2, 1, 1, 4, 2], [1, 2, 1, 2, 4, 1], [1, 1, 4, 2, 1, 2],
[1, 2, 4, 1, 1, 2], [1, 2, 4, 2, 1, 1], // 85
  [4, 1, 1, 2, 1, 2], [4, 2, 1, 1, 1, 2], [4, 2, 1, 2, 1, 1],
[2, 1, 2, 1, 4, 1], [2, 1, 4, 1, 2, 1], // 90
  [4, 1, 2, 1, 2, 1], [1, 1, 1, 1, 4, 3], [1, 1, 1, 3, 4, 1],
[1, 3, 1, 1, 4, 1], [1, 1, 4, 1, 1, 3], // 95
  [1, 1, 4, 3, 1, 1], [4, 1, 1, 1, 1, 3], [4, 1, 1, 3, 1, 1],
[1, 1, 3, 1, 4, 1], [1, 1, 4, 1, 3, 1], // 100
  [3, 1, 1, 1, 4, 1], [4, 1, 1, 1, 3, 1], [2, 1, 1, 4, 1, 2],
[2, 1, 1, 2, 1, 4], [2, 1, 1, 2, 3, 2], // 105
  [2, 3, 3, 1, 1, 1, 2]];

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


[Lazarus] TTabSheet extending - where is the editor in TPageControl or a hook

2016-12-29 Thread Andreas Frieß via Lazarus

Hi,

i want to extend the TTabSheet to TMyTabSheet, but i didnt find the 
editor for TPageControl to say not to use TTabSheet. The editor is 
normaly comming up if you make a rightclick in TPageControl and say, 
add, insert or move left/right a TTabSheet. I want to change this from 
TTabSheet to use my TMyTabSheet.


Is there a hook or can i register my own editor ?


Thanks

Andreas

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


[Lazarus] Anchordocking -> CloseAll is hiding the mainform and close all forms

2016-12-27 Thread Andreas Frieß via Lazarus

Hello,

i use the anchordocking with manual docking and i see, if i use 
DockManager.CloseAll ALL forms are closed and the mainform is hidden.


Q: Is this expected ? I expect only the docked forms are closed and the 
mainform wil hold their own state (visible/hidden).


Andreas


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