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

2011-04-18 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] TAChart possible Bug: Series with UserDefinedChart Source not are redrawing properly

2011-04-18 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 :
> 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-18 Thread Vincent Snijders
2011/4/19 Graeme Geldenhuys :
> 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] Menu caption standards

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

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

2011-04-18 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] TAChart possible Bug: Series with UserDefinedChart Source not are redrawing properly

2011-04-18 Thread Alexander Klenin
2011/4/19 Miguel A. Risco :
> 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


[Lazarus] Menu caption standards

2011-04-18 Thread Flávio Etrusco
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.

Best regards,
Flávio

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


Re: [Lazarus] reverse engineering tool wanted

2011-04-18 Thread Darius Blaszyk
There is fpclasschart

On Apr 18, 2011, at 11:30 PM, Marc Santhoff wrote:

> Hi,
> 
> 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 found this one so far, but the links for more info and downloading are
> dead:
> 
> http://www.vclcomponents.com/Delphi/Project/Pro_Analyzer_for_Delphi_and_Pascal-info.html
> 
> Is there anything else?
> 
> Marc
> -- 
> Marc Santhoff 
> 
> 
> --
> ___
> 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


[Lazarus] reverse engineering tool wanted

2011-04-18 Thread Marc Santhoff
Hi,

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 found this one so far, but the links for more info and downloading are
dead:

http://www.vclcomponents.com/Delphi/Project/Pro_Analyzer_for_Delphi_and_Pascal-info.html

Is there anything else?

Marc
-- 
Marc Santhoff 


--
___
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-18 Thread DSK

John,


do i really need allways
screen.cursor := crHouglass;
followed by
Application.Processmessages;


I have this bit of code I wanted to send but I wasn't going to post it 
without testing it [I've only ever run it on windows apps] on a Linux 
platform and I had some difficulties getting Lazarus on Ubuntu running - 
but that's another story. It's a bit of code I found ages ago and have 
refactored here and there. It makes dealing with changing to the HourGlass 
and back in any method much simpler to deal with ... at any rate here it is:


*
unit CursorCtrl;

interface
uses
  Controls, Forms;

type
  ITemporaryCursor = interface
  ['{38BDD5A3-2E23-47D1-BD5D-54C49DBC95C3}']
procedure Show;
  end;

  TTemporaryCursor = class(TInterfacedObject, ITemporaryCursor)
  private
FOldCursor: TCursor;
FNewCursor: TCursor;
  public
constructor Create(const Cursor: TCursor = crHourglass);
destructor Destroy; override;
procedure Show;
  end;

function DisplayCursor(const Cursor: TCursor): ITemporaryCursor;
function DisplayHourglass: ITemporaryCursor;

implementation

{ TTemporaryCursor }
constructor TTemporaryCursor.Create(const Cursor: TCursor = crHourglass);
begin
  inherited Create();
  FOldCursor := Screen.Cursor;
  FNewCursor := Cursor;
end;

destructor TTemporaryCursor.Destroy;
begin
  Screen.Cursor := FOldCursor;
  inherited;
end;

procedure TTemporaryCursor.Show;
begin
  Screen.Cursor := FNewCursor;
  Application.ProcessMessages;
end;

{Use these routines to change a cursor before a long process in any method.}

function DisplayCursor(const Cursor: TCursor): ITemporaryCursor;
begin
  Result := TTemporaryCursor.Create(Cursor) as ITemporaryCursor;
  Result.Show;
end;

{- or -}

function DisplayHourglass: ITemporaryCursor;
begin
  Result := TTemporaryCursor.Create as ITemporaryCursor;
  Result.Show;
end;

end.

*
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.


Hope you find it of interest.
--
Dave
Posted with XanaNews 1.19.1.320


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


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

2011-04-18 Thread Miguel A. Risco
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)

 

  TForm1 = class(TForm)

Button1: TButton;

Chart1: TChart;

Chart1LineSeries1: TLineSeries;

DataSource: TUserDefinedChartSource;

procedure Button1Click(Sender: TObject);

procedure DataSourceGetChartDataItem(ASource: TUserDefinedChartSource;

  AIndex: Integer; var AItem: TChartDataItem);

  end;

 

var

  Form1: TForm1;

  dat:array [0..3] of real;

 

implementation

 

{$R *.lfm}

 

{ TForm1 }

 

 

procedure TForm1.Button1Click(Sender: TObject);

begin

  DataSource.BeginUpdate;

  dat[0]:=0;

  dat[1]:=0.5;

  dat[2]:=0;

  dat[3]:=-0.5;

  DataSource.EndUpdate;

end;

 

procedure TForm1.DataSourceGetChartDataItem(ASource:
TUserDefinedChartSource;

  AIndex: Integer; var AItem: TChartDataItem);

begin

  AItem.X:=AIndex/10;

  AItem.Y:=dat[AIndex];

end;

 

Thank you.

 

 

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


Re: [Lazarus] deactivated items in popup menu and shortcuts

2011-04-18 Thread John Landmesser
seems to be somewhow more complicated, the shortcuts for a win app do not 
behave as aspected, i have to look at that first.


-- 
John

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


[Lazarus] deactivated items in popup menu and shortcuts

2011-04-18 Thread John Landmesser
if you defined shortcuts for a popup-menu, even deactivated items will be 
executed using the shortcut. 

Perhaps that behaviour should be changed ?!!



-- 
John

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


Re: [Lazarus] Missing components when reading CCR through svn

2011-04-18 Thread Graeme Geldenhuys
On 16/04/2011 20:33, Peter Williams wrote:
>  I am finding this thread a little hard to follow. What is the 
> recommended why for me (or any Lazarus user) to download ALL of
> the Lazarus  CCR components ???
> Please include sample SVN command as I am a SVN user.

This is clearly outlined in the Lazarus CCR project, Develop page:

   http://sourceforge.net/projects/lazarus-ccr/develop


SVN:

$ svn co https://lazarus-ccr.svn.sourceforge.net/svnroot/lazarus-ccr
lazarus-ccr


CVS:

$ cvs
-d:pserver:anonym...@lazarus-ccr.cvs.sourceforge.net:/cvsroot/lazarus-ccr login

$ cvs -z3
-d:pserver:anonym...@lazarus-ccr.cvs.sourceforge.net:/cvsroot/lazarus-ccr co
-P modulename


Git:

$ git clone
git://lazarus-ccr.git.sourceforge.net/gitroot/lazarus-ccr/lazarus-ccr

...and...

$ git clone
git://lazarus-ccr.git.sourceforge.net/gitroot/lazarus-ccr/dcpcrypt


If you go to the Lazarus CCR - Develop page, then you can browse each
repository with your web browser, so you can find out what specifically
you want to download - instead of downloading everything.



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] Can not Compile IDE since SVN 30351 (depending on libc )

2011-04-18 Thread Mattias Gaertner
On Mon, 18 Apr 2011 14:17:56 +0800
Paul Ishenin  wrote:

> 18.04.2011 14:07, corps...@web.de wrote:
> > Hello,
> >
> > in SVN Revision 30351 Martin changed the gdbmimiscclasses.pp by adding 
> > these Lines :
> >
> > {$IFDEF UNIX}
> > libc,
> > {$ENDIF}

The unit libc should not be used. I removed it from the uses clause. The
IDE compiles now again under 64bit.

Mattias

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


Re: [Lazarus] Can not Compile IDE since SVN 30351 (depending on libc )

2011-04-18 Thread Michael Schnell
On 04/18/2011 08:07 AM, corps...@web.de 
wrote:___

Empfehlen Sie 
belohnen Sie mit bis zu 50,- Euro!

Bitte keine Werbung in ewine Mailing Liste !

-Michael

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


Re: [Lazarus] Can not Compile IDE since SVN 30351 (depending on libc )

2011-04-18 Thread Mattias Gaertner
On Mon, 18 Apr 2011 14:17:56 +0800
Paul Ishenin  wrote:

> 18.04.2011 14:07, corps...@web.de wrote:
> > Hello,
> >
> > in SVN Revision 30351 Martin changed the gdbmimiscclasses.pp by adding 
> > these Lines :
> >
> > {$IFDEF UNIX}
> > libc,
> > {$ENDIF}
> >
> > Altough i have the unit libc on my system ( located in this folder 
> > /usr/share/fpcsrc/2.4.2/rtl/netwlibc/ )
> >
> > the IDE does not recompile ( Telling me that it was not able to find the 
> > libc ).
> 
> 
> You found libc for netware. The right libc unis is placed at packages/libc

I set a codetools rule to search for libc for non netware in
packages/libc in svn revision 30359.

 
> Please check whether you have it.


Mattias

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


Re: [Lazarus] Can not Compile IDE since SVN 30351 (depending on libc )

2011-04-18 Thread Corpsman

/usr/share/fpcsrc/2.4.2/packages/libc/src/libc.pp

Also exists



-- 

Auf meiner Homepage www.Corpsman.de ist immer was los, ständig wird sie aktualisiert und erweitert. Da ist für jeden was dabei.

-Ursprüngliche Nachricht-
Von: "Paul Ishenin" 
Gesendet: Apr 18, 2011 8:17:56 AM
An: "Lazarus mailing list" 
Betreff: Re: [Lazarus] Can not Compile IDE since SVN 30351 (depending on libc )

>18.04.2011 14:07, corps...@web.de wrote:
>> Hello,
>>
>> in SVN Revision 30351 Martin changed the gdbmimiscclasses.pp by adding these 
>> Lines :
>>
>> {$IFDEF UNIX}
>> libc,
>> {$ENDIF}
>>
>> Altough i have the unit libc on my system ( located in this folder 
>> /usr/share/fpcsrc/2.4.2/rtl/netwlibc/ )
>>
>> the IDE does not recompile ( Telling me that it was not able to find the 
>> libc ).
>
>
>You found libc for netware. The right libc unis is placed at packages/libc
>
>Please check whether you have it.
>
>Best regards,
>Paul Ishenin
>
>
>--
>___
>Lazarus mailing list
>Lazarus@lists.lazarus.freepascal.org
>http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
___
Schon gehört? WEB.DE hat einen genialen Phishing-Filter in die
Toolbar eingebaut! http://produkte.web.de/go/toolbar

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