Re: [fpc-pascal] Anchors on a child form

2018-06-04 Thread Giuliano Colla
Il 04/06/2018 14:06, Martin Wynne ha scritto: uses Unit1; procedure TForm2.FormCreate(Sender: TObject); begin   Parent:=Form1;   Anchors:=[];   Visible:=True; end; 4. run it, and the debugger will show the error message. Just remove the two lines Parent:= Form1; (which is wrong, because it

Re: [fpc-pascal] Dynamic arrays using management operators

2018-06-04 Thread Ryan Joseph
> On Jun 4, 2018, at 9:12 PM, Michael Van Canneyt > wrote: > > All the rest of what you do remains exactly the same. Dynamic arrays do far > less than what you seem to assume. As noted the inclocked()/declocked() calls destroyed some performance sensitive parts of my code while testing and

Re: [fpc-pascal] Dynamic arrays using management operators

2018-06-04 Thread Ryan Joseph
> On Jun 4, 2018, at 9:21 PM, Martin Schreiber wrote: > > It seems that the inclocked()/declocked() operations completely destroy the > performance of the OP's application (which I find strange) so he never want > to touch dynamic arrays anymore as he wrote. It was one hyper sensitive part

Re: [fpc-pascal] Dynamic arrays using management operators

2018-06-04 Thread Martin Schreiber
On Monday 04 June 2018 16:12:27 Michael Van Canneyt wrote: > > They make life easier by reducing the need for manual memory > management. No more, no less. Other than that they behave like normal > arrays on the heap. > It seems that the inclocked()/declocked() operations completely destroy the

Re: [fpc-pascal] Dynamic arrays using management operators

2018-06-04 Thread Michael Van Canneyt
On Mon, 4 Jun 2018, Ryan Joseph wrote: On Jun 4, 2018, at 5:46 PM, Michael Van Canneyt wrote: Well, as far as I can see, you are repeating what the compiler already does for you out of the box. But it’s customizable, that’s the point. What happens when you remove an element from a

Re: [fpc-pascal] Dynamic arrays using management operators

2018-06-04 Thread Ryan Joseph
> On Jun 4, 2018, at 5:46 PM, Michael Van Canneyt > wrote: > > Well, as far as I can see, you are repeating what the compiler already does > for you out of the box. But it’s customizable, that’s the point. What happens when you remove an element from a dynamic array? I don’t even know

Re: [fpc-pascal] Anchors on a child form

2018-06-04 Thread Martin Wynne
Hi Mattias, Thanks for your reply. 'TWinControl.WMSize loop detected, the widgetset does not like the LCL bounds or sends unneeded wmsize messages'. Can you create a bug report with an example to reproduce the loop? Sorry, I don't know how to do that. However, it is very easy to replicate:

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-06-04 Thread Nitorami
>> It would be reasonable to assume that the predefined + might be >> substantially more efficient than a programmer-defined one could be. >Yes, that's one of the reasons I vote for keeping the new feature >and allow to overload the operator. I don't think that argument holds water.

Re: [fpc-pascal] Dynamic arrays using management operators

2018-06-04 Thread Ryan Joseph
> On Jun 4, 2018, at 4:39 PM, Michael Van Canneyt > wrote: > > The array is private. This means that the reference count will be 0 or 1. I looked at the examples on the wiki and think by private you mean that the ref count does indeed need to be a pointer so it gets updated for all

Re: [fpc-pascal] Anchors on a child form

2018-06-04 Thread Mattias Gaertner
On Sun, 3 Jun 2018 13:06:59 +0100 Martin Wynne wrote: > If I create a child form by setting Parent:=other_form; in FormCreate, > it cannot be dragged to a new position by the user. Correct. Setting aForm.Parent makes the form a "normal" control like a frame or panel. If you want dragging, you

Re: [fpc-pascal] Anchors on a child form

2018-06-04 Thread Martin Wynne
This appears to be a topic for the Lazarus list, as it appears that you're using the Lazarus LCL: laza...@lists.lazarus-ide.org There you may obtain adequate assistance. Giuliano Thanks. Sorry for posting to the wrong list. Martin. ___

Re: [fpc-pascal] Dynamic arrays using management operators

2018-06-04 Thread Michael Van Canneyt
On Mon, 4 Jun 2018, Ryan Joseph wrote: On Jun 4, 2018, at 4:39 PM, Michael Van Canneyt wrote: I fail to see why you need management operators for this. just because I wanted the array implementation available and to get automatic cleanup. I don’t know all the stuff dynamic arrays do

Re: [fpc-pascal] Dynamic arrays using management operators

2018-06-04 Thread Ryan Joseph
> On Jun 4, 2018, at 4:39 PM, Michael Van Canneyt > wrote: > > I fail to see why you need management operators for this. just because I wanted the array implementation available and to get automatic cleanup. I don’t know all the stuff dynamic arrays do behind the scenes and that worries me

Re: [fpc-pascal] Anchors on a child form

2018-06-04 Thread Giuliano Colla
Il 03/06/2018 14:06, Martin Wynne ha scritto: I'm porting a project to Lazarus from Delphi5, where it works fine. Child forms can be dragged around even with the top and left anchors set. Thanks for any help in fixing this This appears to be a topic for the Lazarus list, as it appears that

Re: [fpc-pascal] Dynamic arrays using management operators

2018-06-04 Thread Michael Van Canneyt
On Mon, 4 Jun 2018, Ryan Joseph wrote: Since we were talking about dynamic arrays I was curious to see if they could be implemented using the new management operators so I made a little proof of concept by cobbling together old code. It’s not complete or very good by any means but I think

[fpc-pascal] Dynamic arrays using management operators

2018-06-04 Thread Ryan Joseph
Since we were talking about dynamic arrays I was curious to see if they could be implemented using the new management operators so I made a little proof of concept by cobbling together old code. It’s not complete or very good by any means but I think it’s a pretty interesting alternative to

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-06-04 Thread Bernd Oppolzer
Am 03.06.2018 um 18:12 schrieb Sven Barth via fpc-pascal: Bernd Oppolzer > schrieb am So., 3. Juni 2018, 11:56: Am 02.06.2018 um 15:14 schrieb Sven Barth via fpc-pascal: Mark Morgan Lloyd mailto:markmll.fpc-pas...@telemetry.co.uk>> schrieb am Sa.,

[fpc-pascal] Anchors on a child form

2018-06-04 Thread Martin Wynne
If I create a child form by setting Parent:=other_form; in FormCreate, it cannot be dragged to a new position by the user. If I then remove the top and left anchors by setting Anchors:=[]; in FormCreate (or in the Object Inspector) so that it can be dragged, I get this exception: