[Lazarus] Pascalscript / testers please

2017-10-25 Thread Martin Frb via Lazarus
I updated the version of PascalScript shipped with Lazarus. As we still have a few patches applied, I wonder how well it works on each platform. If you like to test To test use Lazarus trunk (1.9).   Revision: 56200   Date: 25 October 2017 22:33:11 or later. Only trunk has the latest v

[Lazarus] Pascalscript on arm

2017-10-25 Thread Martin Frb via Lazarus
Is anyone using the version of PascalScript shipped with Lazarus on an arm device? Our version has the below patch applied to it, and I do not know if this is correct (or still correct). If anyone has arm, could you please test? To test use Lazarus trunk (1.9).   Revision: 56200   Date: 25 O

Re: [Lazarus] Deleting items in OI

2017-10-25 Thread Vojtěch Čihák via Lazarus
The easiest is to install EC-Controls and then: 1) Put ECTabCtrl on the form 2) Add several tabs 3) Delete tab using pop-menu (in OI or in designed form). Do use Del key.   Tab will disappear but the node will persist.   Thanks, V. __ Od

Re: [Lazarus] Deleting items in OI

2017-10-25 Thread Juha Manninen via Lazarus
On Wed, Oct 25, 2017 at 8:30 PM, Vojtěch Čihák via Lazarus wrote: > I got this code for design time editing (note the line+comment *** > aHook.SelectOnlyThis(aECTC.Tabs); { force the OI to refresh } ***). > > That line should refresh OI so the deleted item (CollectionItem) is removed > (node in O

[Lazarus] Deleting items in OI

2017-10-25 Thread Vojtěch Čihák via Lazarus
Hi,   I got this code for design time editing (note the line+comment ***  aHook.SelectOnlyThis(aECTC.Tabs);  { force the OI to refresh } ***). That line should refresh OI so the deleted item (CollectionItem) is removed (node in OI). It worked in recent Lazarus versions, but it doesn't work in the

Re: [Lazarus] Weird object variables access [SOLVED] - Delphi mode bug!

2017-10-25 Thread Giuliano Colla via Lazarus
Il 25/10/2017 14:20, Sven Barth via Lazarus ha scritto: Did you test with a procedure pointer type or a method pointer type? Cause this might be the important difference here as the example uses a procedure pointer type. I tested assigning an untyped pointer to a method pointer type, because

Re: [Lazarus] Weird object variables access [SOLVED] - Delphi mode bug!

2017-10-25 Thread Giuliano Colla via Lazarus
Il 25/10/2017 14:17, Sven Barth via Lazarus ha scritto: 1) The syntax @ProcIdentifier := whatever is no more valid. It's no more possible to assign a pointer to a method type without typecasting. Probably for good reason. You're right. It was misleading. I was misled. Giuliano

Re: [Lazarus] Weird object variables access [SOLVED] - Delphi mode bug!

2017-10-25 Thread Sven Barth via Lazarus
Am 25.10.2017 14:12 schrieb "Giuliano Colla via Lazarus" < lazarus@lists.lazarus-ide.org>: Il 25/10/2017 13:41, Mattias Gaertner via Lazarus ha scritto: No. The Delphi syntax is "ProcIdentifier:=Proc" or "ProcIdentifier:=@Proc". The "@Some:=" means assign something to address of Some. Which is b

Re: [Lazarus] Weird object variables access [SOLVED] - Delphi mode bug!

2017-10-25 Thread Sven Barth via Lazarus
Am 25.10.2017 13:06 schrieb "Giuliano Colla via Lazarus" < lazarus@lists.lazarus-ide.org>: With older Delphi's up to, I believe, Delphi 7 you have that: 1) the syntax for the assignment of a procedural type is @ProcIdentifier := whatever; 2) If whatever is a pointer, and ProcIdentifier is a Meth

Re: [Lazarus] Weird object variables access [SOLVED] - Delphi mode bug!

2017-10-25 Thread Giuliano Colla via Lazarus
Il 25/10/2017 13:41, Mattias Gaertner via Lazarus ha scritto: No. The Delphi syntax is "ProcIdentifier:=Proc" or "ProcIdentifier:=@Proc". The "@Some:=" means assign something to address of Some. Which is bogus. I guess Delphi's auto dereference actually translates this to @Some^:=. Still bogus,

Re: [Lazarus] Weird object variables access [SOLVED] - Delphi mode bug!

2017-10-25 Thread Mattias Gaertner via Lazarus
On Wed, 25 Oct 2017 13:05:57 +0200 Giuliano Colla via Lazarus wrote: >[...] > With older Delphi's up to, I believe, Delphi 7 you have that: > > 1) the syntax for the assignment of a procedural type is @ProcIdentifier > := whatever; No. The Delphi syntax is "ProcIdentifier:=Proc" or "ProcIdenti

Re: [Lazarus] Weird object variables access [SOLVED] - Delphi mode bug!

2017-10-25 Thread Giuliano Colla via Lazarus
Il 25/10/2017 10:49, Ondrej Pokorny via Lazarus ha scritto: Furthermore, "Format('0x%P',[@Myself])" doesn't make sense - it should be "Format('0x%P',[Pointer(Myself)])". With @Myself I get the address of the object, with Pointer(Myself) I get the address of the pointer to the object. Giulian

Re: [Lazarus] Weird object variables access [SOLVED] - Delphi mode bug!

2017-10-25 Thread Giuliano Colla via Lazarus
Il 24/10/2017 23:18, Michael Van Canneyt via Lazarus ha scritto: It simply works by accident in Delphi, because you are calling a method of the same object as the caller. Try calling a method of another object, and displaying the classname and make sure you trash the registers between the assig

Re: [Lazarus] Weird object variables access [SOLVED] - Delphi mode bug!

2017-10-25 Thread Ondrej Pokorny via Lazarus
On 25.10.2017 11:14, Michael Van Canneyt wrote: On Wed, 25 Oct 2017, Ondrej Pokorny via Lazarus wrote: Yes, the code is wrong. But the reason is that myMethod is assigned in FormCreate. The later "@myMethod := pMethod;" assignment overwrites only half of the myMethod:TProc variable and so corre

Re: [Lazarus] Weird object variables access [SOLVED] - Delphi mode bug!

2017-10-25 Thread Michael Van Canneyt via Lazarus
On Wed, 25 Oct 2017, Ondrej Pokorny via Lazarus wrote: On 24.10.2017 23:18, Michael Van Canneyt via Lazarus wrote: On Tue, 24 Oct 2017, Giuliano Colla wrote: Il 24/10/2017 14:10, Michael Van Canneyt via Lazarus ha scritto: A valid method can never be stored in a pointer, since the former is

Re: [Lazarus] Weird object variables access [SOLVED] - Delphi mode bug!

2017-10-25 Thread Ondrej Pokorny via Lazarus
On 24.10.2017 23:18, Michael Van Canneyt via Lazarus wrote: On Tue, 24 Oct 2017, Giuliano Colla wrote: Il 24/10/2017 14:10, Michael Van Canneyt via Lazarus ha scritto: A valid method can never be stored in a pointer, since the former is actually 2 pointers (method/data) and the latter is just