Re: [Lazarus] Sparta Form Designer change

2017-07-26 Thread Anthony Walter via Lazarus
Please see issue #32209 for a working fix. Someone familiar with the LCL Qt widget implementation needs to look at this in more depth. https://bugs.freepascal.org/view.php?id=32209 -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org

Re: [Lazarus] ComparePoints func

2017-07-26 Thread Michael Van Canneyt via Lazarus
On Wed, 26 Jul 2017, Reimar Grabowski via Lazarus wrote: On Wed, 26 Jul 2017 18:53:34 +0100 Graeme Geldenhuys via Lazarus wrote: On 2017-07-26 17:27, Alexey via Lazarus wrote: > Hm, in my app Int makes sense: i need to compare Points in binary > search, and

Re: [Lazarus] ComparePoints func

2017-07-26 Thread Sven Barth via Lazarus
Am 26.07.2017 19:51 schrieb "Graeme Geldenhuys via Lazarus" < lazarus@lists.lazarus-ide.org>: >> If "equals" is needed, why not simply use p1=p2 ? > > > If operator overload exists for the types then sure, but as you know I like OOP approaches to things. > > Also is TPoint a record or a object or

Re: [Lazarus] ComparePoints func

2017-07-26 Thread Alexey via Lazarus
First start by defining what ComparePoints is supposed to measure or compare. yes, of course: compare source editor x/y positions. Ie, it is CompareCoords. -- Regards, Alexey -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org

Re: [Lazarus] ComparePoints func

2017-07-26 Thread Graeme Geldenhuys via Lazarus
On 2017-07-26 17:27, Alexey via Lazarus wrote: Hm, in my app Int makes sense: i need to compare Points in binary search, and see: >, <, =. Ever heard of Manhatten Length? That would be a more logical approach. It is a commonly used length calculation for points.

Re: [Lazarus] ComparePoints func

2017-07-26 Thread Graeme Geldenhuys via Lazarus
On 2017-07-26 16:22, Michael Van Canneyt via Lazarus wrote: First start by defining what ComparePoints is supposed to measure or compare. If "compare" doesn't mean "equals", then a better name should be used, otherwise that too is up for incorrect interpretation. If "equals" is needed,

Re: [Lazarus] ComparePoints func

2017-07-26 Thread Sandro Cumerlato via Lazarus
IMHO you should consider 5 cases: P1 = P2 and the four quadrants https://en.m.wikipedia.org/wiki/Quadrant_(plane_geometry) - Quadrant I should correspond to > - Quadrant III should correspond to < - What about quadrants II and IV? You could compare your point to Y = -X line to reduce your study

Re: [Lazarus] ComparePoints func

2017-07-26 Thread Michael Van Canneyt via Lazarus
On Wed, 26 Jul 2017, Alexey via Lazarus wrote: On 26.07.2017 18:11, Graeme Geldenhuys via Lazarus wrote: ComparePoints() returning a Integer is not a very friendly return type either, Hm, in my app Int makes sense: i need to compare Points in binary search, and see: >, <, =. This

Re: [Lazarus] ComparePoints func

2017-07-26 Thread Alexey via Lazarus
On 26.07.2017 18:11, Graeme Geldenhuys via Lazarus wrote: ComparePoints() returning a Integer is not a very friendly return type either, Hm, in my app Int makes sense: i need to compare Points in binary search, and see: >, <, =. -- Regards, Alexey --

Re: [Lazarus] ComparePoints func

2017-07-26 Thread Michael Van Canneyt via Lazarus
On Wed, 26 Jul 2017, Graeme Geldenhuys via Lazarus wrote: On 2017-07-26 14:54, Alexey via Lazarus wrote: I think LCL has many Compare funcs, but misses func for TPoint. Here it's comparing x/y screen coordinates Why not extend TPoint with an IsEquals() method, so you can do something

Re: [Lazarus] ComparePoints func

2017-07-26 Thread Sandro Cumerlato via Lazarus
What do you think about: function ComparePoints(P1, P2: TPoint): TPoint; begin Result.X := (P1.X - P2.X); Result.Y := (P1.Y - P2.Y); end; Best regards. Sandro Cumerlato On Jul 26, 2017 3:56 PM, "Alexey via Lazarus" wrote: I think LCL has many Compare

Re: [Lazarus] Sparta Form Designer change

2017-07-26 Thread Anthony Walter via Lazarus
No I didn't try that, but I did right now. It locked up my linux. I couldn't even switch to another tty. I'll look into it and possibly file a bug. Thanks. -- ___ Lazarus mailing list Lazarus@lists.lazarus-ide.org

Re: [Lazarus] Sparta Form Designer change

2017-07-26 Thread Juha Manninen via Lazarus
On Wed, Jul 26, 2017 at 9:53 AM, Anthony Walter via Lazarus wrote: > Juha, I just tested on Qt4 (I haven't tested Qt5 yet) and the sparta form > designer is working great with the latest svn trunk, ... Did you try opening an existing project with a form + some

Re: [Lazarus] Congrats to the FPC/Lazarus projects - job well done!

2017-07-26 Thread Graeme Geldenhuys via Lazarus
On 2017-07-25 13:01, Lars via Lazarus wrote: Is it because of QT 5 ? It says on the internets that Lumina uses QT 5 I don't actually know what GUI toolkit Lumina uses, but it might well be qt5. If that's the cause of the huge memory usage or not - I can't say. What I do know is that many

Re: [Lazarus] Sparta Form Designer change

2017-07-26 Thread Anthony Walter via Lazarus
Juha, I just tested on Qt4 (I haven't tested Qt5 yet) and the sparta form designer is working great with the latest svn trunk, with one outstanding problem: TMainMenu is not working correctly with the Qt4 widget set. video