Re: [Lazarus] The mouse doesn't appears in Windows Mobile 6.5

2011-07-31 Thread Felipe Monteiro de Carvalho
2011/7/30 Arí Ricardo Ody ar...@gmx.com:
 It's a hello world like program. It runs ok in windows. When a copy it to
 my Windows Mobile 6.5 device and run, the screen appears just like in the
 windows at the desktop, but the mouse is not showed. I can execute the
 functions via shortcut combinations programmed in the buttons.

 How can I show and use the mouse, please?

Which device are you using? It has no touch screen? You attached a
external mouse to it?

Does the mouse show on other applications?

LCL-Wince does not do anything special to show or hide a mouse.

-- 
Felipe Monteiro de Carvalho

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


Re: [Lazarus] Error running under windows mobile 6.5

2011-07-31 Thread Felipe Monteiro de Carvalho
2011/7/30 Arí Ricardo Ody ar...@gmx.com:
 Copy “browseslqiteprj.exe”, dbteste.db and slqite3.dll to the directory
 create in the item 6 above;

Which sqlite3.dll? You should use a sqlite3.dll compiled for wince-arm
as the one which you can download here:

http://wiki.lazarus.freepascal.org/WinCE_Programming_Tips#Pre-compiled_sqlite_dll

And you are also placing your dll in a wrong position, please read here:

http://wiki.lazarus.freepascal.org/WinCE_Programming_Tips#Current_Directory_and_Placement_of_DLLs

 Double click in the “browseslqiteprj.exe”. Windows Mobile asks for
 authorization because my executable is not of known author. I click “yes”.
 Then I receive the message “'browsesqliteprj' is not a valid Windows CE
 application”

 May someone tell me what is the problem?

I documented this here:
http://wiki.lazarus.freepascal.org/WinCE_Programming_Tips#The_error_message:_SomeProject_is_not_a_valid_Windows_CE_application

But in general, as a first step you should try to run the application
in the emulator. And only after in the real device.

 Is there a special DLL to use SQLite in windows CE(or mobile)?

Windows CE is not the same operating system as desktop Windows. You
cannot just copy a binary from Windows, it needs to be compiled for
the Windows CE operating system. This is not only valid for your
program, but also for all DLLs which it uses.

 Is there a way of make windows mobile show lazarus programs execution
 errors? As they are showed in windows or linux?

I don't understand this question, your program hasn't yet started to
execute. It error message that you see is generated by the operating
system. But if the program had started to run, then exceptions would
be shown in message boxes by the LCL.

-- 
Felipe Monteiro de Carvalho

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


Re: [Lazarus] Error running under windows mobile 6.5

2011-07-31 Thread Sven Barth

On 31.07.2011 09:51, Felipe Monteiro de Carvalho wrote:

2011/7/30 Arí Ricardo Odyar...@gmx.com:

Copy “browseslqiteprj.exe”, dbteste.db and slqite3.dll to the directory
create in the item 6 above;


Which sqlite3.dll? You should use a sqlite3.dll compiled for wince-arm
as the one which you can download here:

http://wiki.lazarus.freepascal.org/WinCE_Programming_Tips#Pre-compiled_sqlite_dll

And you are also placing your dll in a wrong position, please read here:

http://wiki.lazarus.freepascal.org/WinCE_Programming_Tips#Current_Directory_and_Placement_of_DLLs



Better use one of those: http://www.parmaja.com/downloads/sqlite3/

They are more up to date than the 3.2.2 on the FPC's FTP ^^

Regards,
Sven

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


Re: [Lazarus] (no subject)

2011-07-31 Thread Howard Page-Clark

On 30/7/11 11:15, Leonardo Rame wrote:

Hi, I would like to drag the mouse over a form, while the mouse is
dragged, FPos X and Y values must change in the direction of the move,
but the mouse cursor must be fixed at the position where the first click
was made.

This code does more or less what I want, but has two problems:

1 - The mouse still moves a little.
2 - The values of FPos.X and FPos.Y doesn't change.




procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
   Y: Integer);
begin
   if ssLeft in shift then
   begin
 Mouse.CursorPos := ClientToScreen(FPos);
 FPos.X := X;
 FPos.Y := Y;
 Invalidate;
   end;
end;


Changing the mouse cursor position interferes with the Invalidate call. 
Try this:


unit Unit1;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, 
StdCtrls, windows;


type

  { TForm1 }

  TForm1 = class(TForm)
Label1: TLabel;
procedure FormMouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
procedure FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: 
Integer);

procedure FormMouseUp(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
procedure FormPaint(Sender: TObject);
  private
FPos: TPoint;
FOldCursorPos: TPoint;
FOldCursor: TCursor;
  end;

var
  Form1: TForm1;

implementation

{$R *.lfm}

{ TForm1 }

procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
  if ssleft in shift then
  begin
FPos.X := X;
FPos.Y := Y;
FOldCursorPos:= FPos;
FOldCursor := Cursor;
Cursor := crNone;
  end;
end;

procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
begin
  if ssLeft in shift then
  begin
//Mouse.CursorPos := ClientToScreen(FPos);
FPos.X := X;
FPos.Y := Y;
Invalidate;
  end;
end;

procedure TForm1.FormMouseUp(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
  Cursor := FOldCursor;
end;

procedure TForm1.FormPaint(Sender: TObject);
var
   HCursor : THandle;
begin
   Label1.Caption := Format('X: %d - Y: %d', [FPos.X, FPos.Y]);
   HCursor := Screen.Cursors[Ord(Screen.Cursor)];
   DrawIconEx(Canvas.Handle,
   FOldCursorPos.X, FOldCursorPos.y, HCursor, 32, 32, 0, 0, DI_NORMAL) ;
end;

end.

It is only a solution for Windows, and it does not remove the 
'permanent' cursor until a second click, but it should get you on the 
right path.


Howard

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


Re: [Lazarus] (no subject)

2011-07-31 Thread Bart
As an end-user I would get rather confused if my mouse cursor didn't
move anymore when I was  moving the mouse.

Bart

On 7/31/11, Howard Page-Clark h...@talktalk.net wrote:
 On 30/7/11 11:15, Leonardo Rame wrote:
 Hi, I would like to drag the mouse over a form, while the mouse is
 dragged, FPos X and Y values must change in the direction of the move,
 but the mouse cursor must be fixed at the position where the first click
 was made.

 This code does more or less what I want, but has two problems:

 1 - The mouse still moves a little.
 2 - The values of FPos.X and FPos.Y doesn't change.


 procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
 begin
if ssLeft in shift then
begin
  Mouse.CursorPos := ClientToScreen(FPos);
  FPos.X := X;
  FPos.Y := Y;
  Invalidate;
end;
 end;

 Changing the mouse cursor position interferes with the Invalidate call.
 Try this:

 unit Unit1;

 {$mode objfpc}{$H+}

 interface

 uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
 StdCtrls, windows;

 type

{ TForm1 }

TForm1 = class(TForm)
  Label1: TLabel;
  procedure FormMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
  procedure FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y:
 Integer);
  procedure FormMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
  procedure FormPaint(Sender: TObject);
private
  FPos: TPoint;
  FOldCursorPos: TPoint;
  FOldCursor: TCursor;
end;

 var
Form1: TForm1;

 implementation

 {$R *.lfm}

 { TForm1 }

 procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
 begin
if ssleft in shift then
begin
  FPos.X := X;
  FPos.Y := Y;
  FOldCursorPos:= FPos;
  FOldCursor := Cursor;
  Cursor := crNone;
end;
 end;

 procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
 begin
if ssLeft in shift then
begin
  //Mouse.CursorPos := ClientToScreen(FPos);
  FPos.X := X;
  FPos.Y := Y;
  Invalidate;
end;
 end;

 procedure TForm1.FormMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
 begin
Cursor := FOldCursor;
 end;

 procedure TForm1.FormPaint(Sender: TObject);
 var
 HCursor : THandle;
 begin
 Label1.Caption := Format('X: %d - Y: %d', [FPos.X, FPos.Y]);
 HCursor := Screen.Cursors[Ord(Screen.Cursor)];
 DrawIconEx(Canvas.Handle,
 FOldCursorPos.X, FOldCursorPos.y, HCursor, 32, 32, 0, 0, DI_NORMAL) ;
 end;

 end.

 It is only a solution for Windows, and it does not remove the
 'permanent' cursor until a second click, but it should get you on the
 right path.

 Howard

 --
 ___
 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] Determining OS

2011-07-31 Thread Chris Kelling
I'm writing a generic installer for a project, and want to set up things
like the registry or system.d depending on the OS type.  Is there an
environment string, or a function to report what OS the system being hosted
on, or do I need to write different versions specifically for the OS?

 

-Chris

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


Re: [Lazarus] Determining OS

2011-07-31 Thread ik
2011/7/31 Chris Kelling kelli...@cox.net

  I’m writing a generic installer for a project, and want to set up things
 like the registry or system.d depending on the OS type.  Is there an
 environment string, or a function to report what OS the system being hosted
 on, or do I need to write different versions specifically for the OS?


you have the macros of WINDOWS, UNIX, LINUX etc... {$IFDEF WINDOWS} ...

Please note that system.d is Fedora implementation (v15) so for Linux you
need to detect also the Linux distro, and that's a bit more complicated.

/etc/issue Can help, but also /etc/redhat /etc/debian etc.. can also help
you to figure out what distro it is, but that will work only on specific
distro's as well.




 

 ** **

 -Chris


Ido


 

 --
 ___
 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] Determining OS

2011-07-31 Thread Graeme Geldenhuys
2011/7/31 ik ido...@gmail.com:
 Please note that system.d is Fedora implementation (v15) so for Linux you
 need to detect also the Linux distro, and that's a bit more complicated.

Any distro worth using should support the LSB standards. With that
being said, you can use the 'lsb_release' command to find out exactly
what distribution and version is being used.


--
$ lsb_release --help
Usage: lsb_release [options]

Options:
  -h, --help show this help message and exit
  -v, --version  show LSB modules this system supports
  -i, --id   show distributor ID
  -d, --description  show description of this distribution
  -r, --release  show release number of this distribution
  -c, --codename show code name of this distribution
  -a, --all  show all of the above information
  -s, --shortshow all of the above information in short format

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:Ubuntu 8.04.4 LTS
Release:8.04
Codename:   hardy

--


-- 
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] Determining OS

2011-07-31 Thread ik
On Sun, Jul 31, 2011 at 17:43, Graeme Geldenhuys graemeg.li...@gmail.comwrote:

 2011/7/31 ik ido...@gmail.com:
  Please note that system.d is Fedora implementation (v15) so for Linux you
  need to detect also the Linux distro, and that's a bit more complicated.

 Any distro worth using should support the LSB standards. With that
 being said, you can use the 'lsb_release' command to find out exactly
 what distribution and version is being used.


I'm using Arch Linux and that is my output:


$ lsb_release
LSB Version:n/a

$
-

But I have the following file:
/etc/arch-release


I think that looking for /etc/*release is more reliable at the moment for
distros.

BTW The TRegistry class is cross platform. On Windows it uses Registry, and
on other OS, it uses INI files.




 --
 $ lsb_release --help
 Usage: lsb_release [options]

 Options:
  -h, --help show this help message and exit
  -v, --version  show LSB modules this system supports
  -i, --id   show distributor ID
  -d, --description  show description of this distribution
  -r, --release  show release number of this distribution
  -c, --codename show code name of this distribution
  -a, --all  show all of the above information
  -s, --shortshow all of the above information in short format

 $ lsb_release -a
 No LSB modules are available.
 Distributor ID: Ubuntu
 Description:Ubuntu 8.04.4 LTS
 Release:8.04
 Codename:   hardy

 --


 --
 Regards,
   - Graeme -



Ido




 ___
 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

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


Re: [Lazarus] Determining OS

2011-07-31 Thread Chris Kelling
Thank you for the suggestions so far - 

 

$ lsb_release seems to give good information, my Fedora 15 machine returns

LSB Version: :core-4.0-ia32:core-4,0-noarch

 

In addition, I did a ls of the /etc directory and found a file called
system-release-cpe,  Looking in it says cpe:/o:fedoraproject:fedora:15

Now, this may be unique to fedora (isn't open source wonderful?), but if all
distros have that file, I think that may be the solution,  I've got an
ubuntu machine running, too - I should look to see what it has.

 

Say what you will about the windows registry, but at least there's a common
place to look for and put information.  And no, I don't want to start a war
over the merits of one OS over another, just trying to make my program
portable to the most machines with the least effort for the end user.

 

  _  

From: ik [mailto:ido...@gmail.com] 
Sent: Sunday, July 31, 2011 10:55
To: Lazarus mailing list
Subject: Re: [Lazarus] Determining OS

 

 

On Sun, Jul 31, 2011 at 17:43, Graeme Geldenhuys graemeg.li...@gmail.com
wrote:

2011/7/31 ik ido...@gmail.com:

 Please note that system.d is Fedora implementation (v15) so for Linux you
 need to detect also the Linux distro, and that's a bit more complicated.

Any distro worth using should support the LSB standards. With that
being said, you can use the 'lsb_release' command to find out exactly
what distribution and version is being used.


I'm using Arch Linux and that is my output:


$ lsb_release 
LSB Version:n/a

$ 
-

But I have the following file:
/etc/arch-release


I think that looking for /etc/*release is more reliable at the moment for
distros. 

BTW The TRegistry class is cross platform. On Windows it uses Registry, and
on other OS, it uses INI files.
 



--
$ lsb_release --help
Usage: lsb_release [options]

Options:
 -h, --help show this help message and exit
 -v, --version  show LSB modules this system supports
 -i, --id   show distributor ID
 -d, --description  show description of this distribution
 -r, --release  show release number of this distribution
 -c, --codename show code name of this distribution
 -a, --all  show all of the above information
 -s, --shortshow all of the above information in short format

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:Ubuntu 8.04.4 LTS
Release:8.04
Codename:   hardy

--


--
Regards,
  - Graeme -



Ido
 



___
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

 

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


Re: [Lazarus] (no subject)

2011-07-31 Thread Leonardo M . Ramé
On 2011-07-31 15:58:26 +0200, Bart wrote:
 As an end-user I would get rather confused if my mouse cursor didn't
 move anymore when I was  moving the mouse.
 
 Bart

I agree, but some times is better to fix the cursor to a specific
position. In my case, I have a N x M grid containing images in each cell
(cells uses 256x256 pixels or bigger), and the user can drag the mouse to change
its brightness and contrast, or zoom-in zoom-out inside the cell. 

If I don't fix the cursor pos, the user can start working on one cell and 
continue in the
cell at its side.

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

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


[Lazarus] TTabControl (d)evolution

2011-07-31 Thread Hans-Peter Diettrich
The implementation of the TTabControl seems to cause headaches, and 
reveals wrong assumptions of the devlopers about the behaviour of that 
control :-(


When I recently submitted an patch, with a new implementation of the 
TTabControl (named TTabs in the patch), this implementation was tested 
with the Win32 widgetset, and was fully compatible with the Delphi 
TTabControl - in contrast to any preceding implementation.


Felipe acted a bit too fast, and replaced the TTabControl by the new 
implementation, without waiting for the complete implementation with all 
widgetsets. The consequential problems showed up very soon :-(


When consequently problems with other widgetsets occured, he removed the 
intented implementation of TTabs (TNewTabControl), making it unusable at 
all. This step was undone later.


When it turned out that the IDEInspector uses a TTabControl, and stopped 
working (#19803) due to an misplaced override of ChildClassAllowed, this 
problem was not fixed in the suggested and obvious way (by moving that 
method into TPageControl). Instead the wrong assumption was stated, that 
a TTabControl cannot have child controls - what is not true for a Delphi 
compatible control.



So where are we now? We are back to the old TTabControl, that is not 
Delphi compatible, and have a TNewTabControl without an designer. Was 
this worth all the trouble?


IMO we should accept that a Delphi compatible TTabControl doesn't exist 
yet, for widgetsets other than Win32. What can/should we do, when it 
turns out that such a control can not be implemented in all widgetsets?



Why not offer the new implementation (TTabs/TNewTabControl) as 
TTabControl, to make Delphi migrants happy, and restrict its use to only 
the supported widgetsets? At the same time the old implementation can be 
renamed into TLazTabControl, that is not fully Delphi compatible, but 
immediately usable with all widgetsets?


And since the old TTabControl and TNotebook effectively share the same 
code, except for the control that shows the tabs, it would be a good 
idea to merge both into a common base class. The difference between both 
controls is implemented in their Pages classes (TUNBPages, 
TTabControlNoteBookStrings), so that effectivly only their constructors 
have to be different, where this object is created. An even simpler 
solution were to make the tabs switchable ON/OFF.


More things can be simplified, in detail the difference between visible 
and invisible pages, which applies *only* to the TPageControl. By moving 
that part out of the widgetsets into TPageControl, the implementation of 
the widgetsets and all TCustomTabControl descendants could be simplified 
a lot. Then also the restrictions would become more obvious, introduced 
by the various widgetsets.


DoDi


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


Re: [Lazarus] (no subject)

2011-07-31 Thread Leonardo M . Ramé
On 2011-07-31 13:11:49 +0100, Howard Page-Clark wrote:
 On 30/7/11 11:15, Leonardo Rame wrote:
 Hi, I would like to drag the mouse over a form, while the mouse is
 dragged, FPos X and Y values must change in the direction of the move,
 but the mouse cursor must be fixed at the position where the first click
 was made.
 
 This code does more or less what I want, but has two problems:
 
 1 - The mouse still moves a little.
 2 - The values of FPos.X and FPos.Y doesn't change.
 
 
 procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
 begin
if ssLeft in shift then
begin
  Mouse.CursorPos := ClientToScreen(FPos);
  FPos.X := X;
  FPos.Y := Y;
  Invalidate;
end;
 end;
 
 Changing the mouse cursor position interferes with the Invalidate call. Try
 this:
 
 unit Unit1;
 
 {$mode objfpc}{$H+}
 
 interface
 
 uses
   Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
 windows;
 
 type
 
   { TForm1 }
 
   TForm1 = class(TForm)
 Label1: TLabel;
 procedure FormMouseDown(Sender: TObject; Button: TMouseButton;
   Shift: TShiftState; X, Y: Integer);
 procedure FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y:
 Integer);
 procedure FormMouseUp(Sender: TObject; Button: TMouseButton;
   Shift: TShiftState; X, Y: Integer);
 procedure FormPaint(Sender: TObject);
   private
 FPos: TPoint;
 FOldCursorPos: TPoint;
 FOldCursor: TCursor;
   end;
 
 var
   Form1: TForm1;
 
 implementation
 
 {$R *.lfm}
 
 { TForm1 }
 
 procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;
   Shift: TShiftState; X, Y: Integer);
 begin
   if ssleft in shift then
   begin
 FPos.X := X;
 FPos.Y := Y;
 FOldCursorPos:= FPos;
 FOldCursor := Cursor;
 Cursor := crNone;
   end;
 end;
 
 procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
   Y: Integer);
 begin
   if ssLeft in shift then
   begin
 //Mouse.CursorPos := ClientToScreen(FPos);
 FPos.X := X;
 FPos.Y := Y;
 Invalidate;
   end;
 end;
 
 procedure TForm1.FormMouseUp(Sender: TObject; Button: TMouseButton;
   Shift: TShiftState; X, Y: Integer);
 begin
   Cursor := FOldCursor;
 end;
 
 procedure TForm1.FormPaint(Sender: TObject);
 var
HCursor : THandle;
 begin
Label1.Caption := Format('X: %d - Y: %d', [FPos.X, FPos.Y]);
HCursor := Screen.Cursors[Ord(Screen.Cursor)];
DrawIconEx(Canvas.Handle,
FOldCursorPos.X, FOldCursorPos.y, HCursor, 32, 32, 0, 0, DI_NORMAL) ;
 end;
 
 end.
 
 It is only a solution for Windows, and it does not remove the 'permanent'
 cursor until a second click, but it should get you on the right path.
 
 Howard

I tried this on Linux, with a slightly modified FormPaint event handler,
but the effect is the same as in my example. 

When I move the mouse, FPos is changed to the new values of X and Y, but
when Mouse.CursorPos is called using FOldCursorPos as new position,
OnMouseMove is called again, and FPos is changed again to its old position.

Here's my new code:

procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
  if ssleft in shift then
  begin
FPos.X := X;
FPos.Y := Y;
FOldCursorPos:= FPos;
Cursor := crNone;
 end;
end;

procedure TForm1.FormMouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
begin
  if ssLeft in shift then
  begin
FPos.X := X;
FPos.Y := Y;
Invalidate;
  end;
end;

procedure TForm1.FormMouseUp(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
  Cursor := crDefault;
end;

procedure TForm1.FormPaint(Sender: TObject);
begin
  Label1.Caption := Format('X: %d - Y: %d', [FPos.X, FPos.Y]);
  Mouse.CursorPos := ClientToScreen(FOldCursorPos);
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] Installer recommendations

2011-07-31 Thread David M. Lawrence
Back in the ancient days when I got Delphi, it was bundled with a 
version of InstallShield.  Can ya'll recommend any decent -- preferably 
free -- replacements?  If you like the Windows installer system, can 
anyone point me to a decent tutorial explaining how to use it?


Thanks,

Dave

--
--
 David M. Lawrence| Home:  (804) 559-9786
 7471 Brook Way Court | Fax:   (804) 559-9787
 Mechanicsville, VA 23111 | Email: d...@fuzzo.com
 USA  | http:  http://fuzzo.com
--

All drains lead to the ocean.  -- Gill, Finding Nemo

We have met the enemy and he is us.  -- Pogo

No trespassing
 4/17 of a haiku  --  Richard Brautigan


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


Re: [Lazarus] Installer recommendations

2011-07-31 Thread Frank Church
On 31 July 2011 17:18, David M. Lawrence d...@fuzzo.com wrote:

 Back in the ancient days when I got Delphi, it was bundled with a version
 of InstallShield.  Can ya'll recommend any decent -- preferably free --
 replacements?  If you like the Windows installer system, can anyone point me
 to a decent tutorial explaining how to use it?

 Thanks,

 Dave


I use Inno Setup http://www.jrsoftware.org/isinfo.php it is Pascal based.
I can't compare it to others because it is the only one I have used in
earnest.


 --
 --**
  David M. Lawrence| Home:  (804) 559-9786
  7471 Brook Way Court | Fax:   (804) 559-9787
  Mechanicsville, VA 23111 | Email: d...@fuzzo.com
  USA  | http:  http://fuzzo.com
 --**

 All drains lead to the ocean.  -- Gill, Finding Nemo

 We have met the enemy and he is us.  -- Pogo

 No trespassing
  4/17 of a haiku  --  Richard Brautigan


 --
 __**_
 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




-- 
Frank Church

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


Re: [Lazarus] (no subject)

2011-07-31 Thread Hans-Peter Diettrich

Leonardo M. Ramé schrieb:

On 2011-07-31 15:58:26 +0200, Bart wrote:

As an end-user I would get rather confused if my mouse cursor didn't
move anymore when I was  moving the mouse.

Bart


I agree, but some times is better to fix the cursor to a specific
position. In my case, I have a N x M grid containing images in each cell
(cells uses 256x256 pixels or bigger), and the user can drag the mouse to change
its brightness and contrast, or zoom-in zoom-out inside the cell. 


If I don't fix the cursor pos, the user can start working on one cell and 
continue in the
cell at its side.


That's why usually the user has to select a cell, before changes can be 
made to exactly the selected cell. IMO you should separate cell 
selection from other actions. Zooming may have the biggest risk for a 
changed cell under the mouse, so that I would apply zoom either to the 
entire grid, or only to a selected cell. When an individual cell has 
been zoomed out, all further operations can apply to exactly that cell, 
regardless of the mouse position.


DoDi


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


Re: [Lazarus] TTabControl (d)evolution

2011-07-31 Thread Felipe Monteiro de Carvalho
On Sun, Jul 31, 2011 at 6:49 PM, Hans-Peter Diettrich
drdiettri...@aol.com wrote:
 IMO we should accept that a Delphi compatible TTabControl doesn't exist yet,
 for widgetsets other than Win32. What can/should we do, when it turns out
 that such a control can not be implemented in all widgetsets?

I bet that it can be implemented in all widgetsets. I don't use
TTabControl, so I could be wrong, but I think that you could implement
it like this in Gtk2:

gtk_widget
-gtk_notebook
-gtk_widget

3 widgets put together. This should work fine if you can make
gtk_notebook show only the tabs without a client area.

Another idea: Override all methods which use WS routines and create a
handle for TCustomControl instead and custom draw the entire control.

 Why not offer the new implementation (TTabs/TNewTabControl) as TTabControl,
 to make Delphi migrants happy, and restrict its use to only the supported
 widgetsets? At the same time the old implementation can be renamed into
 TLazTabControl, that is not fully Delphi compatible, but immediately usable
 with all widgetsets?

We cannot have a control in the LCL which works in only 1 platform, if
it is really like that, then the current implementation is better.

 And since the old TTabControl and TNotebook effectively share the same code,
 except for the control that shows the tabs, it would be a good idea to merge
 both into a common base class.

A very bad idea, they are not even located in the same unit... plus
their class hierarchy is not even remotely similar. In fact, I don't
see anything common between them. TNotebook many pages and no tabs and
no border. TTabControl has 1 page, has border and has tabs.

Making unrelated stuff together because they look similar from a first
view to save code duplication can bring a heavy penalty in terms of
code stability and maintenability. Just think that someone tryes in
the future to fix TTabControl and by accident breaks TNotebook... This
lesson was learned with the gtk1/gtk2 mess.

In fact, I already predict that even sharing code between TTabControl
and TPageControl is a huge risk, changes could break TPageControl. The
safest would be starting a new WS object for TTabControl ...

 More things can be simplified, in detail the difference between visible and
 invisible pages, which applies *only* to the TPageControl.
 part out of the widgetsets into TPageControl, the implementation of the
 widgetsets and all TCustomTabControl descendants could be simplified a lot.
 Then also the restrictions would become more obvious, introduced by the
 various widgetsets.

Why *only* in bold. TCustomTabControl has only 2 descendents, so
TPageControl is 50% of it's descendents.

-- 
Felipe Monteiro de Carvalho

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


Re: [Lazarus] Lazarus Manager

2011-07-31 Thread Joshua Lim

Hi Kjow,

I downloaded the latest script, ran again, went fine until after reboot. 
I ran the script again, and it crashed at different points. Please 
advise, thanks.


A lazarus\examples\canvas_test\rectanglestest.pas
A lazarus\examples\canvas_test\shapedwindowtest.lfm
A lazarus\examples\canvas_test\ellipseunit.lfm
A lazarus\examples\canvas_test\drawtest.lfm
A lazarus\examples\canvas_test\shapedwindowtest.pas
A lazarus\examples\std_actions
A lazarus\examples\std_actions\unit1.lrs
A lazarus\examples\std_actions\unit1.pas
A lazarus\examples\std_actions\project1.lpr
A lazarus\examples\std_actions\manifest.rc
A lazarus\examples\std_actions\project1.lpi
A lazarus\examples\std_actions\readme.txt
A lazarus\examples\std_actions\unit1.lfm
U lazarus
è?3?°?±? 31842?£
Proceed? [Y/N]: N
Nothing else to do. Exit.
Press any key to continue . . .

I installed FPC to C:\Develop\fpc\2.4.4\, here's my settings:


set OLDDIR=%CD%
set PATHDEST=C:\Develop
set PATH=%PATHDEST%\fpc\binutils\;%PATH%
set OLDPATH=%PATH%
set SVN=Slik-Subversion-1.6.12-win32.msi
set FPCINSTVER=2.4.4
set FPCVER=2.5.1
set 
FPCURL=http://downloads.sourceforge.net/project/freepascal/Win32/%FPCINSTVER%

set FPCNAME=fpc-%FPCINSTVER%.i386-win32.exe
..
REM svn co http://svn.freepascal.org/svn/fpc/tags/release_2_4_2 fpc
svn co http://svn.freepascal.org/svn/fpc/trunk fpc



Kjow wrote:

2010/10/16 Joshua Lim joshua__...@hotmail.com:
  

Hi Kjow, there are some free choice for download from the Internet, but I
think they are not fully compatible with windows choice.  I didn't try more
as it is risky to run files downloaded from the internet. ;)
Finally, I copied the choice from my Windows 2003 server, and that one
worked.

Rgds,
Joshua



Hi Joshua,
So, now the script is fully working?

Regards,
Kjow


  



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


Re: [Lazarus] Installer recommendations

2011-07-31 Thread Graeme Geldenhuys
On 31 July 2011 18:18, David M. Lawrence wrote:
 InstallShield.  Can ya'll recommend any decent -- preferably free --
 replacements?

http://www.installjammer.com/

https://sourceforge.net/projects/mseinstaller/


Never used any of them, but they are open source and free. The latter
one is implemented in Object Pascal as well.

I have also create a cross-platform installer for our company, but I
haven't received the okay yet to release it as open source.

-- 
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] Determining OS

2011-07-31 Thread Graeme Geldenhuys
2011/7/31 ik :

 I'm using Arch Linux and that is my output:

 
 $ lsb_release
 LSB Version:    n/a


Under Ubuntu 8.04 the 'lsb_release' command on it's own doesn't give
any usable output either. You need to specify a parameter.

eg:   $ lsb_release -a


See 'lsb_release --help'  for more available options.
As shown below:

 --
 $ lsb_release --help
 Usage: lsb_release [options]

 Options:
  -h, --help         show this help message and exit
  -v, --version      show LSB modules this system supports
  -i, --id           show distributor ID
  -d, --description  show description of this distribution
  -r, --release      show release number of this distribution
  -c, --codename     show code name of this distribution
  -a, --all          show all of the above information
  -s, --short        show all of the above information in short format

 $ lsb_release -a
 No LSB modules are available.
 Distributor ID: Ubuntu
 Description:    Ubuntu 8.04.4 LTS
 Release:        8.04
 Codename:       hardy

 --

-- 
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] Determining OS

2011-07-31 Thread Graeme Geldenhuys
2011/7/31 Chris Kelling :

 $ lsb_release seems to give good information, my Fedora 15 machine returns

 LSB Version: :core-4.0-ia32:core-4,0-noarch

Specify some of the other parameters in the 'lsb_release' command and
you will get the exact information your are looking for, on any distro
that supports LSB standard.


 Say what you will about the windows registry, but at least there’s a common
 place to look for and put information.

Well yes, it's very easy if you own the OS and there is just one or
two controlled version of that OS. This applies both to Microsoft and
Apple. The benefit of closed source OS's. If you want to apply the
same principle, then you need to compare various Ubuntu releases to
each other.

The LSB (Linux Standards Base) and the FreeDesktop.org standards are
trying to make all distros more compliant with a set of standards -
making the life of any ISV and lone software developer MUCH easier.
LSB and FreeDesktop.org are supported by most mainstream distros (for
years already). If your distro doesn't, use something better, or email
the maintainers of that distro and demand better standardization.


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


[Lazarus] RE : Determining OS

2011-07-31 Thread Ludo Brands
Have you tried uname? 
This works on virtually all unix platforms. Here
http://en.wikipedia.org/wiki/Uname you'll find a sample output given by
different unix flavors. 
My Fedora 13 64bit gives  for uname -r :  2.6.34.7-56.fc13.x86_64
 
lsb_release on ubuntu 10 64 bit says: no LSB modules are available. On
debian lenny for arm: command not found...
 
uname -m gives you also the cpu the os is running on which is also important
for porting a program.  
 
Ludo 
 

-Message d'origine-
De : Chris Kelling [mailto:kelli...@cox.net] 
Envoyé : dimanche 31 juillet 2011 17:30
À : 'Lazarus mailing list'
Objet : Re: [Lazarus] Determining OS



Thank you for the suggestions so far – 

 

$ lsb_release seems to give good information, my Fedora 15 machine returns

LSB Version: :core-4.0-ia32:core-4,0-noarch

 

In addition, I did a ls of the /etc directory and found a file called
system-release-cpe,  Looking in it says cpe:/o:fedoraproject:fedora:15

Now, this may be unique to fedora (isn’t open source wonderful?), but if all
distros have that file, I think that may be the solution,  I’ve got an
ubuntu machine running, too – I should look to see what it has.

 

Say what you will about the windows registry, but at least there’s a common
place to look for and put information.  And no, I don’t want to start a war
over the merits of one OS over another, just trying to make my program
portable to the most machines with the least effort for the end user.

 


  _  


From: ik [mailto:ido...@gmail.com] 
Sent: Sunday, July 31, 2011 10:55
To: Lazarus mailing list
Subject: Re: [Lazarus] Determining OS

 

 

On Sun, Jul 31, 2011 at 17:43, Graeme Geldenhuys graemeg.li...@gmail.com
wrote:

2011/7/31 ik ido...@gmail.com:

 Please note that system.d is Fedora implementation (v15) so for Linux you
 need to detect also the Linux distro, and that's a bit more complicated.

Any distro worth using should support the LSB standards. With that
being said, you can use the 'lsb_release' command to find out exactly
what distribution and version is being used.


I'm using Arch Linux and that is my output:


$ lsb_release 
LSB Version:n/a

$ 
-

But I have the following file:
/etc/arch-release


I think that looking for /etc/*release is more reliable at the moment for
distros. 

BTW The TRegistry class is cross platform. On Windows it uses Registry, and
on other OS, it uses INI files.
 



--
$ lsb_release --help
Usage: lsb_release [options]

Options:
 -h, --help show this help message and exit
 -v, --version  show LSB modules this system supports
 -i, --id   show distributor ID
 -d, --description  show description of this distribution
 -r, --release  show release number of this distribution
 -c, --codename show code name of this distribution
 -a, --all  show all of the above information
 -s, --shortshow all of the above information in short format

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:Ubuntu 8.04.4 LTS
Release:8.04
Codename:   hardy

--


--
Regards,
  - Graeme -



Ido
 



___
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

 

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


Re: [Lazarus] RE : Determining OS

2011-07-31 Thread Graeme Geldenhuys
2011/7/31 Ludo Brands ludo.bra...@free.fr:
 Have you tried uname?

That only gives you the kernel version.


 lsb_release on ubuntu 10 64 bit says: no LSB modules are available. On
 debian lenny for arm: command not found...

Don't you guys READ!!!  I specifically showed the parameters you need
to specify with the 'lsb_release' command so you DO GET THE RIGHT
OUTPUT.

Try this:

   $ lsb_release -a


Or from my original post...

 --
 $ lsb_release --help
 Usage: lsb_release [options]

 Options:
  -h, --help         show this help message and exit
  -v, --version      show LSB modules this system supports
  -i, --id           show distributor ID
  -d, --description  show description of this distribution
  -r, --release      show release number of this distribution
  -c, --codename     show code name of this distribution
  -a, --all          show all of the above information
  -s, --short        show all of the above information in short format



-- 
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] TAChart 2nd Y Axis

2011-07-31 Thread David M. Lawrence
Excuse me for being slow, but where do I find this update?  I haven't 
figured all this out.


Dave

On 7/30/2011 2:47 AM, Alexander Klenin wrote:

On Fri, Jul 29, 2011 at 18:34, Alexander Kleninkle...@gmail.com  wrote:

On Fri, Jul 29, 2011 at 16:45, David M. Lawrenced...@fuzzo.com  wrote:

Out-of-bounds data points would be clipped.  In my case, I determined my
max/min limits empirically by scanning global temperature and precipitation
records.  There should be no out-of-bounds points -- on Earth, anyway.  If
climate conditions do affect extremes, I wrote batch procedures that allow
me to redraw all the charts in my database with new maximum and minimum
values in a matter of minutes.

I see. You may wish to enter your feature request in the bug tracker
so it will not be forgotten.
As a quick fix, since r31821 you can use TConstantLine as described in
http://wiki.lazarus.freepascal.org/TAChart_documentation#Constant_line_series

Added TChartAxis.Range property in r31822



--
--
 David M. Lawrence| Home:  (804) 559-9786
 7471 Brook Way Court | Fax:   (804) 559-9787
 Mechanicsville, VA 23111 | Email: d...@fuzzo.com
 USA  | http:  http://fuzzo.com
--

All drains lead to the ocean.  -- Gill, Finding Nemo

We have met the enemy and he is us.  -- Pogo

No trespassing
 4/17 of a haiku  --  Richard Brautigan


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


Re: [Lazarus] RE : Determining OS

2011-07-31 Thread Chris Kelling
I am looking to distribute my software to pc, linux, unix, and mac users.
I'm using the registry in Windows, and was going to use systemd for linux.
From what I'm gathering, it would be best to just do a simple config or ini
file in the root directory of the program.  I'm thinking that when creating
the installer, I will ask where the program will reside, and provide a
default that is platform independent.  That way all I need to do is provide
the deb or rpm for linux, the msi for windows, and what ever unix and apple
require (OS X is a flavor of Darwin, thus the debain packager maybe?)

 

  _  

From: ik [mailto:ido...@gmail.com] 
Sent: Sunday, July 31, 2011 14:13
To: Lazarus mailing list
Subject: Re: [Lazarus] RE : Determining OS

 

 

[edited for brevity]

 

But the original person that asked the question should explain better what
he is looking for. It might not require to detect the distro itself for
example, or to allow the package builder to tweak things, or at the first
run to ask the distro from a list of supported distro and save it in
configuration files.

It's all depends on what he requires to do.

 

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


Re: [Lazarus] RE : Determining OS

2011-07-31 Thread ik
2011/7/31 Chris Kelling kelli...@cox.net

  I am looking to distribute my software to pc, linux, unix, and mac
 users.  I’m using the registry in Windows, and was going to use systemd for
 linux.  From what I’m gathering, it would be best to just do a simple config
 or ini file in the root directory of the program.  I’m thinking that when
 creating the installer, I will ask where the program will reside, and
 provide a default that is platform independent.  That way all I need to do
 is provide the deb or rpm for linux, the msi for windows, and what ever unix
 and apple require (OS X is a flavor of Darwin, thus the debain packager
 maybe?)


You are thinking it wrong IMHO.
1. FPC's TRegistry handle that for you
2. In non Windows machines, you save custom settings in the home directory
of the users. Mostly under a hidden directory with the program name.
3. System.d is a process boot system and not a system configuration saving
4. GTK have central setting system caled gconf, it was built in the idea of
registry like system. Qt does not have one.
5. Each package for specific Linux distro solve you the requirement to
understand in the program what is the exact distro. You can even hard code
that data using IFDEF and use FPC to compile using the proper DEFINE (I wish
there would be a better tool for that though).

6. OS X is based on FreeBSD (open source unix) and not Linux. Darwin is an
engine inside OS-X.
7. OS-X have it's own package manager that use sit and dmg files (I don't
really know Mac that well to fully expand it).


Ido

 

 ** **
  --

 *From:* ik [mailto:ido...@gmail.com]
 *Sent:* Sunday, July 31, 2011 14:13
 *To:* Lazarus mailing list
 *Subject:* Re: [Lazarus] RE : Determining OS

 ** **

 ** **

 [edited for brevity]

 ** **

  But the original person that asked the question should explain better
 what he is looking for. It might not require to detect the distro itself for
 example, or to allow the package builder to tweak things, or at the first
 run to ask the distro from a list of supported distro and save it in
 configuration files.

 It's all depends on what he requires to do.

  ** **

 --
 ___
 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] RE : Determining OS

2011-07-31 Thread Eduardo

Yes, you are definily doing it wrong.
You shouldn't even have a installer for Linux. Programs in Linux with 
installers are just weird... Let the package manager do what a installer 
would do for you (you can have custom scripts in the package manager if 
that's strictly necessary, but it shouldn't).


On Mac, the most elegant install solution IMHO is to simply copy the 
Application Bundle to the /Applications folder and that is it. No 
install necessary, any configuration necessary is created the first time 
the application runs.
But if you really must have a installer for MacOSX I recommend creating 
a package for MacOSX default installer application. Again you just 
package everything with a few scripts and that is it.


Badilly written custom installer applications is a Windows thing and I'm 
happy that I don't need to bother with them anymore...



Em 31-07-2011 15:38, lazarus-requ...@lists.lazarus.freepascal.org escreveu:

Send Lazarus mailing list submissions to
lazarus@lists.lazarus.freepascal.org

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
or, via email, send a message with subject or body 'help' to
lazarus-requ...@lists.lazarus.freepascal.org

You can reach the person managing the list at
lazarus-ow...@lists.lazarus.freepascal.org

When replying, please edit your Subject line so it is more specific
than Re: Contents of Lazarus digest...


Today's Topics:

1. Re: RE : Determining OS (Graeme Geldenhuys)
2. Re: TAChart 2nd Y Axis (David M. Lawrence)
3. Re: RE : Determining OS (ik)
4. Re: RE : Determining OS (Chris Kelling)
5. Re: RE : Determining OS (ik)


--

Message: 1
Date: Sun, 31 Jul 2011 19:37:59 +0200
From: Graeme Geldenhuysgraemeg.li...@gmail.com
Subject: Re: [Lazarus] RE : Determining OS
To: Lazarus mailing listlazarus@lists.lazarus.freepascal.org
Message-ID:
CALVqcdgJehCDfHQxupsAEgjEKbYz+NzwAq21X_iGHduj=1u...@mail.gmail.com
Content-Type: text/plain; charset=UTF-8

2011/7/31 Ludo Brandsludo.bra...@free.fr:

Have you tried uname?

That only gives you the kernel version.



lsb_release on ubuntu 10 64 bit says: no LSB modules are available. On
debian lenny for arm: command not found...

Don't you guys READ!!!  I specifically showed the parameters you need
to specify with the 'lsb_release' command so you DO GET THE RIGHT
OUTPUT.

Try this:

$ lsb_release -a


Or from my original post...


--
$ lsb_release --help
Usage: lsb_release [options]

Options:
?-h, --help ? ? ? ? show this help message and exit
?-v, --version ? ? ?show LSB modules this system supports
?-i, --id ? ? ? ? ? show distributor ID
?-d, --description ?show description of this distribution
?-r, --release ? ? ?show release number of this distribution
?-c, --codename ? ? show code name of this distribution
?-a, --all ? ? ? ? ?show all of the above information
?-s, --short ? ? ? ?show all of the above information in short format





--
Eduardo
Ela virá, a revolução conquistará a todos o direito não somente ao pão mas, também, 
à poesia. (Leon Trotsky)


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


[Lazarus] RE : RE : Determining OS

2011-07-31 Thread Ludo Brands
  lsb_release on ubuntu 10 64 bit says: no LSB modules are 
 available. On 
  debian lenny for arm: command not found...
 
 Don't you guys READ!!!  I specifically showed the parameters 
 you need to specify with the 'lsb_release' command so you DO 
 GET THE RIGHT OUTPUT.
 
 Try this:
 
$ lsb_release -a
 
 
 Or from my original post...
 

Debian arm: lsb_release: not found. That is even with -a.

Fedora 13: fresh installation: not found, also not found with -a

How many -a do I need to add?

http://lmgtfy.com/?q=fedora+lsb_releasel=1

Ludo


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


Re: [Lazarus] Determining OS

2011-07-31 Thread Mark Morgan Lloyd

Graeme Geldenhuys wrote:


The LSB (Linux Standards Base) and the FreeDesktop.org standards aretrying to 
make all distros more compliant with a set of standards -making the life of any 
ISV and lone software developer MUCH easier.LSB and FreeDesktop.org are 
supported by most mainstream distros (foryears already). If your distro 
doesn't, use something better, or emailthe maintainers of that distro and 
demand better standardization.


An older servo distro we've got around here has neither lsb_release nor 
the xdg utilities, I've not checked either of the Solaris systems. 
Looking at machines in my workroom, all of the Debians currently running 
have both, except for one Lenny which doesn't have lsb_release- other 
Lennies have it.


So while the utilities are undoubtedly useful and underused, it's 
clearly important to have some sort of fallback if they turn out not to 
be available.


--
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] Installer recommendations

2011-07-31 Thread Henry Vermaak
On 31 July 2011 17:18, David M. Lawrence d...@fuzzo.com wrote:
 Back in the ancient days when I got Delphi, it was bundled with a version of
 InstallShield.  Can ya'll recommend any decent -- preferably free --
 replacements?  If you like the Windows installer system, can anyone point me
 to a decent tutorial explaining how to use it?

I can strongly recommend the Windows Installer XML (WiX) toolset:

http://wix.sourceforge.net/

It's an interface to the Windows Installer where you define all the
specifics of your project in an XML file.  It the compiles and links
into an msi file.  Documentation and tutorials are good.  I've
switched some of our products over to it and we haven't looked back.
It even does automatic driver installs.

Henry

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


Re: [Lazarus] RE : RE : Determining OS

2011-07-31 Thread Mark Morgan Lloyd

Ludo Brands wrote:
lsb_release on ubuntu 10 64 bit says: no LSB modules are 
available. On 

debian lenny for arm: command not found...
Don't you guys READ!!!  I specifically showed the parameters 
you need to specify with the 'lsb_release' command so you DO 
GET THE RIGHT OUTPUT.


Try this:

   $ lsb_release -a


Or from my original post...



Debian arm: lsb_release: not found. That is even with -a.

Fedora 13: fresh installation: not found, also not found with -a

How many -a do I need to add?

http://lmgtfy.com/?q=fedora+lsb_releasel=1


Looks like a platform thing as far as Lenny goes. Not on ARM, not on 
x86, is on SPARC. Not tried others CPUs or versions. Not tried recent 
Slackware which is the only other Linux to hand. Not tried Solaris (8 or 
10).


/If/ available, it looks useful. However the fact that one major distro 
doesn't uniformly include it emphasises that there has to be a fallback 
position, same applies to xdg*


--
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] RE : Determining OS

2011-07-31 Thread Graeme Geldenhuys
2011/7/31 ik :
 $ lsb_release -a
 LSB Version:    n/a
 Distributor ID: n/a
 Description:    (none)
 Release:    n/a
 Codename:   n/a

OK, my apologies. It's just that if I run the 'lsb_release' command on
it's own with no parameters, I too get useless information - even from
Ubuntu 8.04

 $ lsb_release
No LSB modules are available.

 and everybody (including you) replied quoting that 'lsb_release'
(without parameters) doesn't return usable results.



 It's all depends on what he requires to do.

Indeed.


-- 
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] RE : Determining OS

2011-07-31 Thread Graeme Geldenhuys
2011/7/31 Chris Kelling :
 I am looking to distribute my software to pc, linux, unix, and mac users.
 I’m using the registry in Windows, and was going to use systemd for linux.

Use the RTL function GetAppConfigDir(True) - this will normally return
'/etc' under Linux and any Unix system. GetAppConfigDir(False) will
return a directory that is writable for any normal user (no admin or
root rights required).

Also take a look at GetAppConfigFile(). This might even be better than
the above mentioned function.


-- 
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] Installer recommendations

2011-07-31 Thread Graeme Geldenhuys
On 31 July 2011 22:39, Henry Vermaak wrote:
 It's an interface to the Windows Installer where you define all the
 specifics of your project in an XML file.  It the compiles and links
 into an msi file.

I can't comment on WiX (never knew about it), but I can say our
company had terrible experiences with Windows Installer (msi files).
Apps kept restoring, it's a bitch to actually uninstall an app,
upgrading apps where a nightmare too. So much so, what we reverted
back to an old version of InstallShield Developer.  So I guess your
mileage my vary. :-/


-- 
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] Determining OS

2011-07-31 Thread Graeme Geldenhuys
On 31 July 2011 23:10, Marco van de Voort wrote:
 Any distro worth using should support the LSB standards. With that
 being said, you can use the 'lsb_release' command to find out exactly
 what distribution and version is being used.

 Not installed by default on Fedora 15:


I did say a distro worth using.  ;-) Just kidding.


But thanks to all that replied regarding the lsb command. Clearly the
various Linux distros still need to work on standardization.


-- 
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] TTabControl (d)evolution

2011-07-31 Thread Hans-Peter Diettrich

Felipe Monteiro de Carvalho schrieb:


IMO we should accept that a Delphi compatible TTabControl doesn't exist yet,
for widgetsets other than Win32. What can/should we do, when it turns out
that such a control can not be implemented in all widgetsets?


I bet that it can be implemented in all widgetsets. I don't use
TTabControl, so I could be wrong, but I think that you could implement
it like this in Gtk2:

gtk_widget
-gtk_notebook
-gtk_widget

3 widgets put together. This should work fine if you can make
gtk_notebook show only the tabs without a client area.


Fine, when will the implementation be finished?



Why not offer the new implementation (TTabs/TNewTabControl) as TTabControl,
to make Delphi migrants happy, and restrict its use to only the supported
widgetsets? At the same time the old implementation can be renamed into
TLazTabControl, that is not fully Delphi compatible, but immediately usable
with all widgetsets?


We cannot have a control in the LCL which works in only 1 platform, if
it is really like that, then the current implementation is better.


After all the compatibility discussions I have the strong impression, 
that Delphi compatibility should be reconsidered. It's easy to provide 
fully compatible components for the Win32 platform, so why do we offer a 
very different implementation of the TTabControl, that can not be Delphi 
compatible by design???




More things can be simplified, in detail the difference between visible and
invisible pages, which applies *only* to the TPageControl.
part out of the widgetsets into TPageControl, the implementation of the
widgetsets and all TCustomTabControl descendants could be simplified a lot.
Then also the restrictions would become more obvious, introduced by the
various widgetsets.


Why *only* in bold. TCustomTabControl has only 2 descendents, so
TPageControl is 50% of it's descendents.


But 50% of the widgetset code is related only to TPageControl, and makes 
a TTabControl implementation overly complicated. E.g. a TCustomPage has 
to be used to transfer attributes to the widgetset, and TCustomPage is 
related only to TPageControl. When all the tab attributes are moved into 
an record, then it's no more required that all tabbed controls must 
create dummy page controls for every tab. And as mentioned above, 
invisible pages must not be handled in the widgetsets, this can be done 
exclusively in the TPageControl. When we finally implement a widget with 
a single client area, that area can be filled with nothing, pages or 
whatsoever, under full control of the controls. Then we can have a paged 
notebook again, by simply connecting the tab selection event to an 
untabbed notebook. Currently the situation is reversed, every tabbed 
control has to use a TPageControl internally, for the only purpose to 
show the tabs :-(


DoDi


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


Re: [Lazarus] Installer recommendations

2011-07-31 Thread Hans-Peter Diettrich

Graeme Geldenhuys schrieb:

On 31 July 2011 22:39, Henry Vermaak wrote:

It's an interface to the Windows Installer where you define all the
specifics of your project in an XML file.  It the compiles and links
into an msi file.


I can't comment on WiX (never knew about it), but I can say our
company had terrible experiences with Windows Installer (msi files).


I can second that bad experience. Recently I was short on disk space, 
and wanted to uninstall several applications. Unfortunately the MSI 
rejected the uninstalls - due to lack of disk space :-(


DoDi


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


Re: [Lazarus] Lazarus Manager

2011-07-31 Thread Hans-Peter Diettrich

Joshua Lim schrieb:


set OLDDIR=%CD%
set PATHDEST=C:\Develop
set PATH=%PATHDEST%\fpc\binutils\;%PATH%


I have only the really required folders in the path, when building FPC 
or Lazarus.




REM svn co http://svn.freepascal.org/svn/fpc/tags/release_2_4_2 fpc
svn co http://svn.freepascal.org/svn/fpc/trunk fpc


Can you tell me where svn.exe resides? I'm using TortoiseSVN, and 
couldn't find a commanline version of svn on my machine :-(


DoDi


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


Re: [Lazarus] Lazarus Manager

2011-07-31 Thread Flávio Etrusco
On Sun, Jul 31, 2011 at 10:02 PM, Hans-Peter Diettrich
drdiettri...@aol.com wrote:
 Joshua Lim schrieb:

 set OLDDIR=%CD%
 set PATHDEST=C:\Develop
 set PATH=%PATHDEST%\fpc\binutils\;%PATH%

 I have only the really required folders in the path, when building FPC or
 Lazarus.


 REM svn co http://svn.freepascal.org/svn/fpc/tags/release_2_4_2 fpc
 svn co http://svn.freepascal.org/svn/fpc/trunk fpc

 Can you tell me where svn.exe resides? I'm using TortoiseSVN, and couldn't
 find a commanline version of svn on my machine :-(

 DoDi

TortoiseSVN links svn as library,

-Flávio

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


Re: [Lazarus] The mouse doesn't appears in Windows Mobile 6.5

2011-07-31 Thread Arí Ricardo Ody
- Original Message -
 Which device are you using? It has no touch screen? You attached a external 
mouse to it? Samsung GT-b7320L Omnia Pro Messenger Phone running Windows Mobile 
6.5. No it's a smart phone without touch screen. There is no external mouse. 
There is a kind of joystick button that acts like a mouse. See pictures at: 
http://www.google.com.br/search?q=samsung+gt-b7320l+picturehl=pt-BRclient=firefox-ahs=kdhrls=org.mozilla:pt-BR:officialprmd=ivnstbm=ischtbo=usource=univsa=Xei=7Pc1Tp3DFIODgAefxdzyDAved=0CCEQsAQbiw=1144bih=524
  Does the mouse show on other applications? Of course. In the pages of the 
Bradesco Bank or the Banrisul bank I can point the mouse to very different 
places in the screen and click. After I point to other place and click again 
and so on. LCL-Wince does not do anything special to show or hide a mouse. -- 
Felipe Monteiro de Carvalho -- ___ 
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] Should StringGrid1.Clear clear the fixed rows / columns?

2011-07-31 Thread John Repucci
I have a fixed row in my SG with the titles for the columns, but when I do a
SG.clear, the fixed rows are deleted.
I understand why that is happening (the so-called fixed rows are just row
[0] within the SG).

However, it would be nice if the fixed rows were not affected by the clear.
Am I missing something in the setup of the SG which would prevent the fixed
row from being cleared or is this a bug or a potential enhancement request?

I could implement something like VirtualStringView/Tree and I am using that
elsewhere in my program for another purpose, but I was looking for a
lightweight grid.

0.9.31-31292-2.4.4-win32-Vista
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TAChart 2nd Y Axis

2011-07-31 Thread Alexander Klenin
On Mon, Aug 1, 2011 at 04:52, David M. Lawrence d...@fuzzo.com wrote:
 Excuse me for being slow, but where do I find this update?  I haven't
 figured all this out.

http://wiki.lazarus.freepascal.org/Getting_Lazarus

-- 
Alexander S. Klenin

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


Re: [Lazarus] The mouse doesn't appears in Windows Mobile 6.5

2011-07-31 Thread Felipe Monteiro de Carvalho
2011/8/1 Arí Ricardo Ody ar...@gmx.com:
 Does the mouse show on other applications?

 Of course. In the pages of the Bradesco Bank or the Banrisul bank I can
 point the mouse to very different places in the screen and click. After I
 point to other place and click again and so on.

That does not mean anything ... the browser could have drawn it's own
mouse pointer in reaction to VK_UP, DOWN, LEFT and RIGHT (Key down
events). At least Opera Mobile and Opera Mini do that! If the device
has it's own non-standard mouse pointer you will even see two pointers
sometime, a device pointer and the one created by the application.

It should be possible to do that in your own application, but I don't
know if it is possible to do that and still use native controls. For a
browser this is not a problem, because the browser is composed almost
entirely by 1 custom drawn control ocupying almost the entire screen.
If your app is similar, you can draw a mouse pointer limited to your
drawing control.

-- 
Felipe Monteiro de Carvalho

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