Re: [Lazarus] Example requested for TList and Sort using data type of Object (or record).

2011-05-12 Thread Graeme Geldenhuys
Earlier Sven Barth wrote: The absolute version needs (in the example) 2 * SizeOf(Pointer) less stack space and also the two assignments aren't needed. Thanks for that. I guess I need to start using this language feature then. I'm all for optimizations - every cpu cycle counts. :-) Regards,

Re: [Lazarus] Example requested for TList and Sort using data type of Object (or record).

2011-05-12 Thread Michael Schnell
With components, maybe as is even more decent. it will generate even more overhead, but do a type check for safety. -Michael -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Re: [Lazarus] Example requested for TList and Sort using data type of Object (or record).

2011-05-12 Thread Sven Barth
Am 12.05.2011 09:44, schrieb Michael Schnell: With components, maybe as is even more decent. it will generate even more overhead, but do a type check for safety. If you get pointers passed in (which is the case in TList's Sort handler) then you need to do a unsafe typecast at least to TObject

Re: [Lazarus] Example requested for TList and Sort using data type of Object (or record).

2011-05-12 Thread Sven Barth
Am 12.05.2011 09:12, schrieb Graeme Geldenhuys: Earlier Sven Barth wrote: The absolute version needs (in the example) 2 * SizeOf(Pointer) less stack space and also the two assignments aren't needed. Thanks for that. I guess I need to start using this language feature then. I'm all for

Re: [Lazarus] OT : Wanted demo to generate and walk through a 2D in 3D simple graphics.

2011-05-12 Thread Kjow
2011/5/7 Peter Williams pewilliams2...@live.com: Hi, Apologies in advance for this off topic message. I am looking for a demo in Pascal / Delphi / Lazarus (* preferred) of generating a 2D maze and letting the user walk through the maze in simple 3D graphics with lines (e.g. not ASCII) but

Re: [Lazarus] missing jedi

2011-05-12 Thread Juha (gmail)
tim launchbury kirjoitti keskiviikko, 11. toukokuuta 2011 13:45:49: In the various recent reorganisations of the menus in lazarus, it appears that the jedi formatter has disappeared. Is there still any way to run it from lazarus? Hi It is in Source menu now. It was the preferred place for it

Re: [Lazarus] Example requested for TList and Sort using data type of Object (or record).

2011-05-12 Thread Graeme Geldenhuys
On 12/05/2011 10:24, Sven Barth wrote: What I don't know is whether one of FPC's optimization steps solves this already (I have tested without optimization). Interesting question. I guess we will just have to wait for Michael van Canneyt's Code Optimization with FPC book to be released. ;-)

Re: [Lazarus] OT : Wanted demo to generate and walk through a 2D in 3D simple graphics.

2011-05-12 Thread Kjow
2011/5/12 Kjow antispamm...@gmail.com: Otherwise it is multiplatform (Windows [32/64], Linux [32/64], MacOSX). I forgot a thing, you can rotate the view by clicking in 3D view and moving mouse. If you click with both mouse buttons simultaneusly (left-right) and move the mouse up and down you

Re: [Lazarus] fppkg front end

2011-05-12 Thread Marco van de Voort
On Wed, May 11, 2011 at 11:04:26AM +0200, michael.vancann...@wisa.be wrote: Just the units need to be moved imho, the actual program not really ? You're right on that. On a side note, I would like to use some of the features that fppkg implements as well (like setting up the

Re: [Lazarus] fppkg front end

2011-05-12 Thread michael . vancanneyt
On Thu, 12 May 2011, Marco van de Voort wrote: On Wed, May 11, 2011 at 11:04:26AM +0200, michael.vancann...@wisa.be wrote: Just the units need to be moved imho, the actual program not really ? You're right on that. On a side note, I would like to use some of the features that fppkg

Re: [Lazarus] Qt5 plans available

2011-05-12 Thread Marco van de Voort
On Wed, May 11, 2011 at 01:21:42PM +0200, Michael Schnell wrote: I suppose Mono will be transformed in a community project But as always Microsoft will try to use his legal staff against concurrent technologies. They could not do this to Novell, as they had an agreement about mutual

Re: [Lazarus] Qt5 plans available

2011-05-12 Thread michael . vancanneyt
On Thu, 12 May 2011, Marco van de Voort wrote: On Wed, May 11, 2011 at 10:27:22AM +0200, Felipe Monteiro de Carvalho wrote: On Tue, May 10, 2011 at 8:21 PM, Marco van de Voort mar...@stack.nl wrote: Lazarus is not suitable for trying to follow fast moving trends. Iphone was just yesterday,

Re: [Lazarus] Buffer dealocating between program and C++ library

2011-05-12 Thread Mattias Gaertner
On Wed, 11 May 2011 19:49:15 -0300 Leonardo M. Ramé l.r...@griensu.com wrote: [...] if @lGetDicomImage nil then if lGetDicomImage nil then What mode are you using? Delphi? No, I'm using objfpc. Then the if @lGetDicomImage nil then is a tautology. if

Re: [Lazarus] Qt5 plans available

2011-05-12 Thread Marco van de Voort
On Thu, May 12, 2011 at 11:11:00AM +0200, michael.vancann...@wisa.be wrote: their phones, preferably with their recommended tools. Hence the conclusion: a web application is probably the best way to go when developing business apps for the mobile. (at least, that's what we concluded here

Re: [Lazarus] Qt5 plans available

2011-05-12 Thread Michael Schnell
On 05/12/2011 11:11 AM, michael.vancann...@wisa.be wrote: Hence the conclusion: a web application is probably the best way to go when developing business apps for the mobile. Do you mean: Using Android's browser as a GUI and have it connect to a server done with FPC and running as a daemon

Re: [Lazarus] Sorting StringGrid by column click

2011-05-12 Thread Juha (gmail)
Alexander Klenin kirjoitti maanantai, 9. toukokuuta 2011 14:42:04: But what if the user wants his own images for sorting? Then again, maybe there are no such users... One option is to add published properties ColumnSortImageUp and ColumnSortImageDown. The user could set them to point his own

Re: [Lazarus] Qt5 plans available

2011-05-12 Thread michael . vancanneyt
On Thu, 12 May 2011, Michael Schnell wrote: On 05/12/2011 11:11 AM, michael.vancann...@wisa.be wrote: Hence the conclusion: a web application is probably the best way to go when developing business apps for the mobile. Do you mean: Using Android's browser as a GUI and have it connect to a

Re: [Lazarus] Qt5 plans available

2011-05-12 Thread Michael Schnell
On 05/12/2011 12:14 PM, michael.vancann...@wisa.be wrote: I would not do it locally. I see. But supposedly, doing a local web server in fact is a way to use FPC to create a GUI enabled application for Android. -Michael -- ___ Lazarus mailing list

Re: [Lazarus] Qt5 plans available

2011-05-12 Thread zeljko
On Thursday 12 of May 2011 12:14:50 michael.vancann...@wisa.be wrote: On Thu, 12 May 2011, Michael Schnell wrote: On 05/12/2011 11:11 AM, michael.vancann...@wisa.be wrote: Hence the conclusion: a web application is probably the best way to go when developing business apps for the mobile.

Re: [Lazarus] Sorting StringGrid by column click

2011-05-12 Thread Alexander Klenin
On Thu, May 12, 2011 at 21:05, Juha (gmail) juha.mannine...@gmail.com wrote: Alexander Klenin kirjoitti maanantai, 9. toukokuuta 2011 14:42:04: But what if the user wants his own images for sorting? Then again, maybe there are no such users... One option is to add published properties

Re: [Lazarus] Qt5 plans available

2011-05-12 Thread Michael Van Canneyt
On Thu, 12 May 2011, zeljko wrote: On Thursday 12 of May 2011 12:14:50 michael.vancann...@wisa.be wrote: On Thu, 12 May 2011, Michael Schnell wrote: On 05/12/2011 11:11 AM, michael.vancann...@wisa.be wrote: Hence the conclusion: a web application is probably the best way to go when

Re: [Lazarus] fppkg front end

2011-05-12 Thread Marco van de Voort
On Thu, May 12, 2011 at 11:07:16AM +0200, michael.vancann...@wisa.be wrote: Sure... Please do the move as soon as possible. Just identify the units, and I'll start working on moving them to packages/ This way, the move can be done for the 2.6 branching which would help merging back

Re: [Lazarus] Buffer dealocating between program and C++ library

2011-05-12 Thread Leonardo M . Ramé
On 2011-05-12 11:04:30 +0200, Mattias Gaertner wrote: On Wed, 11 May 2011 19:49:15 -0300 Leonardo M. Ramé l.r...@griensu.com wrote: [...] if @lGetDicomImage nil then if lGetDicomImage nil then What mode are you using? Delphi? No, I'm using objfpc. Then the if

Re: [Lazarus] Buffer dealocating between program and C++ library

2011-05-12 Thread Leonardo M . Ramé
On 2011-05-12 05:38:53 +0300, Kostas Michalopoulos wrote: I think that using a @ before the function pointer variable returns the variable's address not the function's and that the @ is needed only for functions, ie. function Foo: TBar; ... FooRef:=@Foo; will assign to FooRef the

Re: [Lazarus] Buffer dealocating between program and C++ library

2011-05-12 Thread Leonardo M . Ramé
Then, how should I check if the function is part of the library?. Sorry, fixed as Kostas suggested. -- Leonardo M. Ramé http://leonardorame.blogspot.com -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org

Re: [Lazarus] Sorting StringGrid by column click

2011-05-12 Thread Hans-Peter Diettrich
Alexander Klenin schrieb: BTW, I agree with the commenter in Mantis who said that sorting type is a required requisite. Sorting numeric columns as strings is not merely useless, but subtly dangerous, since it may deceive user with incorrect results. A CustomSort method would be the way to go.

Re: [Lazarus] Sorting StringGrid by column click

2011-05-12 Thread Alexander Klenin
On Thu, May 12, 2011 at 23:37, Hans-Peter Diettrich drdiettri...@aol.com wrote: Alexander Klenin schrieb: BTW, I agree with the commenter in Mantis who said that sorting type is a required requisite. Sorting numeric columns as strings is not merely useless, but subtly dangerous, since it

Re: [Lazarus] Lazarus 0.9.29, Project/New Project/Custom Program?

2011-05-12 Thread Bernd Mueller
Mattias Gaertner wrote: On Thu, 03 Mar 2011 17:38:24 +0100 Bernd Mueller muelle...@gmx.net wrote: Hello, I tested the latest 0.9.29 snapshot (rev 29671) and I am missing the Custom Program creation in the dialog Project/New Project/Create a new project Is this by design now, or is it

Re: [Lazarus] Lazarus 0.9.29, Project/New Project/Custom Program?

2011-05-12 Thread Mattias Gaertner
    Bernd Mueller muelle...@gmx.net hat am 12. Mai 2011 um 15:00 geschrieben: [...] It was removed by design, because it was almost the same as 'Program' and you can configure any item to any other. For example you can you can use 'Program' and disable whatever IDE feature you don't

Re: [Lazarus] Lazarus 0.9.29, Project/New Project/Custom Program?

2011-05-12 Thread Bernd Mueller
Mattias Gaertner wrote: Bernd Mueller muelle...@gmx.net hat am 12. Mai 2011 um 15:00 geschrieben: [...] It was removed by design, because it was almost the same as 'Program' and you can configure any item to any other. For example you can you can use 'Program' and disable whatever

Re: [Lazarus] Lazarus 0.9.29, Project/New Project/Custom Program?

2011-05-12 Thread Mattias Gaertner
    Graeme Geldenhuys graemeg.li...@gmail.com hat am 12. Mai 2011 um 17:12 geschrieben: On 12/05/2011 15:34, Bernd Mueller wrote:   Perhaps the file type .pas could be added to the file type combobox in the save dialog.  I added a filter list.      I have created a patch months

Re: [Lazarus] OT : Wanted demo to generate and walk through a 2D in 3D simple graphics.

2011-05-12 Thread Peter Williams
Hi, On Thu, May 12, 2011 at 6:46 PM, Kjow antispamm...@gmail.com wrote: 2011/5/12 Kjow antispamm...@gmail.com: Otherwise it is multiplatform (Windows [32/64], Linux [32/64], MacOSX). I forgot a thing, you can rotate the view by clicking in 3D view and moving mouse. If you click with both

Re: [Lazarus] Sorting StringGrid by column click

2011-05-12 Thread Jesus Reyes
--- El jue 12-may-11, Alexander Klenin kle...@gmail.com escribió: De: Alexander Klenin kle...@gmail.com Asunto: Re: [Lazarus] Sorting StringGrid by column click A: Lazarus mailing list lazarus@lists.lazarus.freepascal.org Fecha: jueves, 12 de mayo de 2011, 7:45 On Thu, May 12, 2011 at

Re: [Lazarus] Lazarus 0.9.29, Project/New Project/Custom Program?

2011-05-12 Thread Graeme Geldenhuys
2011/5/12 Mattias Gaertner: But as far as I remember it lacks the ability to update defaults. Simply delete your custom file extensions file, and a new one is created with the latest defaults. Obviously it might be wise to backup your old one first, so you can merge customizations back in. For

Re: [Lazarus] Lazarus 0.9.29, Project/New Project/Custom Program?

2011-05-12 Thread Mattias Gaertner
On Thu, 12 May 2011 22:56:00 +0200 Graeme Geldenhuys graemeg.li...@gmail.com wrote: 2011/5/12 Mattias Gaertner: But as far as I remember it lacks the ability to update defaults. Simply delete your custom file extensions file, and a new one is created with the latest defaults. Obviously it