Re: [Lazarus] lazarus for visually impaired user

2017-10-24 Thread Michael Thompson via Lazarus
On 25 October 2017 at 03:48, Mgr. Janusz Chmiel via Lazarus < lazarus@lists.lazarus-ide.org> wrote: > Who of us would initiate crout founding campaign by using Indigo or other > servers, so Lazarus would become fully accessible. While not putting my hand up to be involved (too busy I'm afraid),

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

2017-10-24 Thread Michael Van Canneyt via Lazarus
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 1 pointer. That the assignment is valid is Delphi compati

[Lazarus] lazarus for visually impaired user

2017-10-24 Thread Mgr. Janusz Chmiel via Lazarus
Dear specialists, Because making Lazarus accessible for visually impaired future developers is so easy, that it is rather not realistic, that somebody will make it free of charge, since project development is very heavy even without making it accessible for screen readers users, I have other c

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

2017-10-24 Thread Sven Barth via Lazarus
On 24.10.2017 19:00, Giuliano Colla via Lazarus wrote: > Il 24/10/2017 17:04, Sven Barth via Lazarus ha scritto: >> >>     @NextProc := Coda.Remove; >>     Sending := True; >>     NextProc; >> >> with NextProc defined as a procedure of object does compile but >> it's wrong. >> >

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

2017-10-24 Thread Giuliano Colla via Lazarus
Il 24/10/2017 17:04, Sven Barth via Lazarus ha scritto: @NextProc := Coda.Remove;     Sending := True;     NextProc; with NextProc defined as a procedure of object does compile but it's wrong. Why are you using an @ when you assign the NextProc variable? O.o Because it's

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

2017-10-24 Thread Sven Barth via Lazarus
Am 24.10.2017 14:57 schrieb "Giuliano Colla via Lazarus" < lazarus@lists.lazarus-ide.org>: Il 24/10/2017 14:15, Mattias Gaertner via Lazarus ha scritto: > On Tue, 24 Oct 2017 13:56:43 +0200 > Giuliano Colla via Lazarus wrote: > > > [...] >> >> Now the catch is that the queue used is just a queue

Re: [Lazarus] Request for merge to 1.8

2017-10-24 Thread FTurtle via Lazarus
OK. Thank you for responce. -- FTurtle -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus

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

2017-10-24 Thread Giuliano Colla via Lazarus
Il 24/10/2017 14:15, Mattias Gaertner via Lazarus ha scritto: On Tue, 24 Oct 2017 13:56:43 +0200 Giuliano Colla via Lazarus wrote: [...] Now the catch is that the queue used is just a queue of pointers, while here we're dealing with procedures of object. This is legal with Delphi syntax, whil

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

2017-10-24 Thread Giuliano Colla via Lazarus
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 1 pointer. That the assignment is valid is Delphi compatible: only the procedure address is copied. I

Re: [Lazarus] Weird object variables access - fpc issue?

2017-10-24 Thread el es via Lazarus
On 24/10/17 12:59, Mattias Gaertner via Lazarus wrote: > ASystemTime is a stack variable. That's thread-safe. > > In fpc trunk it calls GetLocalTime on Unix, which fetches timezone > every time. No global var. So it should be thread safe. > >> because each thread instance would have its own loca

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

2017-10-24 Thread Mattias Gaertner via Lazarus
On Tue, 24 Oct 2017 13:56:43 +0200 Giuliano Colla via Lazarus wrote: >[...] > Yes, you're right, that's what clarifies the issue. When it works, Self > is a TFORM1 object, when it fails, Self is just Nil. > > But now it's also clear why this happens. I'm glad you figured it out. >[...] > Now

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

2017-10-24 Thread Michael Van Canneyt via Lazarus
On Tue, 24 Oct 2017, Giuliano Colla via Lazarus wrote: Il 23/10/2017 22:57, Mattias Gaertner via Lazarus ha scritto: Check if 'Self' inside SendMessage is the right instance. The moral of the story is: in Delphi mode you can assign a procedure of object to a pointer, and the compiler doesn

Re: [Lazarus] Weird object variables access - fpc issue?

2017-10-24 Thread Sven Barth via Lazarus
Am 24.10.2017 13:41 schrieb "el es via Lazarus" < lazarus@lists.lazarus-ide.org>: On 24/10/17 10:04, Mattias Gaertner via Lazarus wrote: > On Tue, 24 Oct 2017 08:59:36 +0100 > el es via Lazarus wrote: > >> On 23/10/17 20:00, Giuliano Colla via Lazarus wrote: >> [snip] >> >> I don't remember if I

Re: [Lazarus] Weird object variables access - fpc issue?

2017-10-24 Thread Mattias Gaertner via Lazarus
On Tue, 24 Oct 2017 12:41:11 +0100 el es via Lazarus wrote: >[...] > Now() is literally > > function Now : TDateTime; > var ASystemTime : TSYSTEMTIME; > begin >GetSystemTime(ASystemTime); >Result := SystemTimeToDateTime(ASystemTime); > end; > > on my installation (lazarus 1.6.4 #54278,

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

2017-10-24 Thread Giuliano Colla via Lazarus
Il 23/10/2017 22:57, Mattias Gaertner via Lazarus ha scritto: Check if 'Self' inside SendMessage is the right instance. Yes, you're right, that's what clarifies the issue. When it works, Self is a TFORM1 object, when it fails, Self is just Nil. But now it's also clear why this happens. The

Re: [Lazarus] Weird object variables access - fpc issue?

2017-10-24 Thread el es via Lazarus
On 24/10/17 10:04, Mattias Gaertner via Lazarus wrote: > On Tue, 24 Oct 2017 08:59:36 +0100 > el es via Lazarus wrote: > >> On 23/10/17 20:00, Giuliano Colla via Lazarus wrote: >> [snip] >> >> I don't remember if I was hitting AV using Now(), likely I wasn't - >> but due to 'normal' Now() being

Re: [Lazarus] Weird object variables access - fpc issue?

2017-10-24 Thread el es via Lazarus
On 24/10/17 10:20, Michael Schnell via Lazarus wrote: > On 24.10.2017 10:48, el es via Lazarus wrote: >> [...] begin    repeat    until not ThreadNowInUse;  //       try ThreadNowInUse :=true; >>> > Busy wait actions are usually a very bad idea > > Better use a TTimer

Re: [Lazarus] Weird object variables access - fpc issue?

2017-10-24 Thread Michael Van Canneyt via Lazarus
On Tue, 24 Oct 2017, Mattias Gaertner via Lazarus wrote: On Tue, 24 Oct 2017 11:11:15 +0200 (CEST) Michael Van Canneyt via Lazarus wrote: [...] From memory: The first call to Now is not necessarily thread-safe, because of the initialization of TZ info ? Please add this to the docs. Afte

Re: [Lazarus] Weird object variables access - fpc issue?

2017-10-24 Thread Mattias Gaertner via Lazarus
On Tue, 24 Oct 2017 11:11:15 +0200 (CEST) Michael Van Canneyt via Lazarus wrote: >[...] > From memory: > The first call to Now is not necessarily thread-safe, because of the > initialization of TZ info ? Please add this to the docs. Mattias -- ___ La

Re: [Lazarus] Weird object variables access - fpc issue?

2017-10-24 Thread Michael Schnell via Lazarus
On 24.10.2017 11:29, Mattias Gaertner via Lazarus wrote: Are you kidding? If this is not appropriate, I suppose the general design of that functionality should be reconsidered, doing anything that needs a fast reaction in the worker thread. -Michael -- ___

Re: [Lazarus] Weird object variables access - fpc issue?

2017-10-24 Thread Mattias Gaertner via Lazarus
On Tue, 24 Oct 2017 11:20:50 +0200 Michael Schnell via Lazarus wrote: > On 24.10.2017 10:48, el es via Lazarus wrote: > > [...] > >>> begin > >>>repeat > >>>until not ThreadNowInUse; // > >>> > >>>try > >>> ThreadNowInUse :=true; > >> >[...] > Better use a TTimer for s

Re: [Lazarus] Request for merge to 1.8

2017-10-24 Thread Juha Manninen via Lazarus
Sorry FTurtle but I would rather keep this change in trunk only. People may have different opinions about the order. This is a typical change that must happen in the development version and not be pushed to the release at last minute. Besides, you as a semi-developer of Lazarus will use mostly trun

Re: [Lazarus] Weird object variables access - fpc issue?

2017-10-24 Thread Michael Schnell via Lazarus
On 24.10.2017 10:48, el es via Lazarus wrote: [...] begin repeat until not ThreadNowInUse; // try ThreadNowInUse :=true; Busy wait actions are usually a very bad idea Better use a TTimer for such. -Michael -- ___ Lazarus maili

Re: [Lazarus] Weird object variables access - fpc issue?

2017-10-24 Thread Michael Van Canneyt via Lazarus
On Tue, 24 Oct 2017, Mattias Gaertner via Lazarus wrote: On Tue, 24 Oct 2017 08:59:36 +0100 el es via Lazarus wrote: On 23/10/17 20:00, Giuliano Colla via Lazarus wrote: [snip] I don't remember if I was hitting AV using Now(), likely I wasn't - but due to 'normal' Now() being not thread s

Re: [Lazarus] Weird object variables access - fpc issue?

2017-10-24 Thread Mattias Gaertner via Lazarus
On Tue, 24 Oct 2017 08:59:36 +0100 el es via Lazarus wrote: > On 23/10/17 20:00, Giuliano Colla via Lazarus wrote: > [snip] > > I don't remember if I was hitting AV using Now(), likely I wasn't - > but due to 'normal' Now() being not thread safe, I was getting inconsistent > timing results, wh

Re: [Lazarus] Weird object variables access - fpc issue?

2017-10-24 Thread Sven Barth via Lazarus
Am 24.10.2017 10:49 schrieb "el es via Lazarus" < lazarus@lists.lazarus-ide.org>: On 24/10/17 09:11, Mattias Gaertner via Lazarus wrote: > On Tue, 24 Oct 2017 08:59:36 +0100 > el es via Lazarus wrote: > >> [...] >> begin >> repeat >> until not ThreadNowInUse; // >> >> try >> ThreadNowI

Re: [Lazarus] Weird object variables access - fpc issue?

2017-10-24 Thread el es via Lazarus
On 24/10/17 09:11, Mattias Gaertner via Lazarus wrote: > On Tue, 24 Oct 2017 08:59:36 +0100 > el es via Lazarus wrote: > >> [...] >> begin >> repeat >> until not ThreadNowInUse; // >> >> try >> ThreadNowInUse :=true; > > This is not thread safe. > > Mattias > Because separated

Re: [Lazarus] Weird object variables access - fpc issue?

2017-10-24 Thread Mattias Gaertner via Lazarus
On Tue, 24 Oct 2017 08:59:36 +0100 el es via Lazarus wrote: >[...] > begin > repeat > until not ThreadNowInUse; // > > try > ThreadNowInUse :=true; This is not thread safe. Mattias -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.

Re: [Lazarus] Weird object variables access - fpc issue?

2017-10-24 Thread el es via Lazarus
On 23/10/17 20:00, Giuliano Colla via Lazarus wrote: [snip] I don't remember if I was hitting AV using Now(), likely I wasn't - but due to 'normal' Now() being not thread safe, I was getting inconsistent timing results, when I used Now() both in main thread and in the thread; So with my applica