Re: [Lazarus] TMySQL51Connection: Keep connection alive

2012-12-11 Thread Andrey Smyntyna
With MYSQL_OPT_RECONNECT=1 provided code works like expected

2012/12/5 michael.vancann...@wisa.be



 On Wed, 5 Dec 2012, Andrey Smyntyna wrote:

  Hello.

 I need some explanation of how to do persistent connection to MySQL
 database and restore it if it has broken.

 In my test project I have created TMySQL51Connection component with
 KeepConnection property set to True
 and additionaly before making any database operations I check connection
 availability like below:

  if not dm.mysql.Connected then
  dm.mysql.Connected := True;

 But sometimes I anyway get connection error with the fact that MySQL
 server
 is present and available in network.


 As far as I know, the 'Keepconnection' is not functional.

 Michael.

 --
 __**_
 Lazarus mailing list
 Lazarus@lists.lazarus.**freepascal.orgLazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.**freepascal.org/mailman/**listinfo/lazarushttp://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] G+ community for Free Pascal and Lazarus

2012-12-11 Thread Graeme Geldenhuys
Hi Everybody,

Google created a new Community feature in Google+. Below is a link to a
community dedicated to Free Pascal and Lazarus.

 https://plus.google.com/communities/114860965042324270757

If you are on Google+, feel free to visit and join. The community was
setup by Marc Hanisch and already has 76 members. Hopefully this will be
a nice neutral discussion area with less anal moderation.

There is also a Delphi community for those interested:

  https://plus.google.com/communities/114860965042324270757



Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] G+ community for Free Pascal and Lazarus

2012-12-11 Thread Paul Ishenin

11.12.12, 21:34, Graeme Geldenhuys wrote:


If you are on Google+, feel free to visit and join. The community was
setup by Marc Hanisch and already has 76 members. Hopefully this will be
a nice neutral discussion area with less anal moderation.


This list does not have anal moderation.

I'm already there since 2-3 days.

Best regards,
Paul Ishenin

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] [fpc-pascal] G+ community for Free Pascal and Lazarus

2012-12-11 Thread michael . vancanneyt



On Tue, 11 Dec 2012, Graeme Geldenhuys wrote:


Hi Everybody,

Google created a new Community feature in Google+. Below is a link to a
community dedicated to Free Pascal and Lazarus.

https://plus.google.com/communities/114860965042324270757

If you are on Google+, feel free to visit and join. The community was
setup by Marc Hanisch and already has 76 members. Hopefully this will be
a nice neutral discussion area with less anal moderation.


Not exactly a nice neutral post :-)



There is also a Delphi community for those interested:

 https://plus.google.com/communities/114860965042324270757


The two links are the same ?

Michael.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] G+ community for Free Pascal and Lazarus

2012-12-11 Thread silvioprog
I joined just now! :)


2012/12/11 Graeme Geldenhuys gra...@geldenhuys.co.uk

 Hi Everybody,

 Google created a new Community feature in Google+. Below is a link to a
 community dedicated to Free Pascal and Lazarus.

  https://plus.google.com/communities/114860965042324270757

 If you are on Google+, feel free to visit and join. The community was
 setup by Marc Hanisch and already has 76 members. Hopefully this will be
 a nice neutral discussion area with less anal moderation.

 There is also a Delphi community for those interested:

   https://plus.google.com/communities/114860965042324270757



 Regards,
   - Graeme -

 --
 fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
 http://fpgui.sourceforge.net/


-- 
Silvio Clécio
My public projects - github.com/silvioprog
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] [fpc-pascal] G+ community for Free Pascal and Lazarus

2012-12-11 Thread Graeme Geldenhuys
On 2012-12-11 13:40, michael.vancann...@wisa.be wrote:
 
 Not exactly a nice neutral post :-)

I have to keep up my appearances. ;-)



 The two links are the same ?


Oops, a copy-n-paste error. Here is the correct Delphi link:

  https://plus.google.com/communities/103113685381486591754




Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] [fpc-pascal] G+ community for Free Pascal and Lazarus

2012-12-11 Thread Vincent Snijders
2012/12/11  michael.vancann...@wisa.be:

 setup by Marc Hanisch and already has 76 members. Hopefully this will be
 a nice neutral discussion area with less anal moderation.


 Not exactly a nice neutral post :-)

In that case, I better not join.

Vincent

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] [fpc-pascal] G+ community for Free Pascal and Lazarus

2012-12-11 Thread Graeme Geldenhuys
On 2012-12-11 15:41, Vincent Snijders wrote:
 
 In that case, I better not join.


I'll be nice and say you can come play too. :)


PS: members are up to 117 already!!


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] [fpc-pascal] G+ community for Free Pascal and Lazarus

2012-12-11 Thread silvioprog
2012/12/11 Graeme Geldenhuys gra...@geldenhuys.co.uk

 On 2012-12-11 15:41, Vincent Snijders wrote:
 
  In that case, I better not join.


 I'll be nice and say you can come play too. :)


 PS: members are up to 117 already!!


 Regards,
   - Graeme -

 --
 fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
 http://fpgui.sourceforge.net/


I invited members here in Brazil. \o/

-- 
Silvio Clécio
My public projects - github.com/silvioprog
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Tprogressbar and positional info as ptrint.

2012-12-11 Thread Andrew Brunner

On 12/05/2012 01:48 PM, Andrew Brunner wrote:

I'm getting overflow exceptions on values greater than integer.  Can someone 
revise all values from integer to ptrint so on 64 bit systems it will be valid.


Ok, I have a patch for the LCL but before we get further I think we need 
more discussion on ptrInt vs actual use of Int64 on 32bit systems.


Great news!  The widget set on GTK2 automatically scales the min/max 
value and just passes a fraction of the filler and GTK2 does the rest.


So the question becomes, what is the best variable to use for allowance 
as valid Min/Max/Position? I think at this point it is safest to use 
PtrInt but one could make the case for Int64 if Int64 is widely used in 
TStreams - even on 32bit oses.


So the question becomes... Is the use of int64  actually ubiquitous on a 
32bit system?  If so, it may stand to reason that the values of Progress 
bar be expanded to Int64 even on 32bit systems.


http://bugs.freepascal.org/view.php?id=23471

Any feedback or ideas are welcome.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Tprogressbar and positional info as ptrint.

2012-12-11 Thread Martin

On 11/12/2012 17:55, Andrew Brunner wrote:

On 12/05/2012 01:48 PM, Andrew Brunner wrote:
I'm getting overflow exceptions on values greater than integer.  Can 
someone revise all values from integer to ptrint so on 64 bit systems 
it will be valid.


Ok, I have a patch for the LCL but before we get further I think we 
need more discussion on ptrInt vs actual use of Int64 on 32bit systems.


Great news!  The widget set on GTK2 automatically scales the min/max 
value and just passes a fraction of the filler and GTK2 does the rest.


So the question becomes, what is the best variable to use for 
allowance as valid Min/Max/Position? I think at this point it is 
safest to use PtrInt but one could make the case for Int64 if Int64 is 
widely used in TStreams - even on 32bit oses.


So the question becomes... Is the use of int64  actually ubiquitous on 
a 32bit system?  If so, it may stand to reason that the values of 
Progress bar be expanded to Int64 even on 32bit systems.


http://bugs.freepascal.org/view.php?id=23471

Any feedback or ideas are welcome.


  IMHO ptrint is the wrong choice. it invites to write code that can 
not be ported. and leaves unreadable LFM.


If streams use int64, and this is for the purpose of copy those values, 
then it must be int64 too (or qword, if it can't be negative ,and should 
have the full range).




--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Tprogressbar and positional info as ptrint.

2012-12-11 Thread Martin

On 11/12/2012 17:55, Andrew Brunner wrote:


So the question becomes... Is the use of int64  actually ubiquitous on 
a 32bit system?  If so, it may stand to reason that the values of 
Progress bar be expanded to Int64 even on 32bit systems.


http://bugs.freepascal.org/view.php?id=23471


I am *not* generally opposing the change.

Ins any case, the range must be a type, that has the same size on all 
Platforms (Int64 is ok / ptrint is not).
Using a variable size type will create problems for any project that is 
cross platform and developed by a team (it be a question of time until 
some team member on a 64 bit system uses a value, that does not compile 
on 32 bit).



The reason given in the issue IMHO is in this case not valid. And 
without reason, it is harder to make the right decision.
It (int64) must be supported, because the OS could accept it is 
no reason in itself.

In this particular case there is no functionality gained.
Most of the time if an OS accepts some value (or a greater range), this 
will also add functionality. This is not the case, when the limit (set 
by the screen) is below the sub-range already used.


The only reason I see, is that user code can use TStream values without 
having to scale them in the user code. (scaling still happens, either in 
the LCL, or OS, or both)


So the question is what is more important.
- For the few cases, were it is used with tstream the user code will be 
simpler.
- For all other cases user code stays as it is, but there is more code 
to maintain in many widgetset's code (adding maintenance).


My guess is that Delphi may have that because of those visual-binding 
stuff. So if one wanted to link TProgressbar.VAlue to 
TSomeFileOrStreamHandlingComponent.Position, and want to do that in the 
form designer (which from the videos embarcadero publishes, apparently 
can be done), then for embarcadero it is much easier to create the code 
for the visual bindings.


If the requester wants to contribute something of that kind: cool.

Otherwise lets see if there are other (valid / based on functionality 
affected) reasons. Or if it is only simplifying the occasional code 
using TStream (which still can be reason enough)






--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] from hfiandor 11 dic 2012

2012-12-11 Thread Héctor F . Fiandor Rosario
Dear fellows:

I am using SQLite3 for an application and I have a problem.

I need to use a table in an unit that don´t has a form -is a unit for ReadWrite 
procedures- and I can´t place the DataAccess for SQLite icom.

Please, in this cases, what to do?

Thanks in advance,

yours truly,

Ing. Héctor F. Fiandor Rosario
hfian...@infomed.sld.cu


  - Original Message - 
  From: Reinier Olislagers 
  To: Lazarus mailing list 
  Sent: Tuesday, August 21, 2012 8:36 PM
  Subject: Re: [Lazarus] TSQLDBLibraryLoader committed for SQLDB


  On 22-8-2012 10:02, Reinier Olislagers wrote:
   On 21-8-2012 22:10, Michael Van Canneyt wrote:
   Hi,
  
   After recent discussions about which library to load when loading DB client
   libraries, I changed the default names for Firebird, MySQL, Postgres.
   snip
   The component is registered now in the SQLDb package.
  
   Note that the use of the component is optional. It's only needed if you
   want
   to change the library name to something else as the default.
  
   Michael.
   
   Thanks Michael,
   
   Laz failed to compile for me with errors in registersqldb.
   Please see patch that fixes this in
   http://bugs.freepascal.org/view.php?id=22690
   
   Thanks,
   Reinier
   

  Zeljan had already fixed it - thanks Zeljan ;)

  Reinier

  --
  ___
  Lazarus mailing list
  Lazarus@lists.lazarus.freepascal.org
  http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--

Este mensaje le ha llegado mediante el servicio de correo electronico 
que ofrece Infomed para respaldar el cumplimiento de las misiones del Sistem
a Nacional de Salud. La persona que envia este correo asume el compromiso de
 usar el servicio a tales fines y cumplir con las regulaciones establecidas


Infomed: http://www.sld.cu/


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] from hfiandor 11 dic 2012

2012-12-11 Thread Howard Page-Clark

On 12/12/12 1:40, Héctor F. Fiandor Rosario wrote:

Dear fellows:
I am using SQLite3 for an application and I have a problem.
I need to use a table in an unit that don´t has a form -is a unit for
ReadWrite procedures- and I can´t place the DataAccess for SQLite icom.
Please, in this cases, what to do?


Please do two things:
1 As has been requested of you several times, find out how to use your 
email client so that you can start a new thread for your questions, and 
not interrupt another thread every time.
2 Use a TDataModule for your table (File - New - Data Module), or 
create it in code by calling its constructor.




--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TCustomControl.Autosize issue (umlcat)

2012-12-11 Thread Marco Aurelio Ramirez Carrillo
 I can't find
code responsible for that in TCustomPanel. Any tips?

Most Lazarus libraries are not a single *.pas unit file, like
Delphi, since the controls are implemented for several platforms 
visual control libraries. So, you may have a *.pas file that
references  several *.inc include files.

Look for your FPC or Lazarus source code files. Search for *.inc files.

 Reason is delphi compability?

I agree that it can be messy, but, Delphi compatibility its also
importanty, since a lot of developers here, have apps, originally
builted in Delphi.

I also have tried to (re) built some visual controls from scratch, and
copied or based some code from existing controls.

Good Luck.

-- 
atte

Marco Aurelio Ramirez Carrillo a.k.a. umlcat

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Tprogressbar and positional info under Windows

2012-12-11 Thread Andrew Brunner
Ok, After looking at MSDN and the widget source code under windows, I 
assert there is presently an un-exposed flaw.


There is data precision truncation via Line 671 of unit 
./lcl/interfaces/win32/win32wscomctrls.pp.  Where NewPosition is Integer 
and under windows Integer is LongInt not Word.


According to Microsoft's Developer Network Page

PBM_SETPOS, PBM_SETRANGE only support signed integers up to 65,535.


So, that means that there is a clear problem here.  And a general case 
solution is easy to form.


The best possible route would be to allow the largest Integer type and 
scale inside the lcl.


Next question would be, can the IDE property streamer handle Int64 values?
If not, what's involved with expanding the property reader.


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Tprogressbar and positional info under Windows

2012-12-11 Thread Andrew Brunner
Scaling inside the LCL would need an algorithm that accounts for the 
step (Integer) too.


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Tprogressbar and positional info under Windows

2012-12-11 Thread Bart
On 12/11/12, Andrew Brunner atbrun...@aurawin.com wrote:

 According to Microsoft's Developer Network Page

 PBM_SETPOS, PBM_SETRANGE only support signed integers up to 65,535.

See note at Embarcadero's wiki about this:
http://docwiki.embarcadero.com/Libraries/XE3/en/Vcl.ComCtrls.TProgressBar.Position

Delphi uses Integer for Pos, Min, Max.

Bart

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Tprogressbar and positional info under Windows

2012-12-11 Thread Andrew Brunner

On 12/11/2012 04:07 PM, Bart wrote:

On 12/11/12, Andrew Brunner atbrun...@aurawin.com wrote:


According to Microsoft's Developer Network Page

PBM_SETPOS, PBM_SETRANGE only support signed integers up to 65,535.

See note at Embarcadero's wiki about this:
http://docwiki.embarcadero.com/Libraries/XE3/en/Vcl.ComCtrls.TProgressBar.Position

Delphi uses Integer for Pos, Min, Max.


So does Delphi read Lazarus projects?

If it does, one could make the argument about limiting scale to Word.  
Not to say I would agree that notion.


I think widget scaling is going to be worth the effort.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus