[Lazarus] Main menu hiding

2008-10-01 Thread Mark Morgan Lloyd
0.9.25 compiled for Win-32 running on NT allows you to hide and unhide a 
form's main menu depending on the visibility of the items on the menu, 
i.e. if nothing's visible on the menu then it doesn't take any space on 
the form.

When compiled for gtk running on Debian Sarge x86 the menu is hidden 
as a thin strip which expands to its full height when items on it are 
made visible but cannot be hidden again.

-- 
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@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Event editing on ARM Linux

2008-10-01 Thread Mark Morgan Lloyd
0.9.25 compiled for Linux on ARM (little-endian) appears to have a 
problem with the event editor.

If I put a button on a form then double-click on the OnClick event I 
get a messagebox Unable to find method. Please fix the error shown in 
the message window. The message is Error: source not found: unit 
/usr/local/share/lazarus/lcl/units/arm-linux/stdctrls.ppu.

I admit to being rather inexperienced on that particular platform but I 
think I've set it up the same as other systems. In particular I can 
specifically see lcl/stdctrls.pp.

Irrespective of whether the problem has shown up it is impossible to 
exit without getting an access violation.

-- 
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@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Event editing on ARM Linux

2008-10-01 Thread Mattias Gärtner
Zitat von Mark Morgan Lloyd [EMAIL PROTECTED]:

 0.9.25 compiled for Linux on ARM (little-endian) appears to have a
 problem with the event editor.

 If I put a button on a form then double-click on the OnClick event I
 get a messagebox Unable to find method. Please fix the error shown in
 the message window. The message is Error: source not found: unit
 /usr/local/share/lazarus/lcl/units/arm-linux/stdctrls.ppu.

 I admit to being rather inexperienced on that particular platform but I
 think I've set it up the same as other systems. In particular I can
 specifically see lcl/stdctrls.pp.

 Irrespective of whether the problem has shown up it is impossible to
 exit without getting an access violation.

Please test with svn r16827.

Mattias


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


[Lazarus] How can I popup a message in PDA?

2008-10-01 Thread Usuario Anónimo
From wikilazarus:

TWinControl.PopupMenu showing

Showing the popup menu of a windowed control is implemented using the native
behavior of the Windows CE platform for touch screens. The user holds the
pointer in a given control for a certain amount of time and the popup shows.
This is implemented on the WM_LBUTTONDOWN message handler by calling
SHRecognizeGesture.

For more details see:

*
http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revroot=lazarusrevision=13728

I download the patch (wincecallback.inc) from Paul Michell, which implements
showing popup menus from mouse gestures on wince, but I do not know how to
use it.

Best regards.
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] When is the next release?

2008-10-01 Thread Graeme Geldenhuys
Hi,

I know you guys are getting ready for the next release.  Do you have
an estimated date?  I've got some changes for the LCL-fpGUI widget
set, but I can hold off on those changes if needed.


Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Problems: TDBGrid under WinCE

2008-10-01 Thread Felipe Monteiro de Carvalho
If you are using 0.9.24, then try updating to 0.9.25 as explained in
the other e-mail.

The most common cause of something not working is a bug in the
interface. If the problem persists, you can try finding a fix yourself
and sending it to us or you can report a bug in the bug tracker.


-- 
Felipe Monteiro de Carvalho
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] How can I popup a message in PDA?

2008-10-01 Thread Felipe Monteiro de Carvalho
2008/10/1 Usuario Anónimo [EMAIL PROTECTED]:
 I download the patch (wincecallback.inc) from Paul Michell, which implements
 showing popup menus from mouse gestures on wince, but I do not know how to
 use it.

To use the changes in the patch you should use a lazarus version which
contains this patch, and not download it and somehow use it directly.

The latest stable release (0.9.24) does not contain the patch, so you
need to use a snapshot from the latest 0.9.25, as explained here:

http://wiki.lazarus.freepascal.org/Windows_CE_Interface#Using_the_snapshot_add-on_installer

A new release (0.9.26) is also very near.

-- 
Felipe Monteiro de Carvalho

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


Re: [Lazarus] When is the next release?

2008-10-01 Thread Felipe Monteiro de Carvalho
On Wed, Oct 1, 2008 at 8:40 AM, Graeme Geldenhuys
[EMAIL PROTECTED] wrote:
 I know you guys are getting ready for the next release.  Do you have
 an estimated date?  I've got some changes for the LCL-fpGUI widget
 set, but I can hold off on those changes if needed.

The next release has already been tagged, which means that changes
don't go directly to 0.9.26 unless merged, so you can freely work in
the trunk, and this is specially true for lcl-fpgui, because it is in
such a basic stage.

-- 
Felipe Monteiro de Carvalho
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] When is the next release?

2008-10-01 Thread Vincent Snijders
2008/10/1 Graeme Geldenhuys [EMAIL PROTECTED]:
 Hi,

 I know you guys are getting ready for the next release.  Do you have
 an estimated date?  I've got some changes for the LCL-fpGUI widget
 set, but I can hold off on those changes if needed.

We have tagged the sources for 0.9.26, but I am waiting with building
until we have more certainty over stability of these sources, in
particular about http://bugs.freepascal.org/view.php?id=12269

Trunk has Lazarus 0.9.27 and is ready for your patches.

Vincent
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] When is the next release?

2008-10-01 Thread Graeme Geldenhuys
On Wed, Oct 1, 2008 at 1:55 PM, Felipe Monteiro de Carvalho
[EMAIL PROTECTED] wrote:

 The next release has already been tagged, which means that changes
 don't go directly to 0.9.26 unless merged, so you can freely work in
 the trunk, and this is specially true for lcl-fpgui, because it is in
 such a basic stage.

OK, thanks Felipe.


Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Event editing on ARM Linux

2008-10-01 Thread Mark Morgan Lloyd
Mattias Gärtner wrote:

 Please test with svn r16827.

Will do but it will take me a couple of days.

-- 
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@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Bug in keyboard shortcut in Search Replace dialog

2008-10-01 Thread Graeme Geldenhuys
Hi,

Can anybody else confirm this before I submit a bug report.  When you
open the Search  Replace dialog. Pressing Alt+A for replace all
doesn't work.  I'm using Lazarus v0.9.25 r16644M i386-linux-gtk


Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Bug in keyboard shortcut in Search Replace dialog

2008-10-01 Thread Vincent Snijders
2008/10/1 Graeme Geldenhuys [EMAIL PROTECTED]:
 Hi,

 Can anybody else confirm this before I submit a bug report.  When you
 open the Search  Replace dialog. Pressing Alt+A for replace all
 doesn't work.  I'm using Lazarus v0.9.25 r16644M i386-linux-gtk

Works on windows.

Vincent
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Generate a string with a record of SQLite3 database

2008-10-01 Thread Usuario Anónimo
Hello, I have a SQLite3 database and I want to send the records by lNet
components.

I need to create a string from the fields of the table.

I have this:

  with DataModule1.Db do
begin
  TableName := 'Item';
  if not TableExists then
  begin
FieldDefs.Clear;
FieldDefs.Add('Code',ftAutoInc); // ftAutoInc con ftString hce falta
establecer una clave primaria PrimaryKey := 'Code';
FieldDefs.Add('Description',ftString);
FieldDefs.Add('Stock',ftBoolean);
CreateTable;
  end;
end;

records:
1, Description1, False
2, Description2, False
3, Description3, True

and I want to create a string, for example:

1#Description1#False

to send this by lNet.

I do this:

sequence := Db.FieldValues['Code'] + '#' '@' +
   Db.FieldValues['Proveedor'] + '#' '@' +
   Db.FieldValues['Almacen'] + '#' '@' +
   Db.FieldValues['Unidades'];

but I get the following error: Project raised exception class
'RunError(231)'.

Two things:

1.- Which is the correct form to generate the string?
2.- It is necessary to beforehand know the name the fields to generate the
string?

I want something like this:

for i:= 1 to Db.FieldCount do
  Db.FieldValues[i];

Regards.
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross compiling a package woes..

2008-10-01 Thread Brad Campbell
Mattias Gärtner wrote:

 The CPU override was not used for projects. Fixed in 16831.
 
 You can use 'fpc' instead of 'ppc386'. This will call ppc386 or ppcppc or
 whatever automatically.

I see... ppc386 was in my lazarus config.. fixed that.. then got this..

[EMAIL PROTECTED]:~/devel/fpc/Projects/Pascal/SIDE$ ../../../lazarus/lazbuild 
--cpu=powerpc --os=darwin 
--ws=carbon BST.lpr
TLazPackageGraph.CheckIfPackageNeedsCompilation  No state file for tv 0.0
   $08048D34  TLAZBUILDAPPLICATION__ONIDEMESSAGEDIALOG,  line 267 of 
lazbuild.lpr
   $0815A8E7  CHECKFILE,  line 3152 of 
/home/brad/devel/fpc/lazarus/packager/packagesystem.pas
   $0815A661  TLAZPACKAGEGRAPH__CHECKAMBIGUOUSPACKAGEUNITS,  line 3190 of 
/home/brad/devel/fpc/lazarus/packager/packagesystem.pas
   $081594E9  TLAZPACKAGEGRAPH__COMPILEPACKAGE,  line 2898 of 
/home/brad/devel/fpc/lazarus/packager/packagesystem.pas
   $081590A7  TLAZPACKAGEGRAPH__COMPILEREQUIREDPACKAGES,  line 2800 of 
/home/brad/devel/fpc/lazarus/packager/packagesystem.pas
   $08049EF8  TLAZBUILDAPPLICATION__BUILDPROJECT,  line 612 of lazbuild.lpr
   $08048F11  TLAZBUILDAPPLICATION__BUILDFILE,  line 297 of lazbuild.lpr
   $0804B622  TLAZBUILDAPPLICATION__RUN,  line 975 of lazbuild.lpr
   $0804CAC1  main,  line 1179 of lazbuild.lpr
was found in one of the source directories of the package tv 0.0 and looks like 
a compiled 
unit.Compiled units must be in the output directory of the package, 
otherwiseDelete ambiguous file?t 
problems using this package.

-- 
Dolphins are so intelligent that within a few weeks they can
train Americans to stand at the edge of the pool and throw them
fish.


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


[Lazarus] CodeTools restore editor window

2008-10-01 Thread ik
Hello,

I'm using revision 16830 on Linux with GTK2, and when I either use
CTRL+Shift+C or alt+space, code tools takes my editor window out of
maximized into a normal size.
Is that something I can tweak, or should I report it as a bug ?

Thanks,
Ido
-- 
http://ik.homelinux.org/
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross compiling a package woes..

2008-10-01 Thread Vincent Snijders
Brad Campbell schreef:
 
 Ok, I did a svn up, make distclean ; make LCL_PLATFORM=gtk2 all .. and it's 
 still not working.
 
 It's still giving precisely the output above.. with 
 CmdLine=/opt/cross/bin/ppc386.. I'm sure that 
 should just be /opt/cross/bin/fpc and it will figure it out from the -P and 
 -T parameters..
 
 I've managed to get lazarus to cross-compile for powerpc, using make 
 directly. I've managed to get 
 it to compile the idepkg target (after having to add the ~/lazarus/TreeView 
 path to my -Fu in 
 ~/.fpc.cfg).. but lazbuild still will not pick the right compiler for me.
 
 It's griping it can't find the comctrls unit (which is fair, it's using 
 ppc386 and looking for a 386 
 binary in the powerpc directory).
 
 Am I doing something obviously stupid?
 

What compiler did you specify in the environment options of lazarus? If 
you don't want to use that, you can specify the compiler on the lazbuild 
command line using the --compiler parameter. See 
http://wiki.lazarus.freepascal.org/lazbuild#Options

Vincent

Vincent
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] codetool consistence exception

2008-10-01 Thread Martin Friebe
Just got the following exception (SVN 0.9.27,  16831). Not seen it 
before. (it happened while hovering over a comment / hinttimer)

any idea how to find out more, before pasting it into a bugreport?



TApplication.HandleException
  Stack trace:
  $007A4E45  TCODETREENODE__CONSISTENCYCHECK,  line 654 of codetree.pas
  $007A57D4  TCODETREE__CONSISTENCYCHECK,  line 908 of codetree.pas
  $007C25D9  TCUSTOMCODETOOL__CONSISTENCYCHECK,  line 2052 of 
customcodetool.pas
  $007D53A4  TFINDDECLARATIONTOOL__CONSISTENCYCHECK,  line 7620 of 
finddeclarationtool.pas
  $00786993  TCODETOOLMANAGER__CONSISTENCYCHECK,  line 4815 of 
codetoolmanager.pas
  $00786BCE  TCODETOOLMANAGER__WRITEDEBUGREPORT,  line 4855 of 
codetoolmanager.pas
  $0077C241  TCODETOOLMANAGER__WRITEERROR,  line 1597 of codetoolmanager.pas
  $0077C10A  TCODETOOLMANAGER__HANDLEEXCEPTION,  line 1575 of 
codetoolmanager.pas
  $0077CD28  TCODETOOLMANAGER__FINDSMARTHINT,  line 1778 of 
codetoolmanager.pas
  $0099A546  TCODEHELPMANAGER__GETHTMLHINT,  line 10829 of codehelp.pas
  $0085E04E  TIDEHELPMANAGER__GETHINTFORSOURCEPOSITION,  line 1259 of 
helpmanager.pas
  $0045F0D1  TMAINIDE__ONSRCNOTEBOOKSHOWHINTFORSOURCE,  line 13129 of 
main.pp
  $008C6C87  TSOURCENOTEBOOK__SHOWSYNEDITHINT,  line 6358 of sourceeditor.pp
  $008C68DD  TSOURCENOTEBOOK__HINTTIMER,  line 6288 of sourceeditor.pp
  $00593335  TCUSTOMTIMER__DOONTIMER,  line 182 of customtimer.pas
  $00593283  TCUSTOMTIMER__TIMER,  line 157 of customtimer.pas
  $005A8092  TIMERCALLBACKPROC,  line 2664 of win32callback.inc


same, but with more contect:

TCodeToolManager.OnGetCodeToolForBuffer] 
Sender=C:\lazarus_latest\components\synedit\syneditfoldedtext.pp 
Code=C:\lazarus_latest\fpc\2.2.3\
source\rtl\objpas\objpas.pp
TPascalParserTool.BuildTree A
TCustomCodeTool.UpdateNeeded A True FForceUpdateNeeded=False
TCustomCodeTool.UpdateNeeded END  Result=False
 File found !!! C:\lazarus_latest\fpc\2.2.3\source\rtl\win32\system.pp
[TCodeToolManager.OnGetCodeToolForBuffer] 
Sender=C:\lazarus_latest\components\synedit\syneditfoldedtext.pp 
Code=C:\lazarus_latest\fpc\2.2.3\
source\rtl\win32\system.pp
TPascalParserTool.BuildTree A
TCustomCodeTool.UpdateNeeded A True FForceUpdateNeeded=False
TCustomCodeTool.UpdateNeeded END  Result=False
 File found !!! C:\lazarus_latest\fpc\2.2.3\source\rtl\win\sysutils.pp
[TCodeToolManager.OnGetCodeToolForBuffer] 
Sender=C:\lazarus_latest\components\synedit\syneditfoldedtext.pp 
Code=C:\lazarus_latest\fpc\2.2.3\
source\rtl\win\sysutils.pp
TPascalParserTool.BuildTree A
TCustomCodeTool.UpdateNeeded A True FForceUpdateNeeded=False
TCustomCodeTool.UpdateNeeded END  Result=False
 File found !!! C:\lazarus_latest\fpc\2.2.3\source\rtl\win32\classes.pp
[TCodeToolManager.OnGetCodeToolForBuffer] 
Sender=C:\lazarus_latest\components\synedit\syneditfoldedtext.pp 
Code=C:\lazarus_latest\fpc\2.2.3\
source\rtl\win32\classes.pp
TPascalParserTool.BuildTree A
TCustomCodeTool.UpdateNeeded A True FForceUpdateNeeded=False
TCustomCodeTool.UpdateNeeded END  Result=False
 File found !!! C:\lazarus_latest\lcl\lclproc.pas
[TCodeToolManager.OnGetCodeToolForBuffer] 
Sender=C:\lazarus_latest\components\synedit\syneditfoldedtext.pp 
Code=C:\lazarus_latest\lcl\lclpro
c.pas
TPascalParserTool.BuildTree A
TCustomCodeTool.UpdateNeeded A True FForceUpdateNeeded=False
TCustomCodeTool.UpdateNeeded END  Result=False
 File found !!! C:\lazarus_latest\fpc\2.2.3\source\rtl\objpas\objpas.pp
[TCodeToolManager.OnGetCodeToolForBuffer] 
Sender=C:\lazarus_latest\components\synedit\syneditfoldedtext.pp 
Code=C:\lazarus_latest\fpc\2.2.3\
source\rtl\objpas\objpas.pp
TPascalParserTool.BuildTree A
TCustomCodeTool.UpdateNeeded A True FForceUpdateNeeded=False
TCustomCodeTool.UpdateNeeded END  Result=False
 File found !!! C:\lazarus_latest\fpc\2.2.3\source\rtl\win32\system.pp
[TCodeToolManager.OnGetCodeToolForBuffer] 
Sender=C:\lazarus_latest\components\synedit\syneditfoldedtext.pp 
Code=C:\lazarus_latest\fpc\2.2.3\
source\rtl\win32\system.pp
TPascalParserTool.BuildTree A
TCustomCodeTool.UpdateNeeded A True FForceUpdateNeeded=False
TCustomCodeTool.UpdateNeeded END  Result=False
[TCodeToolManager.DeactivateWriteLock] FWriteLockCount=0 FWriteLockStep=94
TApplication.HandleException
  Stack trace:
  $007A4E45  TCODETREENODE__CONSISTENCYCHECK,  line 654 of codetree.pas
  $007A57D4  TCODETREE__CONSISTENCYCHECK,  line 908 of codetree.pas
  $007C25D9  TCUSTOMCODETOOL__CONSISTENCYCHECK,  line 2052 of 
customcodetool.pas
  $007D53A4  TFINDDECLARATIONTOOL__CONSISTENCYCHECK,  line 7620 of 
finddeclarationtool.pas
  $00786993  TCODETOOLMANAGER__CONSISTENCYCHECK,  line 4815 of 
codetoolmanager.pas
  $00786BCE  TCODETOOLMANAGER__WRITEDEBUGREPORT,  line 4855 of 
codetoolmanager.pas
  $0077C241  TCODETOOLMANAGER__WRITEERROR,  line 1597 of codetoolmanager.pas
  $0077C10A  TCODETOOLMANAGER__HANDLEEXCEPTION,  line 1575 of 
codetoolmanager.pas
  $0077CD28  TCODETOOLMANAGER__FINDSMARTHINT,  line 1778 of 
codetoolmanager.pas
  $0099A546  

[Lazarus] Exception when I change betwen forms

2008-10-01 Thread Usuario Anónimo
Sometimes in a simple applicattion whith a principal form and several
secondary forms accesed by a TMainMenu I get the error:

Access violation.

Press Ok to ignore and risk data corruption.
Press Cancel to kill the program.

when I branch between forms. Anybody help me?

My application:

unit Unit1;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, Menus;

type

  { TForm1 }

  TForm1 = class(TForm)
MainMenu1: TMainMenu;
MenuItem1: TMenuItem;
MenuItem2: TMenuItem;
MenuItem3: TMenuItem;
MenuItem4: TMenuItem;
procedure MenuItem1Click(Sender: TObject);
procedure MenuItem2Click(Sender: TObject);
procedure MenuItem3Click(Sender: TObject);
  private
{ private declarations }
  public
{ public declarations }
  end;

var
  Form1: TForm1;

implementation

uses Unit2, Unit3, Unit4;

{ TForm1 }

procedure TForm1.MenuItem1Click(Sender: TObject);
begin
 Form2 := TForm2.Create (Application);
 try
  Form2.ShowModal;
 finally
  Form2.Free;
 end;
end;

procedure TForm1.MenuItem2Click(Sender: TObject);
begin
 Form3 := TForm3.Create (Application);
 try
  Form3.ShowModal;
 finally
  Form3.Free;
 end;
end;

procedure TForm1.MenuItem3Click(Sender: TObject);
begin
 Form4 := TForm4.Create (Application);
 try
  Form4.ShowModal;
 finally
  Form4.Free;
 end;
end;

initialization
  {$I unit1.lrs}

end.

Unit2.pas

unit Unit2;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, Menus;

type

  { TForm2 }

  TForm2 = class(TForm)
MainMenu1: TMainMenu;
MenuItem1: TMenuItem;
procedure MenuItem1Click(Sender: TObject);
  private
{ private declarations }
  public
{ public declarations }
  end;

var
  Form2: TForm2;

implementation

{ TForm2 }

procedure TForm2.MenuItem1Click(Sender: TObject);
begin
  Close;
end;

initialization
  {$I unit2.lrs}

end.

Regards.
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Generate a string with a record of SQLite3 database

2008-10-01 Thread Joost van der Sluis
Op woensdag 01-10-2008 om 17:06 uur [tijdzone +0200], schreef Usuario
Anónimo:
 sequence := Db.FieldValues['Code'] + '#' +
Db.FieldValues['Proveedor'] + '#' +
Db.FieldValues['Almacen'] + '#' +
Db.FieldValues['Unidades'];

Please don't use the FieldValues property. I didn't even knew that
property existed until recently. But afaik your code should work with
fpc 2.2.2 or maybe 2.3.1. If not, please create a bug-report.

But in the general case, use Db.FieldByName('Proveedor').AsString.
That's faster and you avoid the use of variants. If you do need a
variant, use Db.FieldByName.Value.

 I want something like this:
  
 for i:= 1 to Db.FieldCount do
   Db.FieldValues[i];


for i := 0 to Db.Fieldcount -1 do
  writeln(db.fields[0].AsString);

Joost

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


Re: [Lazarus] Generate a string with a record of SQLite3 database

2008-10-01 Thread Joost van der Sluis
Op woensdag 01-10-2008 om 17:06 uur [tijdzone +0200], schreef Usuario
Anónimo:
 sequence := Db.FieldValues['Code'] + '#' +
Db.FieldValues['Proveedor'] + '#' +
Db.FieldValues['Almacen'] + '#' +
Db.FieldValues['Unidades'];

btw: Where did you get the idea to use FieldValues from? I don't know
anybody using it? Did you find it somewhere on the net, or did you found
it out yourselve? (Using ideas from other program-languages?)

Joost.


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


Re: [Lazarus] Generate a string with a record of SQLite3 database

2008-10-01 Thread Usuario Anónimo
I put Db. and the code completion show it. I am beginner.

Regards.

PD: Thank you very much, your solution is very good!

2008/10/1 Joost van der Sluis [EMAIL PROTECTED]

 Op woensdag 01-10-2008 om 17:06 uur [tijdzone +0200], schreef Usuario
 Anónimo:
  sequence := Db.FieldValues['Code'] + '#' +
 Db.FieldValues['Proveedor'] + '#' +
 Db.FieldValues['Almacen'] + '#' +
 Db.FieldValues['Unidades'];

 btw: Where did you get the idea to use FieldValues from? I don't know
 anybody using it? Did you find it somewhere on the net, or did you found
 it out yourselve? (Using ideas from other program-languages?)

 Joost.


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

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


Re: [Lazarus] Generate a string with a record of SQLite3 database

2008-10-01 Thread Inoussa OUEDRAOGO
 btw: Where did you get the idea to use FieldValues from? I don't know
 anybody using it? Did you find it somewhere on the net, or did you found
 it out yourselve? (Using ideas from other program-languages?)

FieldValues is an old property of TDataset, so it seems to me that
it is a rather
used one. I for one use it regularly in Delphi code.

-- 
Inoussa O.
___
Lazarus mailing list
Lazarus@lazarus.freepascal.org
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus