Re: [Lazarus] More Gtk3 Status

2022-07-18 Thread Petr Hložek via lazarus
Hi,

I'm sorry, maybe a stupid question. Why trying to implement Gtk3 when
we have Gtk4? Gtk3 will be outdated very soon and the problem will be
the same like with Gtk2.

Petr

po 18. 7. 2022 v 11:59 odesílatel zeljko via lazarus
 napsal:
>
>
>
> On 15. 07. 2022. 13:47, Anthony Walter via lazarus wrote:
> > Denis,
> >
> > I will attempt the big design flaws I have found so far while wrangling
> > with the current Gtk3 widget implementation.
> > There are three main layers underpinning cross platform LCL widgetset.
> >
> > 1) We obviously have the LCL itself that mimics the VCL and creates a
> > cross platform component and control library with the same classes and
> > hierarchy across multiple platforms. This piece works well enough.
> >
> > 2) We have underlying native toolkits written in C or C++, or some other
> > language, whose functionality is exposed to Free Pascal by a flat C
> > style API of imported functions, enumerations, constants, and
> > records. This piece works well enough also.
> >
> > 3) We have a series of pascal WS (widgetset) classes used in conjunction
> > with the "RegisterWSComponent(TSomeControl, TWSSomeControl);" that is
> > responsible for binding the 1 and 2 layers. The WS classes are
> > responsible for creating the actual underlying native toolkit widget or
> > control from layers 2 and bridging access to specific properties and
> > methods to layer 1. Okay, this works.  I would have designed a set of
> > interfaces to bridge this piece instead, but we have these WS classes.
> > I'll deal with it.
> >
> > Now here is the first big problem with the Gtk3 widgetset
> > as implemented. Somehow someone decided it would be a neat idea to add a
> > 4th piece just for Gtk3. This piece attempts to wedge itself between 2
> > and 3 by recreating the already existing flat C style API from piece 3
> > as a big series of pascal objects that redeclare the Gtk3 API as a
> > series of objects (see TGtk3Widget in the file gtk3widgets.pas). Now we
> > have a 4th layer just for Gtk3 that not only adds more complexity, but
> > also introduces peculiar behaviors altering what someone writing a Gtk3
> > native widget port needs to know while following through with creating a
> > control or component.
>
>
> I've commited gtk3 skeleton and basic controls + some winapi functions
> (AFAIR it was 2012 or even 2013). Everything is based on
> qt/qt5/carbon/cocoa philosophy already inside LCL. At that time I've
> maintained gtk2 and it's not so pleasant for maintainer (maybe for you
> as programmer of your apps, but not lazarus lcl-ws maintainer) so my
> decision was to  encapsulate gtk3 to pascal objects, and if someone ask
> me to introduce gtk4 I'll do it in same way. Why ? Easy maintaining.
> Also, after I commited gtk3 there were none or just few commiters to the
> gtk3 ws (I could not continue with gtk3 ws because of lacking spare time).
>
> >
> > For an example of the problem this additional with Gtk3 4th layer
> > introduces, consider my attempts to take some Gtk2 widgets I have
> > written and also support them in Gtk3 with its extra layer. I recently
> > updated my gtk vte (virtual terminal emulator control, code here
> >  and video here
> > ) that currently
> > works under Gtk2. While writing the Gtk2 version I referenced the flat C
> > API from here
> >  and had
> > little to no problems getting it working. With the Gtk2 widgetset
> > implementation in Lazarus I was able to just use the Gtk2 documents
> > online to see what functions existed related to working with Gtk2
> > widgets and it worked. This is what I expect when working with a native
> > widgetset, that is I read the documentation provided by the actual
> > widget to toolkit maker (reading documentation at gnome.og).
>
>
> You're mixing apples & oranges (LCL vs your application). They're
> different in many ways. Just simple example is event filters and event
> triggering at the right time - eg TListView.OnSelectItem ...
> mousedown->onselectitem->mouseup (order isn't important here, but point
> is that such order should be same on all platforms, and ppl are filling
> bugs about it, so maintainer should fix that if possible).
>
>
> >
> > Now with the current Gtk3 widget implementation tries to introduce a
> > whole other extra layer that works differently than the actual Gtk3
> > documentation provides. Not only are the Gtk/Gdk functions I need hidden
> > elsewhere, but they work differently in most cases, as decided by
> > whomever is maintaining the base Gtk3 widgetset for Lazarus. I DO NOT
> > want to spend my time trying to figure out where someone has hidden a
> > Gtk3 widget API inside some class from which I am supposed to figure out
> > to inherit in the hopes that the Gtk3 widgetset maker got right. This
> > whole declaration of the flat Gtk3 C style API and putting 

Re: [Lazarus] TSql57 replacement

2020-09-17 Thread Petr Hložek via lazarus
Maybe it's not a good solution but right now works for me.
 I still use 57Connection with disabled version check. There is at
least one disadvantage - I have to install libmysqlclient-dev package
on debian based distributions.

Petr

pá 18. 9. 2020 v 4:15 odesílatel larrydalton71 via lazarus
 napsal:

>
> Thanks, Mario
>  I will try that.
>
>
>
> Sent from my Verizon, Samsung Galaxy smartphone
>
>
>  Original message 
> From: Mario Guerra via lazarus 
> Date: 9/17/20 21:35 (GMT-05:00)
> To: larrydalton71 via lazarus 
> Cc: Mario Guerra 
> Subject: Re: [Lazarus] TSql57 replacement
>
>
> Recently, in a project I used Zeos 7.2.6 to connect to MariaDB 10.3 with 
> protocol "mysql".
> Zeos uses (for every database) the native client libraries, so, in Linux you 
> only have to install the proper client to MySQL or MariaDB.
>
> https://wiki.lazarus.freepascal.org/Zeos_tutorial
>
> Hope it helps, Mario
>
>
> El 17/9/20 a las 19:40, larrydalton71 via lazarus escribió:
>
> I hate to be so high maintenance, but I have been trying for two days to get 
> a good tutorial on launching unix odbc or iodbc on linux. Any help?
>
>
>
> Sent from my Verizon, Samsung Galaxy smartphone
>
>
>  Original message 
> From: Michael Van Canneyt via lazarus 
> Date: 9/17/20 07:51 (GMT-05:00)
> To: Lazarus mailing list 
> Cc: Michael Van Canneyt 
> Subject: Re: [Lazarus] TSql57 replacement
>
>
> Use the ODBC connector.
>
> Michael.
>
> On Thu, 17 Sep 2020, larrydalton71 wrote:
>
> >
> > Is there another way to connect now? I don't want to install Mysql 57.Sent 
> > from my Verizon, Samsung Galaxy smartphone
> >  Original message From: Michael Van Canneyt via lazarus 
> >  Date: 9/17/20  07:14  (GMT-05:00) To: 
> > larrydalton71 via lazarus  Cc: Michael Van 
> > Canneyt  Subject: Re: [Lazarus] TSql57 replacement 
> > On Thu, 17 Sep 2020, larrydalton71 via lazarus wrote:>> Are there any plans 
> > to replace the T57SqlConnection? I have done a complete update on a laptop 
> > with Lazarus Mint 20, Lazarus 2.0.10, and Mysql 8.0, and need to access my 
> > sql databasesSent from my Verizon, Samsung Galaxy smartphoneThese plans 
> > exist, but no date is determined yet.And it will not be 'replace' but 'add 
> > a new connection'.Michael.-- 
> > ___lazarus mailing 
> > listlazarus@lists.lazarus-ide.orghttps://lists.lazarus-ide.org/listinfo/lazarus
> --
> ___
> lazarus mailing list
> lazarus@lists.lazarus-ide.org
> https://lists.lazarus-ide.org/listinfo/lazarus
>
> --
> ___
> lazarus mailing list
> lazarus@lists.lazarus-ide.org
> https://lists.lazarus-ide.org/listinfo/lazarus



--
web:   https://petrhlozek.cz
email: p...@petrhlozek.cz
hobby: https://www.ok2cqr.com/
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] Application crash when scrolling DB Grid

2018-03-20 Thread Petr Hložek via Lazarus
Hi,

my application uses DB grid and when user hit and hold pgdown/pgup, or
hit CTRL+Home/End, applicaiton always crashes. Gdb gets this
information:

0x0091bd68 in
BUFDATASET$_$TDOUBLELINKEDBUFINDEX_$__$$_COMPAREBOOKMARKS$PBUFBOOKMARK$PBUFBOOKMARK$$LONGINT
()
(gdb) bt
#0  0x0091bd68 in
BUFDATASET$_$TDOUBLELINKEDBUFINDEX_$__$$_COMPAREBOOKMARKS$PBUFBOOKMARK$PBUFBOOKMARK$$LONGINT
()
#1  0x0092053c in
BUFDATASET$_$TCUSTOMBUFDATASET_$__$$_COMPAREBOOKMARKS$TBYTES$TBYTES$$LONGINT
()
#2  0x03736588 in  ()
#3  0x03410718 in  ()
#4  0x7fffc9d8 in  ()
#5  0x7fffcb20 in  ()
#6  0x0001 in  ()
#7  0x01a9ac98 in  ()
#8  0x7fffca50 in  ()
#9  0x000f in  ()
#10 0x0106f1b0 in .Ld263 ()
#11 0x01ad6778 in  ()
#12 0x0066cef0 in WSREGISTERCLASS (self=0x7fffca90) at
include/customcontrol.inc:99
#13 0x008ad882 in FIND (this=0x1add2d8, ITEM=0x3736588,
AINDEX=0) at dbgrids.pas:4619
#14 0x008adb65 in INDEXOF (this=0x1add2d8, ITEM=0x3736588) at
dbgrids.pas:4627
#15 0x008ace9d in GETCURRENTROWSELECTED (this=0x1add2d8) at
dbgrids.pas:4388
#16 0x008a8a8a in DRAWROW (this=0x1ad6778, AROW=1) at dbgrids.pas:3084
#17 0x00845cc0 in DRAWALLROWS (this=0x1ad6778) at grids.pas:4174
#18 0x008a88d3 in DRAWALLROWS (this=0x1ad6778) at dbgrids.pas:3054
#19 0x00844465 in PAINT (this=0x1ad6778) at grids.pas:3742
#20 0x0066d006 in PAINTWINDOW (this=0x1ad6778, DC=26725384) at
include/customcontrol.inc:132
#21 0x00653c88 in PAINTHANDLER (this=0x1ad6778,
THEMESSAGE=...) at include/wincontrol.inc:4819
#22 0x006581c9 in WMPAINT (this=0x1ad6778, MSG=...) at
include/wincontrol.inc:6772
#23 0x0066cf3c in WMPAINT (this=0x1ad6778, MESSAGE=...) at
include/customcontrol.inc:112
#24 0x00431def in SYSTEM$_$TOBJECT_$__$$_DISPATCH$formal ()
#25 0x0106f1a8 in .Ld263 ()
#26 0x0106e8c0 in VMT_$CONTROLS_$$_TCUSTOMCONTROL ()
#27 0x0001 in  ()
#28 0x000f in  ()
#29 0x7fffd278 in  ()
#30 0x01ad6778 in  ()
#31 0x76c8fb10 in  () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#32 0x031d4660 in  ()
#33 0x7fffd550 in  ()
#34 0x7fffd4f0 in  ()
#35 0x00738500 in
GTK2PROC_$$_GTKEXPOSEEVENT$PGTKWIDGET$PGDKEVENTEXPOSE$POINTER$$BOOLEAN32
()
#36 0x00662a17 in WNDPROC (this=0x1ad6778, THEMESSAGE=...) at
include/control.inc:2234
#37 0x0065525d in WNDPROC (this=0x1ad6778, MESSAGE=...) at
include/wincontrol.inc:5396
#38 0x0084779a in WNDPROC (this=0x1ad6778, THEMESSAGE=...) at
grids.pas:4701
#39 0x008a3a7d in WNDPROC (this=0x1ad6778, THEMESSAGE=...) at
dbgrids.pas:1444
#40 0x00828792 in DELIVERMESSAGE (TARGET=0x1ad6778,
AMESSAGE=0) at lclmessageglue.pas:112
---Type  to continue, or q  to quit---q
Quit
(gdb) bt
#0  0x0091bd68 in
BUFDATASET$_$TDOUBLELINKEDBUFINDEX_$__$$_COMPAREBOOKMARKS$PBUFBOOKMARK$PBUFBOOKMARK$$LONGINT
()
#1  0x0092053c in
BUFDATASET$_$TCUSTOMBUFDATASET_$__$$_COMPAREBOOKMARKS$TBYTES$TBYTES$$LONGINT
()
#2  0x03736588 in  ()
#3  0x03410718 in  ()
#4  0x7fffc9d8 in  ()
#5  0x7fffcb20 in  ()
#6  0x0001 in  ()
#7  0x01a9ac98 in  ()
#8  0x7fffca50 in  ()
#9  0x000f in  ()
#10 0x0106f1b0 in .Ld263 ()
#11 0x01ad6778 in  ()
#12 0x0066cef0 in WSREGISTERCLASS (self=0x7fffca90) at
include/customcontrol.inc:99
#13 0x008ad882 in FIND (this=0x1add2d8, ITEM=0x3736588,
AINDEX=0) at dbgrids.pas:4619
#14 0x008adb65 in INDEXOF (this=0x1add2d8, ITEM=0x3736588) at
dbgrids.pas:4627
#15 0x008ace9d in GETCURRENTROWSELECTED (this=0x1add2d8) at
dbgrids.pas:4388
#16 0x008a8a8a in DRAWROW (this=0x1ad6778, AROW=1) at dbgrids.pas:3084
#17 0x00845cc0 in DRAWALLROWS (this=0x1ad6778) at grids.pas:4174
#18 0x008a88d3 in DRAWALLROWS (this=0x1ad6778) at dbgrids.pas:3054
#19 0x00844465 in PAINT (this=0x1ad6778) at grids.pas:3742
#20 0x0066d006 in PAINTWINDOW (this=0x1ad6778, DC=26725384) at
include/customcontrol.inc:132
#21 0x00653c88 in PAINTHANDLER (this=0x1ad6778,
THEMESSAGE=...) at include/wincontrol.inc:4819
#22 0x006581c9 in WMPAINT (this=0x1ad6778, MSG=...) at
include/wincontrol.inc:6772
#23 0x0066cf3c in WMPAINT (this=0x1ad6778, MESSAGE=...) at
include/customcontrol.inc:112
#24 0x00431def in SYSTEM$_$TOBJECT_$__$$_DISPATCH$formal ()
#25 0x0106f1a8 in .Ld263 ()
#26 0x0106e8c0 in VMT_$CONTROLS_$$_TCUSTOMCONTROL ()
#27 0x0001 in  ()
#28 0x000f in  ()
#29 0x7fffd278 in  ()
#30 0x01ad6778 in  ()
#31 0x76c8fb10 in  () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#32 0x031d4660 in  ()
#33 0x7fffd550 in  ()
#34 0x7fffd4f0 in  ()
#35 0x00738500 in

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

2017-07-20 Thread Petr Hložek via Lazarus
2017-07-20 15:54 GMT+02:00 Graeme Geldenhuys via Lazarus
:
> I'm just shocked at how behind Delphi has become. FPC and Lazarus are so far
> ahead in language features, target platforms, IDE features - they have
> simply made Delphi obsolete. EMBT keeps buying other companies or products
> and adding more junk into Delphi - instead of fixing what is already there
> (basic IDE and language features). They should take a page out of
> Canonical's playbook - remember the Ubuntu One Hundred Papercuts initiative.

You are right! Right now I'm working on project with over 1M lines of
source code and code completion is so slow! Even Ctrl+Click navigation
doesn't work, it jumps always to nonsense place. If I try to write
something, I still see blue circle indicating Delphi is thinking... .
Horrible experience. Core i5 with 16GB RAM and SSD disk. Also tons of
lines with red mark etc.

BTW Yesterday created packages of fpc 3.0.2 and Lazarus 1.6.4 for
Ubuntu 16.04 and 16.10. After 1.8 is released, I'll create packages as
well.
https://launchpad.net/~ok2cqr/+archive/ubuntu/lazarus

Petr

-- 
web:   https://petrhlozek.cz
email: p...@petrhlozek.cz
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus