Re: [Lazarus] TAChart possible Bug: Series with UserDefinedChart Source not are redrawing properly

2011-04-19 Thread Alexander Klenin
2011/4/19 Miguel A. Risco mris...@gmail.com:
 Hi All, I found a possible Bug in TAChart component. Lazarus v0.9.30.1
  SVN:3056 on Windows 7 x64

 Create a Project with a TChart and TButton controls, add a TLineseries and
 TUserDefinedChartSource with some points, select the last one as source for
 the serie. Define a Var array of real and assign values to the array on the
 Tbutton onclick event. Populate the AItem values with the data in the array.
 Sometimes when I zoom the chart the serie is not redrawing. (The example
 project is not attached because size limit of the message). Make a zoom on
 the second point [0.1,0.5] but without include the zero Y axis value, the
 serie is not drawing but if the zero level is included in the zoom then the
 serie is drawing correctly)

I can not reproduce on WindowsXP with Lazarus trunk.
I am not sure what problem did you have with the attachment -- it should be
very small. I have created an example project for you -- do you see
the issue with it?

-- 
Alexander S. Klenin


userdefseries_zoom_test.7z
Description: Binary data
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] screen.cursor := crHourglass and Linux

2011-04-19 Thread Graeme Geldenhuys
On 18/04/2011 20:21, DSK wrote:
 To use it, add the unit to the implementation uses clause and then just 
 call DisplayHourglass before any long process. It'll switch back to 
 whatever the cursor was then the method terminates.


Unless you store a reference of the result of the DisplayCursor() call,
it will not work under FPC (like it does under Delphi).  FPC is *not*
compatible with the way Delphi works in this regard. The FPC developers
are also not willing to fix this because the freeing of a undeclared
interface reference in a local method is a undefined/undocumented
feature of Delphi - even though thousands of Delphi developers have used
that feature for many years.

NOTE:
The issue is only if you call DisplayCursor() without storing the result
in a local variable.

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] reverse engineering tool wanted

2011-04-19 Thread Graeme Geldenhuys
On 18/04/2011 23:30, Marc Santhoff wrote:
 
 I'm searching a reverse engineering tool that can handle lazarus' code.
 The main goal is to generate class diagrams and sequence diagrams from
 source.

I'm not sure if ModelMaker can do the reverse engineering, but
generating code and maintaining code from UML diagrams are very good.

Also there is ESS-Model: http://essmodel.sourceforge.net/



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] Menu caption standards

2011-04-19 Thread Graeme Geldenhuys
On 19/04/2011 01:08, Flávio Etrusco wrote:

 so it should be used for
 any menu that invokes a dialog, no matter it's modal or not.

That's not the case in Mozilla Thunderbird. Only modal dialogs have the
ellipsis in the menu item. Examples:

 *  'Tools  Preferences' does not.
 *  'File  New  Message' does not.
 *  'File  Print' does because it is modal.
 etc...


At least this is the case under Linux.



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] screen.cursor := crHourglass and Linux

2011-04-19 Thread Vincent Snijders
2011/4/19 Graeme Geldenhuys graemeg.li...@gmail.com:
 Unless you store a reference of the result of the DisplayCursor() call,
 it will not work under FPC (like it does under Delphi).  FPC is *not*
 compatible with the way Delphi works in this regard. The FPC developers
 are also not willing to fix this because the freeing of a undeclared
 interface reference in a local method is a undefined/undocumented
 feature of Delphi

I thought it was freed just like Delphi (so no resource leak), but not
at the same time (which is undocumented) as Delphi.
.

 NOTE:
 The issue is only if you call DisplayCursor() without storing the result
 in a local variable.


Vincent

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


Re: [Lazarus] TAChart possible Bug: Series with UserDefinedChart Source not are redrawing properly

2011-04-19 Thread Miguel A. Risco
Hi Alexander, your Project is ok, but if your put a tbutton and fill the array 
on the Onclick event and not in the constructor of the form then the series is 
not drawing after the zoom on the second point. If I comment the line  if not 
RectIntersectsRect(ext, ParentChart.CurrentExtent) then exit; in the 
TASeries.pas unit then the series is drawing properly.

Best regards

Miguel.

-Mensaje original-
De: Alexander Klenin [mailto:kle...@gmail.com] 
Enviado el: martes, 19 de abril de 2011 01:14 a.m.
Para: Lazarus mailing list
Asunto: Re: [Lazarus] TAChart possible Bug: Series with UserDefinedChart Source 
not are redrawing properly

2011/4/19 Miguel A. Risco mris...@gmail.com:
 Hi All, I found a possible Bug in TAChart component. Lazarus v0.9.30.1
  SVN:3056 on Windows 7 x64

 Create a Project with a TChart and TButton controls, add a TLineseries 
 and TUserDefinedChartSource with some points, select the last one as 
 source for the serie. Define a Var array of real and assign values to 
 the array on the Tbutton onclick event. Populate the AItem values with the 
 data in the array.
 Sometimes when I zoom the chart the serie is not redrawing. (The 
 example project is not attached because size limit of the message). 
 Make a zoom on the second point [0.1,0.5] but without include the zero 
 Y axis value, the serie is not drawing but if the zero level is 
 included in the zoom then the serie is drawing correctly)

I can not reproduce on WindowsXP with Lazarus trunk.
I am not sure what problem did you have with the attachment -- it should be 
very small. I have created an example project for you -- do you see the issue 
with it?

--
Alexander S. Klenin


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


Re: [Lazarus] screen.cursor := crHourglass and Linux

2011-04-19 Thread Graeme Geldenhuys
On 19/04/2011 08:44, Vincent Snijders wrote:
 
 I thought it was freed just like Delphi (so no resource leak), but not
 at the same time (which is undocumented) as Delphi.

That's exactly the issue I am referring too. Under Delphi the temporary
interface reference gets freed only when the interface goes out of scope
- example when a procedure/function block ends. FPC I believe frees the
temporary interface reference immediately (or something undefined - I
can't remember).

Even though the freeing of a temporary interface is not documented in
Delphi per se, its behaviour has been consistent for over a decade.
There are even 3rd party products based on that behaviour (Raize
CodeSite extensions etc). So even though it is not documented, it's
behaviour is well known, understood and has always been consistent, no
matter which version of Delphi you use.

But yes, I understand the FPC developers point of view too.

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] Menu caption standards

2011-04-19 Thread Juha (gmail)
Graeme Geldenhuys kirjoitti tiistai, 19. huhtikuuta 2011 09:35:01:
 On 19/04/2011 01:08, Flávio Etrusco wrote:
  so it should be used for
  any menu that invokes a dialog, no matter it's modal or not.
 
 That's not the case in Mozilla Thunderbird. Only modal dialogs have the
 ellipsis in the menu item. Examples:
 
  *  'Tools  Preferences' does not.
  *  'File  New  Message' does not.
  *  'File  Print' does because it is modal.
  etc...

Yes, the conventions are not very strict in this case.

Now the use of 3 dots In Lazarus is more consistent than it used to be.
I can add the dots also to all View-menu items + other places that show 
dialogs, if it's the preferred way. What do others say?

User interfaces are difficult to design because there is no single right 
solution, it is always a matter of opinion.

Juha

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


Re: [Lazarus] TAChart possible Bug: Series with UserDefinedChart Source not are redrawing properly

2011-04-19 Thread Miguel A. Risco
Calling ds.Reset make the fix. I also think that Reset could be called by
EndUpdate.

Thank you

Miguel

-Mensaje original-
De: Alexander Klenin [mailto:kle...@gmail.com] 
Enviado el: martes, 19 de abril de 2011 02:04 a.m.
Para: Lazarus mailing list
Asunto: Re: [Lazarus] TAChart possible Bug: Series with UserDefinedChart
Source not are redrawing properly

On Tue, Apr 19, 2011 at 17:46, Miguel A. Risco mris...@gmail.com wrote:
 Hi Alexander, your Project is ok, but if your put a tbutton and fill the
array on the Onclick event and not in the constructor of the form then the
series is not drawing after the zoom on the second point. If I comment the
line  if not RectIntersectsRect(ext, ParentChart.CurrentExtent) then exit;
in the TASeries.pas unit then the series is drawing properly.

Ah, I see now.
You need to call ds.Reset before ds.EndUpdate.
Maybe Reset should be called automatically by EndUpdate...

-- 
Alexander S. Klenin

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


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


Re: [Lazarus] Menu caption standards

2011-04-19 Thread Paul Ishenin

19.04.2011 15:06, Juha (gmail) wrote:

User interfaces are difficult to design because there is no single right
solution, it is always a matter of opinion.


Look at windows (xp/vista) and osx design guidlines.

Best regards,
Paul Ishenin


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


Re: [Lazarus] Menu caption standards

2011-04-19 Thread Mark Morgan Lloyd

Flávio Etrusco wrote:

Hello,

I noticed some changes to menus' captions and I disagree with them.
AFAIK the standard for menu captions is to have '...' (ellipsis)  to
indicate the menu doesn't have direct action, so it should be used for
any menu that invokes a dialog, no matter it's modal or not.


In that case, something like a browser's New - New Window should be 
followed by an ellipsis. Conventionally, it is not, which suggests that 
the criterion is whether the action is relevant to the current window in 
which case it would usually (but not necessarily) be modal.


As another example, a browser's Edit - Find in This Page... brings up a 
non-modal dialogue associated with the current window.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

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


Re: [Lazarus] TAChart possible Bug: Series with UserDefinedChart Source not are redrawing properly

2011-04-19 Thread Alexander Klenin
On Tue, Apr 19, 2011 at 18:15, Miguel A. Risco mris...@gmail.com wrote:
 Calling ds.Reset make the fix. I also think that Reset could be called by
 EndUpdate.

Done in r30379

-- 
Alexander S. Klenin

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


[Lazarus] to the BGRABitmap maintainer...

2011-04-19 Thread Graeme Geldenhuys
Hi,

I have been taking a quick look at the BGRABitmap package and looked
through a few of the tutorials posted on the FPC Wiki. The library seems
quite impressive - nice work.

I have found a rather gaping API flaw though, regarding these two methods:

function BGRA(red, green, blue, alpha: byte): TBGRAPixel; overload;
function BGRA(red, green, blue: byte): TBGRAPixel; overload;


From the name, one would expect the parameters to be blue, green,
red, alpha, but in fact that is not the case - but rather the
reverse is true.

Maybe a more sensible name for those methods would be RGBA(...)? That
way the name of the method matches the parameters order better.

eg: Code take from:  http://wiki.freepascal.org/BGRABitmap


bmp.FillRect(40,40,80,80,BGRA(0,0,255,128), dmDrawWithTransparency);


If one doesn't know the API and parameter names, but rather just looking
at the code itself, I would have thought the above code would draw a Red
square, not a Blue square.


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


[Lazarus] Yet another wiki attack

2011-04-19 Thread Graeme Geldenhuys


http://wiki.freepascal.org/Lazarus_IDE_Tools


The above URL has no text regarding the Lazarus IDE Tools feature.
Instead it has some spam.



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] Yet another wiki attack

2011-04-19 Thread Paul Ishenin

19.04.2011 16:50, Graeme Geldenhuys пишет:



http://wiki.freepascal.org/Lazarus_IDE_Tools


The above URL has no text regarding the Lazarus IDE Tools feature.
Instead it has some spam.


Thanks, I reverted those pages and blocked spammers.

Best regards,
Paul Ishenin


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


Re: [Lazarus] Menu caption standards

2011-04-19 Thread José Mejuto
Hello Lazarus-List,

Tuesday, April 19, 2011, 8:35:01 AM, you wrote:

GG That's not the case in Mozilla Thunderbird. Only modal dialogs have the
GG ellipsis in the menu item. Examples:
GG  *  'Tools  Preferences' does not.
GG  *  'File  New  Message' does not.
GG  *  'File  Print' does because it is modal.
GG  etc...
GG At least this is the case under Linux.

The ... is added when the menu entry is an action verb and this
action requires further configuration/data.

Examples:

Open: If the option just only open the file selector no ..., but if
it opens a configuration window to select which open it should have
it.

Print: If it prints directly no dots, but if configuration is opened
then ...

Select All: If selects all text no ..., but if a dialog is opened to
define what to select the elipsis must be added.

Configure: The verb itself indicates a new dialog, so it will never
present an ...

Ellipsis indicates that a verb need more configuration to finish its
action. 98% times the opened dialog is a modal dialog.

-- 
Best regards,
 José


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


Re: [Lazarus] to the BGRABitmap maintainer...

2011-04-19 Thread Aleksa Todorovic
On Tue, Apr 19, 2011 at 10:47, Graeme Geldenhuys
graemeg.li...@gmail.com wrote:
 Hi,

 I have been taking a quick look at the BGRABitmap package and looked
 through a few of the tutorials posted on the FPC Wiki. The library seems
 quite impressive - nice work.

 I have found a rather gaping API flaw though, regarding these two methods:

 function BGRA(red, green, blue, alpha: byte): TBGRAPixel; overload;
 function BGRA(red, green, blue: byte): TBGRAPixel; overload;


 From the name, one would expect the parameters to be blue, green,
 red, alpha, but in fact that is not the case - but rather the
 reverse is true.

 Maybe a more sensible name for those methods would be RGBA(...)? That
 way the name of the method matches the parameters order better.

 eg: Code take from:  http://wiki.freepascal.org/BGRABitmap


 bmp.FillRect(40,40,80,80,BGRA(0,0,255,128), dmDrawWithTransparency);


 If one doesn't know the API and parameter names, but rather just looking
 at the code itself, I would have thought the above code would draw a Red
 square, not a Blue square.

red-green-blue is standard order of RGB components, so changing it
to blue-green-red wouldn't be very wise. Maybe changing function names
to something more suitable is better? I believe this is little
annoyance - once you take a look at parameter names, you see what is
their meaning.

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


[Lazarus] ExecuteProcess - do not wait for process on Linux

2011-04-19 Thread Roland Turcan
Hello Lazarus mailing list!

How can I execute process/start external application similar to
myapp  where I don't want to wait until process ends.

Thanks.

-- 
Best regards, TRoland
http://www.rotursoft.sk
http://exekutor.rotursoft.sk


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


Re: [Lazarus] Yet another wiki attack

2011-04-19 Thread Hans-Peter Diettrich

Paul Ishenin schrieb:


http://wiki.freepascal.org/Lazarus_IDE_Tools


The above URL has no text regarding the Lazarus IDE Tools feature.
Instead it has some spam.


Thanks, I reverted those pages and blocked spammers.


Thanks2 :-)

Shouldn't this page be titled Code Tools?

DoDi


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


Re: [Lazarus] reverse engineering tool wanted

2011-04-19 Thread Hans-Peter Diettrich

Marc Santhoff schrieb:


I'm searching a reverse engineering tool that can handle lazarus' code.
The main goal is to generate class diagrams and sequence diagrams from
source.


See FPC utils/fpdoc, e.g. makeskel is quite nice.

DoDi


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


[Lazarus] What are ppas.bat and link.res?

2011-04-19 Thread Frank Church
what are ppas.bat and link.res?

From examining the code it appears that ppas.bat contains code to link the
executable and the link.res resource files.

I just want to know it if is safe to add them to my .gitignore file.

-- 
Frank Church

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


Re: [Lazarus] to the BGRABitmap maintainer...

2011-04-19 Thread Graeme Geldenhuys
On 19/04/2011 11:34, Aleksa Todorovic wrote:
 
 red-green-blue is standard order of RGB components, so changing it
 to blue-green-red wouldn't be very wise. Maybe changing function names
 to something more suitable is better?


That is exactly the point I'm trying to make. Everybody knows the order
as being R-G-B, but the function BGRA() seems to imply B-G-R order.

I think renaming those two functions to RGBA() would be more logical -
even if you don't know the parameter names (ie: just by looking at a
code sample).


 I believe this is little
 annoyance - once you take a look at parameter names, you see what is
 their meaning.

Yes, but just looking at a code sample, like the ones in BGRABitmap
Tutorial wiki page, is rather confusing. The function name implies a
non-standard order.


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


[Lazarus] CodeTools facility for documenting source code?

2011-04-19 Thread Frank Church
Is there a codetools facility that can help you annotate changes to your
functions, and also help you create some kind of documentation block
whenever you create a new function or procedure?

eg when I want to commit changes to SCM I would like a tool that can list
all procedures which have changed and give me the option to jumping to them
one by one and noting the changes, then summarize the changes at the
beginning of the file itself.

-- 
Frank Church

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


Re: [Lazarus] to the BGRABitmap maintainer...

2011-04-19 Thread Felipe Monteiro de Carvalho
It would be good if the author puts his name in the wiki page about
this library: http://wiki.lazarus.freepascal.org/BGRABitmap

It would also be good if the sources are put in subversion in a normal
way, instead of putting zip files in subversion with the sources.

-- 
Felipe Monteiro de Carvalho

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


Re: [Lazarus] to the BGRABitmap maintainer...

2011-04-19 Thread Felipe Monteiro de Carvalho
On Tue, Apr 19, 2011 at 1:04 PM, Felipe Monteiro de Carvalho
felipemonteiro.carva...@gmail.com wrote:
 It would also be good if the sources are put in subversion in a normal
 way, instead of putting zip files in subversion with the sources.

Ok, ignore that =D I was looking at the wrong place ...

-- 
Felipe Monteiro de Carvalho

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


Re: [Lazarus] CodeTools facility for documenting source code?

2011-04-19 Thread Mattias Gaertner
 
 


 Frank Church vfcli...@gmail.com hat am 19. April 2011 um 12:51 geschrieben:


 
  Is there a codetools facility that can help you annotate changes to your
 functions, and also help you create some kind of documentation block whenever
 you create a new function or procedure?
 
  eg when I want to commit changes to SCM I would like a tool that can list all
 procedures which have changed and give me the option to jumping to them one by
 one and noting the changes, then summarize the changes at the beginning of the
 file itself.

 Not yet.

 Maybe you can be more specific about which have changed. I guess you mean
since last commit to SCM (or svn or git ...).
 For this the IDE needs a plugin for the version control system.
 Or do you mean the changes since last save to disk?

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


[Lazarus] Missing FPG.CFG on Windows Installer from Snapshot

2011-04-19 Thread Daniel Simoes de Ameida
Hello,

Recently I downloded the file 
Lazarus-0.9.31-30355-fpc-2.5.1-20110418-win32.exe
from snapshotFTP Server ftp://ftp.freepascal.org/pub/lazarus/snapshots/;,
and noticed that the file fpc.cfg is not included along with the binaries of 
the
FPC, which causes an error in the first execution of Lazarus.

is this intentional ? (for some reason) or this file is really missing?
 []s Daniel

Conheça o Projeto ACBr - Automaçao Comercial Brasil
DJSystem a Loja Patrocinadora do ACBr--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] CodeTools facility for documenting source code?

2011-04-19 Thread Frank Church
2011/4/19 Mattias Gaertner nc-gaert...@netcologne.de





 Frank Church vfcli...@gmail.com hat am 19. April 2011 um 12:51
 geschrieben:



 Is there a codetools facility that can help you annotate changes to your
 functions, and also help you create some kind of documentation block
 whenever you create a new function or procedure?

 eg when I want to commit changes to SCM I would like a tool that can list
 all procedures which have changed and give me the option to jumping to them
 one by one and noting the changes, then summarize the changes at the
 beginning of the file itself.


 Not yet.

 Maybe you can be more specific about which have changed. I guess you mean
 since last commit to SCM (or svn or git ...).
 For this the IDE needs a plugin for the version control system.
 Or do you mean the changes since last save to disk?




I am looking for something manually triggered that can check what procedures
have been modified, or added, then I can jump to them one by one and note
down my changes.

I don't need something that is necessarily hooked into my VCS, but something
that can diff the procedures individually and list those that have been
changed.

I also need to settle on a docblock style, and this stackoverflow thread is
interesting
http://stackoverflow.com/questions/750810/most-common-docblock-for-delphi-and-or-freepascal-code
.

Are any of the options here preferred by FPC/Lazarus developers?



 Mattias


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




-- 
Frank Church

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


Re: [Lazarus] CodeTools facility for documenting source code?

2011-04-19 Thread Michael Van Canneyt



On Tue, 19 Apr 2011, Frank Church wrote:




2011/4/19 Mattias Gaertner nc-gaert...@netcologne.de

   

   


  Frank Church vfcli...@gmail.com hat am 19. April 2011 um 12:51 
geschrieben:


Is there a codetools facility that can help you annotate changes to 
your functions,
and also help you create some kind of documentation block whenever 
you create a new
function or procedure?

eg when I want to commit changes to SCM I would like a tool that 
can list all
procedures which have changed and give me the option to jumping to 
them one by one
and noting the changes, then summarize the changes at the beginning 
of the file
itself.


Not yet.

Maybe you can be more specific about which have changed. I guess you mean 
since last commit to SCM
(or svn or git ...).
For this the IDE needs a plugin for the version control system.
Or do you mean the changes since last save to disk?
 



I am looking for something manually triggered that can check what procedures 
have been modified, or added,
then I can jump to them one by one and note down my changes.

I don't need something that is necessarily hooked into my VCS, but something 
that can diff the procedures
individually and list those that have been changed.


Yes, but changed relative to what ? What is your point of reference ?
- Last save in IDE
- last commit in VCS ?
- Last time file was loaded ?



I also need to settle on a docblock style, and this stackoverflow thread is 
interesting
http://stackoverflow.com/questions/750810/most-common-docblock-for-delphi-and-or-freepascal-code.

Are any of the options here preferred by FPC/Lazarus developers?


fpdoc, obviously.

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


Re: [Lazarus] CodeTools facility for documenting source code?

2011-04-19 Thread Martin

On 19/04/2011 13:50, Frank Church wrote:


I am looking for something manually triggered that can check what 
procedures have been modified, or added, then I can jump to them one 
by one and note down my changes.


I don't need something that is necessarily hooked into my VCS, but 
something that can diff the procedures individually and list those 
that have been changed.


I also need to settle on a docblock style, and this stackoverflow 
thread is interesting 
http://stackoverflow.com/questions/750810/most-common-docblock-for-delphi-and-or-freepascal-code.


Are any of the options here preferred by FPC/Lazarus developers?



As a personal opinion, I would like to see that in fpdoc. For example 
introducing a checksum field, for each documented procedure.
Then you could always get a list of modified, since last documentation 
functions.


Obviously it be nice if the checksum was not sensitive to changes in 
whitespace only.


It would not show you a diff, of what was changed, but that can be found 
via svn and co (Maybe another field, indicating which revision a file 
had, at the time of documenting



Martin

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


[Lazarus] Converting C++ Uint8 to Red,Green,Blue

2011-04-19 Thread Leonardo M . Ramé
Hi, I'm working with a library that let me get a pointer to an UInt8
array containing the pixels of an image.

To show the image on screen, using Lazarus, I must know the
Red,Green,Blue and Alpha values of each pixel (am I right?), how can I
convert each byte of the UInt8 array to RGBA?

Thanks in advance,
-- 
Leonardo M. Ramé
http://leonardorame.blogspot.com

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


Re: [Lazarus] Converting C++ Uint8 to Red,Green,Blue

2011-04-19 Thread Leonardo M . Ramé
On 2011-04-19 10:39:59 -0300, Leonardo M. Ramé wrote:
 Hi, I'm working with a library that let me get a pointer to an UInt8
 array containing the pixels of an image.
 
 To show the image on screen, using Lazarus, I must know the
 Red,Green,Blue and Alpha values of each pixel (am I right?), how can I
 convert each byte of the UInt8 array to RGBA?
 
 Thanks in advance,
 -- 

Let me answer to myself.

I didn't know that I can use lBuffer as an array, so, the index 0 -
Red, 1 - Green, 2 - Blue, 3 - Alpha.

Here's how a buffer can be paint on a form using TBGRABitmap:


lBmp := TBGRABitmap.Create(FImgWidth, FImgHeight);
try
  for y := 0 to lBmp.Height-1 do
  begin
p := lBmp.Scanline[y];
for x := 0 to lBmp.Width-1 do
begin
  p^.red := lBuffer[0];
  p^.green := lBuffer[1];
  p^.blue := lBuffer[2];
  p^.alpha := lBuffer[3];
  inc(p);
  inc(lBuffer);
end;
  end;
  // Self is a TForm
  lBmp.Draw(Self.Canvas, 0, 0);
finally
  lbmp.Free;
end;


-- 
Leonardo M. Ramé
http://leonardorame.blogspot.com

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


[Lazarus] SIGSEGV with gdb.exe

2011-04-19 Thread Kjow
Hi all,

I have a problem with debugger, I don't know if it is a my specific
issue, but simply opening Lazarus and hitting F9 to compile and run an
empty project, I get a External: SIGSEGV error. But only if I have
gdb.exe as debugger. If I remove it from options, the project works.

Anyway... I can't understand if an issue that I have with a project
where I'm working on, is a Lazarus issue or a my bug: sometime it
works, sometime not. Randomly calling a function, it works, sometime
not... so enabling debugging function, I wanted to see where was the
problem... but I discovered that gdb.exe doesn't works anymore, with
empty project also.

From here the question: it is only a my problem? Is gdb.exe working
and is there a real problem with lazarus/fpc?

I'm on Lazarus 0.9.30 r30385M FPC 2.4.2 i386-win32-win32/win64 (just
updated via svn)

Thanks!
Kjow

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


Re: [Lazarus] ExecuteProcess - do not wait for process on Linux

2011-04-19 Thread leledumbo
For this, you should use TProcess without poWaitOnExit option. ExecuteProcess
would block, always.

--
View this message in context: 
http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-ExecuteProcess-do-not-wait-for-process-on-Linux-tp2838202p2839464.html
Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com.

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


[Lazarus] To all users of TBarChart

2011-04-19 Thread zeljko
Hi all,
1. As of Lazarus svn r 30386 unit Chart is renamed to BarChart.
2. BarChart unit will be marked as deprecated soon and removed from lcl 
package.

zeljko

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


[Lazarus] TTimer on design time

2011-04-19 Thread fluisgira...@gmail.com
I'm doing some some controls that uses TTimer. I don't know why, but from
some time ago, TTimer don't fire the OnTimer procedure. I see in their
source and is wrote:


procedure TCustomTimer.UpdateTimer;
begin
  KillTimer;
  if (FEnabled) and (FInterval  0)
  and (([CSDESIGNING,csLoading,csDestroying]*ComponentState=[]))
  and Assigned (FOnTimer) then begin
//DebugLn(['TCustomTimer.UpdateTimer ',dbgsName(Self),'
WidgetSet.CreateTimer']);
FTimerHandle := WidgetSet.CreateTimer(FInterval, @Timer);
if FTimerHandle=0 then begin
  FTimerHandle:=cIdNoTimer;
  raise EOutOfResources.Create(SNoTimers);
end;
if Assigned(OnStartTimer) then OnStartTimer(Self);
  end;
end;

So, what's the problem of fire OnTimer on Design time? Maybe I'm wrong, but
at least version 0.9.29 fires this event at design time.


Regards,

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


Re: [Lazarus] SIGSEGV with gdb.exe

2011-04-19 Thread Martin

On 19/04/2011 18:13, Kjow wrote:

ut only if I have
gdb.exe as debugger. If I remove it from options, the project


This may be caused by your anti-virus solution, firewall, or certain 
drivers.


BitDefender is known to cause this.
Comodo firewall is known to cause this.
I suspect there may be printer drivers that cause this too, but I am not 
sure.


With some anti virus it is possible to switch to game mode, or similar.

This used to be the case for bitdefender until recently.
Now it appears, that bit defender forces itself to be load (as dll) with 
*every* application. But if entered while in gdb crashes.


There is nothing (as far as I know) that can be done in Lazarus or FPC. 
If those products, (deliberately or not) behave differently, if the host 
app is being debugged, then this is to me a fault of the manufacturer of 
these products.
Alternatively, there may be an issue in gdb itself, that causes certain 
code to rash. I have no idea, but again, it can't be fixed in Lazarus


Best regards
Martin

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


Re: [Lazarus] SIGSEGV with gdb.exe

2011-04-19 Thread Kjow
2011/4/19 Martin laza...@mfriebe.de:
 This may be caused by your anti-virus solution, firewall, or certain
 drivers.

 BitDefender is known to cause this.
 Comodo firewall is known to cause this.
 I suspect there may be printer drivers that cause this too, but I am not
 sure.

 With some anti virus it is possible to switch to game mode, or similar.

 This used to be the case for bitdefender until recently.
 Now it appears, that bit defender forces itself to be load (as dll) with
 *every* application. But if entered while in gdb crashes.

 There is nothing (as far as I know) that can be done in Lazarus or FPC. If
 those products, (deliberately or not) behave differently, if the host app is
 being debugged, then this is to me a fault of the manufacturer of these
 products.
 Alternatively, there may be an issue in gdb itself, that causes certain code
 to rash. I have no idea, but again, it can't be fixed in Lazarus

 Best regards
 Martin

Thank you for quick reply,

I had no problems until last Friday (15/04/11) and now, also
deactivating my Avira Antivir the problem persist.
As printer I have an Epson PX720WD, but that never caused errors to
gdb until today.

Damn... :(

Thanks!
Kjow

PS I noticed that when my program crashes (without gdb) Windows return
this error: StackHash_fdb0
I don't know if it can help to define the situation...

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


Re: [Lazarus] SIGSEGV with gdb.exe

2011-04-19 Thread José Mejuto
Hello Lazarus-List,

Tuesday, April 19, 2011, 7:51:35 PM, you wrote:

K I had no problems until last Friday (15/04/11) and now, also
K deactivating my Avira Antivir the problem persist.
K As printer I have an Epson PX720WD, but that never caused errors to
K gdb until today.

Deactivating Avira is not enougth. I had the same problem a few months
ago, so uninstalled Avira and reinstalled it a few days later. Now
everything is running fine.

-- 
Best regards,
 José


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


Re: [Lazarus] SIGSEGV with gdb.exe

2011-04-19 Thread Kjow
2011/4/19 José Mejuto joshy...@gmail.com:
 Deactivating Avira is not enougth. I had the same problem a few months
 ago, so uninstalled Avira and reinstalled it a few days later. Now
 everything is running fine.

 --
 Best regards,
  José

Thanks you,

I will try to re-install it.

Best Regards,
Kjow

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


Re: [Lazarus] TTimer on design time

2011-04-19 Thread Vincent Snijders
2011/4/19 fluisgira...@gmail.com fluisgira...@gmail.com:
 I'm doing some some controls that uses TTimer. I don't know why, but from
 some time ago, TTimer don't fire the OnTimer procedure. I see in their
 source and is wrote:

 procedure TCustomTimer.UpdateTimer;
 begin
   KillTimer;
   if (FEnabled) and (FInterval  0)
   and (([CSDESIGNING,csLoading,csDestroying]*ComponentState=[]))
   and Assigned (FOnTimer) then begin
     //DebugLn(['TCustomTimer.UpdateTimer ',dbgsName(Self),'
 WidgetSet.CreateTimer']);
     FTimerHandle := WidgetSet.CreateTimer(FInterval, @Timer);
     if FTimerHandle=0 then begin
       FTimerHandle:=cIdNoTimer;
       raise EOutOfResources.Create(SNoTimers);
     end;
     if Assigned(OnStartTimer) then OnStartTimer(Self);
   end;
 end;
 So, what's the problem of fire OnTimer on Design time? Maybe I'm wrong, but
 at least version 0.9.29 fires this event at design time.

I am not sure, but
Assigned (FOnTimer) returns always false at design time. But this is
from before 0.9.28, with the removal of JitForms, see
http://wiki.lazarus.freepascal.org/Lazarus_0.9.28_release_notes#IDE_changes

See also the code change in TCustomTimer.SetOnTimer.

Vincent

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


Re: [Lazarus] screen.cursor := crHourglass and Linux

2011-04-19 Thread DSK
On Tue, 19 Apr 2011 08:25:49 +0200, Graeme Geldenhuys wrote:

 NOTE:
 The issue is only if you call DisplayCursor() without storing the result
 in a local variable.

Good lord.  That's a very interesting gotcha. I'm very appreciative 
that you've caught this.

It seemed to work fine in the trivial example that I used to test it but 
then, it would seem that I didn't test it very well now did I. After 
putting a break-point in the Destroy event [after wasting 3 hours of my 
live trying find out how to write to the messages window - and failing] 
it does stop there right after the object is created.

It would seem then that the only option is to create a variable where-
ever you want to change the cursor for the extent of the method it is 
declared in ... bummer.

Thanks,
Dave

PS, I'm using the git repository that you maintain - HUGE thanks for this.


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


Re: [Lazarus] screen.cursor := crHourglass and Linux

2011-04-19 Thread DSK
On Tue, 19 Apr 2011 08:55:00 +0200, Graeme Geldenhuys wrote:

 FPC I believe frees the
 temporary interface reference immediately (or something undefined - I
 can't remember).

This is exactly what I see happening in the testing I've just done.

Plop a;
Application.ProcessMessages;
in Destroy right after changing the cursor back to what was stored as 
FOldCursor and it appears that the cursor does not change at all.

-- 
Dave


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


Re: [Lazarus] screen.cursor := crHourglass and Linux

2011-04-19 Thread DSK
On Tue, 19 Apr 2011 08:25:49 +0200, Graeme Geldenhuys wrote:

 The issue is only if you call DisplayCursor()

Actually, just for the record, it is the same for DisplayHourglass as 
well.

-- 
Dave


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


Re: [Lazarus] Missing FPG.CFG on Windows Installer from Snapshot

2011-04-19 Thread Vincent Snijders
2011/4/19 Daniel Simoes de Ameida dopidan...@yahoo.com.br:
 Hello,

 Recently I downloded the file
 Lazarus-0.9.31-30355-fpc-2.5.1-20110418-win32.exe
 from snapshot FTP Server ftp://ftp.freepascal.org/pub/lazarus/snapshots/;,
 and noticed that the file fpc.cfg is not included along with the binaries
 of the
 FPC, which causes an error in the first execution of Lazarus.

 is this intentional ? (for some reason) or this file is really missing?

This could be caused by the fact that fpc 2.5.1 was broken and did not
compile some utility correctly for creating the fpc.cfg.

Please try with tomorrows fpc 2.5.1 snapshot, which reportedly has a
fixed fpc 2.5.1.

Vincent

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


Re: [Lazarus] SIGSEGV with gdb.exe

2011-04-19 Thread Martin

On 19/04/2011 18:51, Kjow wrote:

Thank you for quick reply,

I had no problems until last Friday (15/04/11) and now, also
deactivating my Avira Antivir the problem persist.
As printer I have an Epson PX720WD, but that never caused errors to
gdb until today.

Damn... :(


Open the Menu / View / Debug Windows / Debug output window (before 
running your app), then start it, and copy, zip, and send the content. 
Sometimes it gives a clue, sometimes not...


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


Re: [Lazarus] Menu caption standards

2011-04-19 Thread Flávio Etrusco
On Tue, Apr 19, 2011 at 6:29 AM, José Mejuto joshy...@gmail.com wrote:
 Hello Lazarus-List,

 Tuesday, April 19, 2011, 8:35:01 AM, you wrote:

 GG That's not the case in Mozilla Thunderbird. Only modal dialogs have the
 GG ellipsis in the menu item. Examples:
 GG  *  'Tools  Preferences' does not.
 GG  *  'File  New  Message' does not.
 GG  *  'File  Print' does because it is modal.
 GG  etc...
 GG At least this is the case under Linux.

 The ... is added when the menu entry is an action verb and this
 action requires further configuration/data.

 Examples:

 Open: If the option just only open the file selector no ..., but if
 it opens a configuration window to select which open it should have
 it.

 Print: If it prints directly no dots, but if configuration is opened
 then ...

 Select All: If selects all text no ..., but if a dialog is opened to
 define what to select the elipsis must be added.

 Configure: The verb itself indicates a new dialog, so it will never
 present an ...

 Ellipsis indicates that a verb need more configuration to finish its
 action. 98% times the opened dialog is a modal dialog.

 --
 Best regards,
  José


Thanks a lot for all answers. Sorry for the noise, I stand corrected :-)

Best regards,
Flávio

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


Re: [Lazarus] screen.cursor := crHourglass and Linux

2011-04-19 Thread Graeme Geldenhuys
On 19 April 2011 20:45, DSK *** wrote:

 Good lord.  That's a very interesting gotcha. I'm very appreciative
 that you've caught this.

I caught it by trying to create an alternative debugger to gdb, but
using the same trick as the cursor cursor code shown here.
Unfortunately the FPC implementation cannot work like under Delphi.
And creating instance variables all over the place is a real pain.
:-(


 PS, I'm using the git repository that you maintain - HUGE thanks for this.

My pleasure.




-- 
Regards,
  - Graeme -


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

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


Re: [Lazarus] CodeTools facility for documenting source code?

2011-04-19 Thread Hans-Peter Diettrich

Martin schrieb:

It would not show you a diff, of what was changed, but that can be found 
via svn and co (Maybe another field, indicating which revision a file 
had, at the time of documenting


Git comes with a nice listing of a file's history, which ranges of lines 
have been changed, by whome etc., since the file was checked in.


But of course git doesn't have a notion of procedures, nor has any other 
versioning system I know of.


DoDi


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


Re: [Lazarus] reverse engineering tool wanted

2011-04-19 Thread Marc Santhoff
Hi,

thanks for the hints, I'll see what I can make out of it.

Marc
-- 
Marc Santhoff m.santh...@web.de


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


[Lazarus] FPVectorial and TAChart

2011-04-19 Thread Alexander Klenin
I have tried to use FPVectorial as TAChart back-end.
So far, without success.
I have a few questions/feature fequests, sorted approximately
by decreasing importance:

1) How to draw a rectangle?
2) How to measure a text?
3) How to draw a polygon?
4) How to make FPVectorial output anything?
  It seems crash no matter what output format I try.
5) IMHO intruducing yet another color type is a bad idea --
FPVectorial is by design sacrificing efficiency in favor
of generalization/extensibility, so I do not think a few extra bytes
for color will matter. Please use TFPColor.
6) How to draw a radial pie?

-- 
Alexander S. Klenin

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