Re: [Lazarus] revision numbers of each SVN tag?

2009-04-16 Thread Joost van der Sluis
Op donderdag 16-04-2009 om 08:49 uur [tijdzone +0200], schreef Graeme
Geldenhuys:
> On Wed, Apr 15, 2009 at 10:14 PM, Hans-Peter Diettrich
>  wrote:
> >
> > Distinguish between distribution lines. My suggestion is for the
> > repository itself. A tarball can contain the patched version, and can
> > have other naming conventions. RPM packages frequently come with
> > patches. etc.
> 
> I am actually done chatting on this thread, but to reiterate your
> point. When last did you see a Windows OS being released and not have
> patches available in the first week of release. Even in open-source
> projects like Ubuntu. They day it gets released, there are updates to
> be downloaded. And with the Ubuntu LTS (Longe Term Support) versions
> they release point releases a few moths later - fixing even more bugs.

Well, you don't have any experience in building linux-distribution
releases also, that is clear.

For distributions the same thing holds as for us: if a show-stopper
occurs, the release is delayed. Last example is the release of Fedora 11
beta. It was delayed 2 weeks because of some show-stoppers. (2 weeks is
very long, and believe me: nobody was happy with it) 

But the point is that distributions only find issues 'show-stoppers'
when the files concerned are on the cd's. And if they contain bugs in
the installer, or security issues while installing Fedora. Thus:
problems which may arrise before the patch-and-update mechanism is in
place. (This was also the problem in the latest fpc release: it was only
harmfull the first time you would run the installation-utility)

Distributions handle things like these exactly as how we do. Unimportant
things can be done in patches.

> Why can't FPC release patches ( or new .pp, .inc and .ppu files) for
> those unexpected show stoppers. It would save the release builders
> hours of time. Note, this is only mean for those critical unforeseen /
> show stopper issues.

Well, that's one of the reasons we made fppkg. But that's not something
you do in a few weeks...

Joost.

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


Re: [Lazarus] revision numbers of each SVN tag?

2009-04-15 Thread Joost van der Sluis
Op woensdag 15-04-2009 om 11:25 uur [tijdzone +0200], schreef Graeme
Geldenhuys:
> On Wed, Apr 15, 2009 at 11:07 AM, Joost van der Sluis  wrote:
> >
> > ps: Releasing a fpc release costs more then 4 months! FOUR MONTHS! And
> > still we had to cancel the release on the day of the planned release.
> 
> How did this thread become all about FPC releases??? This is the
> Lazarus mailing list as far as I know, and I was refering to the
> Lazarus repository - nothing to do with FPC releases.  Please stay
> on-topic.

The whole git-stuff is off-topic. Most people here don't care. But we do
care about releasing lazarus and fpc versions. And both the Lazarus team
and the fpc-team merged changes to a tag to make this happen.

And that's the thing you are attacking, merging to tags. The latest
Lazarus release was a usefull example of this, but fpc used this also.

You can state that 'thou shoudn't do that'. I want to point out is that
the two largest OS-projects I know did use this trick. (And we're not
alone)

And you are all making fuzz about this being illogical and such, but you
have only worked with tiny os-projects like tiOPF and fpGUI. Well, I can
live according to some stupid rules for such small projects also. But we
are talking about more complex things here.

As pointed out even in the git-documentation: these cases happen.

Joost.


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


Re: [Lazarus] revision numbers of each SVN tag?

2009-04-15 Thread Joost van der Sluis
Op dinsdag 14-04-2009 om 16:06 uur [tijdzone +0200], schreef Graeme
Geldenhuys:
> On Tue, Apr 14, 2009 at 3:31 PM, Florian Klaempfl
>  wrote:
> >
> > And what if someone realizes that one patch is missing?
> 
> Well, is that not what "release canditate" or stable branches are for?
> Users at least expect updates and backports of patches in a branch.
> Then test, test and test! Once everything is working, create a release
> tag based on that branch.
> 
> > Skip a release
> > number? We will never to this again, we did this in FPC 1.0.x times and
> > it caused a lot of confusion. Better a tag is moved ...
> 
> Isn't that what point releases are for??
> 
> * Release 0.9.26.
> * Oh crap, we didn't test enough and 0.9.26 is broken.
> * merge, fix and retest using the branch release 0.9.26 was based on.
> * Release 0.9.26.1
> 
> in the mean time new development continues on unstable trunk (0.9.27)...
> 
> If a release is broken one day after it has been released, then
> clearly not enough testing was done on that stable branch. In that
> case, release candidate branches should have a longer lifespan.
> 
> Just because a tag can have updates, doesn't mean it must. It goes
> against what most people know or expect and is even documented as such
> in the SubVersion docs. It simply adds more confusion. Once a release
> is out, it should be final. Point releases should follow from that to
> fix minor or overlooked issues.

Dream on


and then get back to the real world.

Joost.

ps: Releasing a fpc release costs more then 4 months! FOUR MONTHS! And
still we had to cancel the release on the day of the planned release.

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


Re: [Lazarus] revision numbers of each SVN tag?

2009-04-15 Thread Joost van der Sluis
Op dinsdag 14-04-2009 om 12:35 uur [tijdzone +0200], schreef Hans-Peter
Diettrich:
> Graeme Geldenhuys schrieb:
> 
> >> Yes, but beware the some of them got merges from trunk afterwards.
> >>
> >> For instance, lazarus_0_9_26_2 is based on 18716, and r18269 got merged
> >>  resulting in r18898. So you cannot simpy use r18898 for the tag.
> > 
> > I noticed that...  Doesn't that defeat the point of tags???  Branches
> > are used for merging things. Tags should be set in stone - a snapshot
> > at a specific point in time.
> 
> I'll second that.
> 
> Later fixes should be supplied as patches (AKA "service packs"), IMO.

You have never managed the release of a complex (open-source?)
application, didn't you?

If a showstopper pops up, you have to cancel the release and make
another. You can't release buggy software and then release a
service-pack on the day the original release is released! 

Joost

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


Re: [Lazarus] Free Pascal version 2.2.4 released

2009-04-13 Thread Joost van der Sluis
Op maandag 13-04-2009 om 11:04 uur [tijdzone +1100], schreef Alexander
Klenin:
> On Mon, Apr 13, 2009 at 03:19, Joost van der Sluis  wrote:
> >
> > The Free Pascal team is pleased to announce that version 2.2.4 has been
> > released and is available for download for all major platforms:
> 
> Congratulations to FPC team.

Thanks.

> The link to user changes from the announcement on freepascal.org site
> is pointing
> to a changes from previous release.

I've changed it.

Joost.

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


[Lazarus] Free Pascal version 2.2.4 released

2009-04-12 Thread Joost van der Sluis
Hello,

The Free Pascal team is pleased to announce that version 2.2.4 has been
released and is available for download for all major platforms:
(in alphabetical order)

  Dos, FreeBSD, Linux, Mac OS X, OS/2, Windows, Windows CE

for different CPU types and both in 32 and 64 bit versions where
applicable.

Version 2.2.4 is the new stable version. It contains mostly bugfixes,
and selected backported features. No major new features are introduced.

You can download your copy from the usual location:

  http://www.freepascal.org/download.var

Changes that may break backwards compatibility are documented at:

  http://wiki.freepascal.org/User_Changes_2.2.4

We also use this release to test our new packaging system. More
information about this test can be found here: 
  
  http://wiki.freepascal.org/fppkg_field_test

If you download from a mirror, you may have to wait a couple of days
for the mirror to pick up the new version.

Enjoy,

The Free Pascal team.



Free Pascal Compiler

Version 2.2.4

**
  What's New in 2.2.4
**

Free Pascal 2.2.4 contains many bug fixes and some new features. The 
main purpose of this release is to fix problems reported with FPC 2.2.2.

Please also see http://wiki.freepascal.org/User_Changes_2.2.4 for a list
of changes which may affect the behaviour of previously working code,
and how to cope with these changes.

Some highlights are:

All:
  * Experimental packages-installation tool

Packages:
  * Added support for TIFF reading/writing in fcl-image
  * Improvements and fixes in CHM support
  * Fixed linking the gtk2-package with gtk versions above 2.13.4

IDE:
  * Added support for CHM help files

Documentation

See http://bugs.freepascal.org/changelog_page.php for the list of
reported bugs which have been fixed in this release.



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


Re: [Lazarus] Hints usability

2009-04-11 Thread Joost van der Sluis
Op vrijdag 10-04-2009 om 22:51 uur [tijdzone +0200], schreef JoshyFun:
> Friday, April 10, 2009, 10:17:28 PM, you wrote:
> 
> >> In other words MY (capital, as it is my problem, maybe not the problem
> >> of other people) is that the amount of expected hints are hidding the
> >> non-expected ones.
> 
> CI> Right. And as I said, it would probably be more productive to disable an
> CI> entire type of hints.
> 
> Well, I compile my code with all checks and it must be
> error/warning/hint free before being considered ready.

Very nice that you have made up this rule for yourself. But as you've
find out you really make things complicated for yourself.

The fpc-team decided long time ago to make two different
compiler-messages. The 'warnings' which are construct of which the
compiler knows that they are always messy. In general, you should solve
those.

And there are 'hints', things which are things that the compiler finds
suspicious, but of which it CAN NOT BE SURE that it is a problem. Some
programmers do strange things, but they have a reason for that, or it's
too difficult for the compiler to decide if it's good or wrong, so it's
up to the programmer.

Keep this rules in mind. When you want to write hint-free code, that's
your choice, and it can lead to messy stuff. But don't blame the
compiler.

A system to disable/enable each hint seperately is discussed often and
there are some beginnings of implementations made. But it's not here
yet, and yes: patches are welcome.

If you have a situation in which you know that a hint is always a 'false
positive' and a way that the compiler could know that, you could try to
file a bug or make a patch.

Further, this is the wrong list to discuss this, because it's
fpc-specific, not Lazarus. Escpecially when you want that something is
done about this, this is the wrong place. (As Matthias already stated)

Joost

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


Re: [Lazarus] Large program size - 1.8 MB for empty GUI project (uses clause in initialization vs implementation?)

2009-04-10 Thread Joost van der Sluis
Op woensdag 08-04-2009 om 17:14 uur [tijdzone +0100], schreef Martin
Friebe:
> Alexey S. Smirnov wrote:
> > Vincent Snijders ?:
> >> Can somebody explain to me why smartlinking works better when a unit
> >> is in the implementation section than when it is in the interface
> >> section? I thought for smartlinking it doesn't make a difference, the
> >> unit is used anyway.
> >>   
> > The Smart Link process should check what 
> > variables/functions/definitions are used in your project to cut off 
> > unused code. It is really simple to do so, if some units are listed in 
> > Implementation section - linker will only add unit functions that are 
> > mentioned in you code, not more.
> > If units are listed in Interface section - it mean that potentially 
> > all code from that particular unit should be included. Because your 
> > global variable/class should have access to all provided 
> > code/procedures/properties.
> >
> Is this documented somewhere? I can't follow the logic anyway, the scope 
> how much my code uses of another unit can not be predicted, simply by 
> where I include the other code?

It's not documented as it's not true. A few of the reasons for that you
mentioned yourself.

Joost

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


Re: [Lazarus] How to compile lazarus from its SVN source in WinXP?

2009-04-06 Thread Joost van der Sluis
Op maandag 06-04-2009 om 13:37 uur [tijdzone +0200], schreef Bogusław
Brandys:
> Popeye Spinach wrote:
> > 
> > I have checked out latest lazarus from SVN using TortoiseSVN. I have 
> > also downloaded FPC 2.2.2 installer and fpcbuild2.2.2.
> >  
> > What then now? I coudn't follow the instructions in http://wiki.lazarus. 
> > freepascal.org/Getting_ Lazarusi 
> > . The information 
> > for compiling under WinXP seems has outdated. Please somebody here tell 
> > me how to do that?

> What is fpcbuild ???

It's the official source-zip from which fpc-releases are build. They
include the source but also the documentation sources and several
utilities which aren't written in fpc but are installed by the
fpc-installers. Plus things as the release-notes.

Joost.



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


Re: [Lazarus] Drawing text in WinCE

2009-02-03 Thread Joost van der Sluis
Op dinsdag 03-02-2009 om 14:52 uur [tijdzone +0200], schreef Paul van
Helden:
> 
> Also, I have made changes to FPC source. I added a structure and 
> function for Aygshell.dll in order to interface with a camera. How do
> I 
> go about getting this into the main source? The changes were made to 
> source\packages\winceunits\src\aygshell.pp and they are: 

Best is to create a patch first:
http://wiki.lazarus.freepascal.org/Creating_A_Patch

So that we are sure that we are chinging the right lines, and then add
it to the bug-tracker. (http://bugs.freepascal.org/) make sure that you
select 'fpc' as the project. That way we are sure that the patch is not
forgotten.

Joost



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


Re: [Lazarus] cross compiling

2009-02-02 Thread Joost van der Sluis
Op maandag 02-02-2009 om 09:20 uur [tijdzone +0100], schreef Alexander
Kaupp aka tanila:
> 
> thx 4 your answer, but how do I compile for x86_64 on fcp-i386?
> Or do you mean to install 2 FPCs one x64 and one i386?

Yes. On most distributions that's possible.

Or else you could download a ppc386-executable from somewhere, and
compile a plain i386-version yourself:

make clean all PP=../path/to/ppc386
sudo make install PP=compiler/ppc386

Thereafter you'll have a ppcx64 and a ppc386 on your system. Make sure
that both use the same prefix. (/usr/lib/ or /usr/local/lib/)
If one of them insist on using something like /usr/lib64 then you can
add that one to your fpc.cfg manually.

Joost.

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


Re: [Lazarus] cross compiling

2009-02-01 Thread Joost van der Sluis
Op zondag 01-02-2009 om 19:42 uur [tijdzone +0100], schreef Alexander
Kaupp aka tanila:
> but i am not able to compile from x86_64-linux to i386-linux
> 
> i read all docs on the lazarus page and the fpc pages.
> but no success to cross compile anything... even the compiler itself.
> 
> I used fpc 2.2.2 and the current svn version 2.3.1
> 
> someone of you got this done and has tipps?

Easiest solution? Install fpc-2.2.2 for i386 on your x86_64 system. 

Joost

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


[Lazarus] Freepascal 2.2.4rc1 released

2009-01-26 Thread Joost van der Sluis
We have placed the first release-candidate of the Free Pascal Compiler
version 2.2.4 on our ftp-servers.

You can help improve the upcoming 2.2.4 release by downloading and
testing this release. If you want you can report what you have done here:
http://wiki.freepascal.org/Testers_2.2.4

With this release we also want to test our new packaging-system. After
installing the package manager (fppkg) can be called from the
command-line. For now only the 'lnet' package is available for
installation through the package system. When all goes well it could be
that more packages will be added.

For more information about fppkg:
http://wiki.freepascal.org/fppkg

Changes that may break backwards compatibility are documented at:
http://wiki.freepascal.org/User_Changes_2.2.4

Downloads are available at:
ftp://ftp.freepascal.org/pub/fpc/beta/2.2.4rc1/


Enjoy!

The Free Pascal Compiler Team




Free Pascal Compiler

Version 2.2.4rc1

**
  What's New in 2.2.4rc1
**

Free Pascal 2.2.4rc1 contains many bug-fixes and some new features. The 
main purpose of this release is to fix problems reported with FPC 2.2.2.

Please also see http://wiki.freepascal.org/User_Changes_2.2.4 for a list
of changes which may affect the behaviour of previously working code,
and
how to cope with these changes.

Some highlights are:

All:
  * Experimental packages-installation tool

Packages:
  * Added support for TIFF reading/writing in fcl-image
  * Improvements and fixes in CHM support
  * Fixed linking the gtk2-package with gtk versions above 2.13.4

IDE:
  * Added support for CHM help files

Documentation

See http://bugs.freepascal.org/changelog_page.php for the list of
reported
bugs which have been fixed in this release.


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


Re: [Lazarus] is it me or a bug that i ve been fighting?

2009-01-20 Thread Joost van der Sluis
Op maandag 19-01-2009 om 18:29 uur [tijdzone -0500], schreef waldo
kitty:
> Martin Friebe wrote:
> > Anyway, unless you are willing to spent time on debugging the issue your 
> > self, and go into the depth of the Connector code, this will probably be 
> > of little help.
> 
> i've finally been able to work out the following...
> 
> MySQLConnection: TMySQL50Connection;
>TMySQL50Connection = Class(TConnectionName);
>  TConnectionName = class (TSQLConnection)
>TSQLConnection = class (TDatabase)
>  TDatabase = class(TCustomConnection)
>TCustomConnection = class(TComponent)
>  TComponent = 
> class(TPersistent,IUnknown,IInterfaceComponentReference)
>TPersistent = class(TObject)
> 
> 
> it works out that MySQLConnection.Close is TCustomConnection.Close but if i 
> hover the mouse over "Close" in "Procedure Close;" in the public section of 
> the 
> TCustomConnection definition stuffs, the editor wants to point to the 
> textfile 
> close routine Close(var t:Text); which definitely isn't the same thing :(

You can find the code in the fpc-code-dir under
packages/fcl-db/src/base/database.inc. What primarily happens is that
doDisConnect is called.

> and with all of the searching i've done, i still don't see anything that 
> indicates where i can actually lay eyes on the code for 
> TCustomConnection.Close 
> nor do i see anything indicating that it is assigned to another routine going 
> by 
> another name :?

Take a look at TDatabase.DoDisconnect in the same file. It first closes
all queries which are linked to this dataset, and thereafter it closes
all transactions.

So try to close those yourself before you close the database-connection.
See where it goes wrong...

> now i know why i much prefer the old-style procedural coding methods :P
> 
> > If you get the stack backtrace you can mail it and hope some one knows 
> > about...
> 
> i still don't know what this involves :(

Run the application in gdb, and when the crash occurs, type 'bt' on the
gdb-prompt. But you must have the fcl-db package compiled with
debug-information for it to make any sense. If you really want to try,
add the fcl-db/src/base fcl-db/src/sqldb fcl-db/src/dbase and
fcl-db/src/sqldb/mysql paths to your compiler-options path and rebuild
your application within Lazarus. That way you can 'step' into the fcl-db
sources...

Joost.


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


Re: [Lazarus] Sqlite usage

2009-01-16 Thread Joost van der Sluis
Op vrijdag 16-01-2009 om 02:28 uur [tijdzone +1000], schreef SteveG:
> Is it possible to have the sqlite3.dll library (WinXP) dynamically 
> loaded  rather than static linked into my Laz program ?
> The sqlite dll is not in the Windows path (by choice), and I would like 
> to be able to point my prog to it at run time.
> 
> At the moment, I just have the sqlitedb unit in the 'uses' of my app.

Replace sqlitedb with sqlite3dyn (obviously for sqlite 3) and load the
library using 'InitialiseSQLite(libraryname);'. Unload it with
'ReleaseSQLite'

Joost.

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


Re: [Lazarus] Loading an integer into a byte array

2009-01-08 Thread Joost van der Sluis
Op donderdag 08-01-2009 om 16:05 uur [tijdzone +0200], schreef Dave
Coventry:
> I have a file into which I want to put a long integer:
> 
> 00 00 19 7A
> 
> The file expects the value in the form:
> 
> buffer[0]:=122;
> buffer[1]:=25;
> buffer[2]:=0;
> buffer[3]:=0;
> 
> I am then intending to write this buffer to the file
> 
> FS.Writebuffer(buffer,4);
> 
> Is there a way of loading the buffer directly before writing?

var l : longint;

l := NtoBE($197a); // Number to BigEndian
Fs.WriteInt(l);

I don't have tried it, but it must be something like that?

Joost.

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


Re: [Lazarus] How can I use TMemDataset

2009-01-06 Thread Joost van der Sluis
Op dinsdag 06-01-2009 om 07:43 uur [tijdzone +0100], schreef Gabor
Boros:
> The result is same with CreateTable and without CreateTable.

I've found the problem and fixed it in trunk. It was again a general
issue, not only for TMemDataset. Thanks for the help.

Joost.

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


Re: [Lazarus] How can I use TMemDataset

2009-01-05 Thread Joost van der Sluis
Op maandag 05-01-2009 om 17:59 uur [tijdzone +0100], schreef Gabor
Boros:
> Under test case creation indentified the Append problem.
> I used Edit; after Append; and when removed the Edit; the record 
> inserted properly to the  DataSet. 

Ok, that was a bug for all datasets. It's fixed in trunk now. The
behaviour was consistent with the Delphi help: if Edit is called, first
all changes are posted of when modified is false, cancelled.

So if you call Edit after Append, the Append is cancelled, and
thereafter the prior record is edited.

But when the state of the dataset is dsEdit or dsInsert, Edit should do
nothing. Also not posting/cancelling the record.

Thanks for the example.

> Below example works.
> But if put the MemDataset to the form set name to DSet add a field with 
> the object inspector set name to NAME, set type to ftString and size to 
> 20. Remove the first 2 lines after begin (.Create and .FieldDefs.Addd) 
> the result (dset.txt) contains only the header. With dynamic creation 
> the file contains the 2 records.

My guess is that you also have to remove CreateTable? I'll look into it.

Joost.

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


Re: [Lazarus] How can I use TMemDataset

2009-01-05 Thread Joost van der Sluis
Op maandag 05-01-2009 om 16:50 uur [tijdzone +0100], schreef Gabor
Boros:
> Provide an example for what? I don't understand you.

An example application which uses TMemDataset and apply/post/etc that does not 
work.

Joost.


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


Re: [Lazarus] How can I use TMemDataset

2009-01-05 Thread Joost van der Sluis
Op maandag 05-01-2009 om 14:54 uur [tijdzone +0100], schreef Gabor
Boros:

> I want to use an in memory dataset and found TMemDataset.
> But not working very well. If defined the fields in Object Incpector the 
>   whole thing unusable. Appended records with AppendRecord or with 
> Append/Edit/Post not inserted into dataset. If define fields at run-time 
> with FieldDefs.Add Append/Edit/Post working but AppendRecord not and 
> Append/Edit/Post is just working on first try. Tried with FPC 2.2.2 and 
> actual Lazarus SVN.

For a working AppendRecord (for all TDatasets) you need a recent fpc svn
version (2.2.3 or later)

I don't know how the Lazarus editor works, but for the rest, can you
provide an example?

> Anybody using TMemDateset?

If you use a recent fpc from svn you can alo use TBufDataset. It works
the same like TMemDataset but it's used as basic for a few other
datasets and is used more. (You can compare it to Delphi's
TClientDataset)

Joost.

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


Re: [Lazarus] Rebuild LCL from within IDE on Linux

2009-01-05 Thread Joost van der Sluis
Op zondag 04-01-2009 om 23:59 uur [tijdzone +0100], schreef Bart:
> > What effect did you expect?
> >
> >  Joost.
> 
> I expected it to work the same as on Win32 (WinME in my case). You
> patch something in the LCL, rebuild the LCL from within the IDE and
> voila, the patches you wrote are now working (for better or worse).

After all these years I can still be amazed how even it-professionals
describe problems. 'I expected it to work the same as on Win32', 'the
patches you wrote are now working', 'I expect it to work', 'I did
something and now it doesn't work -> fix it'.

'I want to do something, explain me how to'
'Can you explain to me what you want to do exactly?'
'Well, what I always do. I click here and normally it works, now it
doesn't. so help me'
'On what do you click?'
'Well, that's what you suppose to tell me! I don't know what to click,
you are the expert! All I know is that I click here it doesn't work'

This way this can become a long thread

So I'll do what is expected from me in this case. Write down a few
possibilities. Guess somewhat what you are trying to do. Write an answer
on that hypothetical case. Then hope that that fixes your problem, or
that you can come up with a somewhat more adequate description of your
problem.

Well, if you expect the IDE to behave differently after your patch you
have to recompile the IDE and restart. Take care that you start the
right (new) executable, although this mostly only goes wrong on windows.

What did you change? Are you sure it is part of the lcl and thus
recompiled? Did you check the recompile was succesfull? Maybe you did
change something for another widgetset then you are really using? (Maybe
it's usefull to tell us what you did change, and what you expect from
that change. More then... well, the story above..)

A way to check if your change is really recompiled is to make a syntax
error in the code, and recompile. If the compiler doesn't complain, you
didn't recompiled the code. ;)

> I ended up doing a make clean all (as root), which then did what I expected.
> (I was a bit afraid that that might somehow screw things up ( I'm
> fairly new to Linux), so I first tried something I experienced to be
> safe on Win32).

If you run the ide as root and then do your recompile of the LCL, does
that work? If you plan to change the LCL often, you'd better install
lazarus in your home-directory and work from there.

But now I know you installed as root: did you check where the
recompilation of the LCL placed it's files? And does your project uses
this path to search for the LCL?

> So now I've applied a patch to my LCL on linux and this works.
> However doing make clean all built a slightly different IDE (some
> component tabs missing that I normally do not use anyway).
> What make command should I apply to build the IDE with packages like
> they come in the binaries (rpm's or win32 executables)?

You could try 'make bigide' but there's also a command to build the ide
with the selected packages. But maybe you'd better run the ide as root
and build from there.

Joost.

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


Re: [Lazarus] Rebuild LCL from within IDE on Linux

2009-01-03 Thread Joost van der Sluis
Op maandag 29-12-2008 om 23:35 uur [tijdzone +0100], schreef Bart:
> Hi,
> 
> If I rebuild the LCL (and only the LCL) from within the IDE on Linux
> (Tools -> Configure Build -> LCL -> Build), then Lazaris says it
> compiled the LCL fine, but it seems that changes take nof effect.

What effect did you expect?

Joost.

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


Re: [Lazarus] I've installed Lazarus 0.9.26 on M$ Windowz XP OS -- cannot find app file to run Lazarus!!!

2008-12-30 Thread Joost van der Sluis
Op dinsdag 30-12-2008 om 05:45 uur [tijdzone +1030], schreef Peter
Williams:
> Today I downloaded (file #1)
> "Lazarus-0.9.26-fpc-2.2.2-cross-arm-wince-win32" and (file #2)
> "fpc-2.2.2-lazarus-0.9.26-doc-html.tar". 

That's an 'add-on' to compile applications for windows mobile
telephones/pda's.

You have to install Lazarus for Windows too to be able to use it.

Joost.

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


Re: [Lazarus] TSQLQuery

2008-12-27 Thread Joost van der Sluis
Op zaterdag 27-12-2008 om 11:59 uur [tijdzone -0500], schreef Don
Latshaw:
> I have downloaded the latest lazarus for win32 and installed it 
> (today).  I have mysql 5.0 running. I can connect to a db. I have a 
> TSQLTransaction component with active = false. I can enter a select 
> query in TSQLQuery.SQL and execute it in the Editing SQL dialog, but I 
> can't change active to true. There is no error message.

Please do not send questions like these to me in private. If you send
them to the list others can answer also. And other people with the same
question can search the archives for the answer to your question.

I think I've answered this question already on this list a few months
back, but I'm too lazy to search for it.

MySQL doesn't support transactions (version 5 does, more or less, but
the TMySQL50Connection doesn't) so you can not start a transaction. (set
it to active)

And I guess you haven't forgot a TMySQL50Connection?

Joost.



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


Re: [Lazarus] SQLite: How to create lookup fields?

2008-12-27 Thread Joost van der Sluis
Op zaterdag 27-12-2008 om 14:06 uur [tijdzone +0100], schreef
z0m...@gmx.net:
> >Op donderdag 25-12-2008 om 14:06 uur [tijdzone +0100], schreef
> >z0m...@gmx.net:
> >> >4) Even after this, there is some problems in SQLdb which I did not
> >> >yet found time
> >> >to diagnose and fix properly. They cause AVs while scrolling DBGrid.at 
> >> >are very hard t find
> >> 
> >> Dont spend too much time in this SQLite3DataSet has a lot of Bugs.
> >> ill tryed to fix all for month before i used zeos
> >So where are all those bug-reports? Without those they will never get
> >solved. 
> 
> http://bugs.freepascal.org/view.php?id=11423 at example
> 
> some of the problems i had was very hard to not reproduceable 
> and the first bugreports i made are ignored so i use zeos and have no problem.
> when i become bad answers or the developer ignores me when i make bugreports 
> and patches
> i dont use the component anymore. 

In the bug report you said you would send an example. But I still don't
see it. Can you send it, so we can actually look at your bug?

Joost.

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


Re: [Lazarus] Locate Dataset

2008-12-27 Thread Joost van der Sluis
Op woensdag 24-12-2008 om 10:19 uur [tijdzone -0800], schreef Darmawan
Sugiarto:
> Why I can used function locate at dataset.
> this my code
> SQLQuery1.Locate('kd_pic',
> Edit1.Text,[loCaseInsensitive,loPartialKey]);

We need some more information to help you. What does happen if you use
the code above?

If the result of the Locate function is false, nothing is found. If it's
true it is found and the current record should be set to the found
record.

Did you check the result of the Locate?

Joost.



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


Re: [Lazarus] SQLite: How to create lookup fields?

2008-12-27 Thread Joost van der Sluis
Op donderdag 25-12-2008 om 14:06 uur [tijdzone +0100], schreef
z0m...@gmx.net:
> >4) Even after this, there is some problems in SQLdb which I did not
> >yet found time
> >to diagnose and fix properly. They cause AVs while scrolling DBGrid.at are 
> >very hard t find
> 
> Dont spend too much time in this SQLite3DataSet has a lot of Bugs.
> ill tryed to fix all for month before i used zeos

So where are all those bug-reports? Without those they will never get
solved. 

Becides that, ZEOS is made for another purpose. TSQLite3DataSet is made
for what SQlite is made for: a lite and quick database-access layer.

ZEOS is made for 'heavier' usage, and often overkill when it comes to
sqlite. And considerably slower.

Both have their own uses.

Joost.



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


Re: [Lazarus] ODBC with FreeTDS on Ubuntu 8.10

2008-12-24 Thread Joost van der Sluis
Op woensdag 24-12-2008 om 15:43 uur [tijdzone +0700], schreef Diwakoe:
> Dear all,
> 
> I'm try to connect into MSSQL from linux using ubuntu - unixodbc -
> FreeTDS. First connect using FreeTDS via command shell connect well
> into MSSQL and can execute query from any table. Second is try using
> odbc connection in lazarus 0.9.26 connect to MSSQL and get error
> (attached).
> 
> Is there any guide how to use odbc on linux using unixodbc and FreeTDS?

My guess is that you used sqldb. 

Set TSQLQuery.ParseSQL to false. Or else you could set
TSQLQuery.UsePrimaryKeyAsKey to false.

For some reason it can not find the primary key of the table. It could
be that there is none defined, or the odbc-driver that you use to access
MsSql doesn't support the retrieval of the primary key.

Or, it's a bug in TODBCConnection, offcourse.

Joost.

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


Re: [Lazarus] PosgeSQL client

2008-12-22 Thread Joost van der Sluis
Op dinsdag 23-12-2008 om 02:39 uur [tijdzone +1030], schreef Eric March:

> I opened a new project and placed a PQConnection on Form1, set host name 
> as localhost,
> username as postgres with no password.  When I set Connected to "TRUE" I 
> get the
> following error.
> 
> Can not load PosgreSQL client. Is it installed? (libpq.so)

I've googled a bit and there seems to be a libpq package for ubuntu:
http://packages.ubuntu.com/nl/hardy/i386/libpq5/filelist

It could be that you need the package libpq5-dev also.

Joost.

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


Re: [Lazarus] SQLite Numeric error

2008-12-22 Thread Joost van der Sluis
Op maandag 22-12-2008 om 11:53 uur [tijdzone +0100], schreef Andrea
Mauri:
> 
> In the fl variable I get 0.001. The same works well using firebird (it 
> gets 10.13). The insert works well, I verified it by using other sqlite 
> administration tools (like sqlite extension for firefox).
> If I look at T1 table using sqlite extension for firefox I correctly get 
> 10.13 in the VAL field of the first record.
> If I use REAL field type instead NUMERIC I correctly get 10.13.
> I tested it both on Linux an Windows (FPC 2.2.2 Lazarus SVN), it doesn't 
> work both on Linux and Windows.

This is probably fixed in any svn-version of fpc (recent 2.2.3 or 2.3.1)

Joost.

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


Re: [Lazarus] TAChart: Request to review/apply patch 12758

2008-12-14 Thread Joost van der Sluis
Op zondag 14-12-2008 om 10:18 uur [tijdzone +0100], schreef Florian
Klaempfl:
> Luiz Americo Pereira Camara schrieb:
> > Florian Klaempfl escreveu:
> >> Alexander Klenin schrieb:
> >>   
> >>> On Fri, Dec 12, 2008 at 11:39, Paul Ishenin  wrote:
> >>> 
>  Same for Alexander Klenin - if you need to update TAChart very often
>  then ask about write access to svn/lazarus/trunk/components/tachart
>    
> >>> Yes, it can be a workaround for my particular case, so whom should I ask?
> >>> 
> >> For FPC ask me ;
> > 
> > It would be helpful having svn write access to fpc sqlite directory.
> > Is there any specific rules?
> 
> Of fcl-db? Ask Joost if it's ok then I'll add you.

That's ok.

Joost.

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


Re: [Lazarus] TAChart: Request to review/apply patch 12758

2008-12-13 Thread Joost van der Sluis
Op vrijdag 12-12-2008 om 18:54 uur [tijdzone +1000], schreef Alexander
Klenin:
> On Fri, Dec 12, 2008 at 18:27, Florian Klaempfl  
> wrote:
> > Alexander Klenin schrieb:
> >> On Fri, Dec 12, 2008 at 11:39, Paul Ishenin  wrote:
> >>> Same for Alexander Klenin - if you need to update TAChart very often
> >>> then ask about write access to svn/lazarus/trunk/components/tachart
> >>
> >> Yes, it can be a workaround for my particular case, so whom should I ask?
> >
> > For FPC ask me ;)
> 
> I would love to contribute to FPC, but it is much harder to create 
> (non-trivial)
> contribution then to Lazarus, and I simply do not have enough time.
> 
> Meanwhile, you can review my trivial contribution here ;-)
> http://bugs.freepascal.org/view.php?id=12566

There are many, many bugs in fpc which can be solved by trivial patches
like this one. So there's enough to do. ;)

Joost.

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


Re: [Lazarus] Mouse Link in SynEdit (only link-able items)

2008-12-12 Thread Joost van der Sluis
Op vrijdag 12-12-2008 om 21:14 uur [tijdzone +1000], schreef Alexander
Klenin:
> On Fri, Dec 12, 2008 at 20:38, Martin Friebe  wrote:
> > I haven't seen the patch? Can you check you really attached it.
> 
> Sorry, attached now.

Nope, still no attachment. Maybe that it's too big. There's a limit of
the filesize of attachments on this list.

Joost.

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


Re: [Lazarus] Free Pascal Update

2008-12-08 Thread Joost van der Sluis
Op maandag 08-12-2008 om 19:38 uur [tijdzone +1030], schreef Eric March:
> I run Ubuntu 64 bit kernel 2.6.  I need to upgrade from FPC 2.2.0 to 2.2.2
> Is there a way that this can be done via Ubuntu update manager?

Maybe you should ask that to those people who can actually do something
about it, ie, the Ubuntu-people.

> (Keep everything up to date from now on)
> If there are enough Ubuntu users to justify the setup, would update
> manager address issues such as standard directories.  Mine was installed
> as root and so non root user did not have write access.

This is an Ubuntu-issue. I oculd offcourse answer that if you install
Fedora this will all work fine. ;) But better let the Ubuntu-people fix
this problem.

But they are a bit behind on fpc-versions, because they are dog-slow and
now it's too late to update the fpc-version in Ubuntu 8.10. But let them
know, send in reports to them. If they don't get complaints, they will
think it's not an issue.

Joost.



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


Re: [Lazarus] OT: too stupid for SVN

2008-12-06 Thread Joost van der Sluis
Op zaterdag 06-12-2008 om 13:47 uur [tijdzone +0100], schreef Lukas
Gradl:

> Now I've changed some files locally which I now want to set back to the 
> versions in the repository, discarding my changes.
> 
> But here's the problem - I can't figure out how to do that.
> Would anyone be so kind and point me to the right direction?

svn revert -R .

Joost.

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


Re: [Lazarus] MYSQL setup

2008-12-04 Thread Joost van der Sluis
Op donderdag 04-12-2008 om 18:40 uur [tijdzone +1030], schreef Eric
March:
> Joost van der Sluis wrote: 
> > Op woensdag 03-12-2008 om 09:40 uur [tijdzone +1030], schreef Eric
> > March:
> >   
> > > I have set the connection in MySQL50Connection1to SQLTransaction1
> > > As you point out I still can't set the transaction to True, so I leave
> > > it False.
> > > 
> > > Now when I set SQLQuery1 to True I get an error
> > > ".e...e" is an invalid float
> > > 
> > 
> > Ok, that's not good. The mysql-client which you are using is version
> > 5.0. What is the server version? And which fpc-version did you use?
> > Maybe you could try with a fpc version 2.2.3 snapshot. And are you on 64
> > or 32 bit?
> >   
> Details below:
> MYSQL Server version = 5.0
> fpc version 2.2
> Linux Ubuntu 64 bit  Kernel 2.6

You have to upgrade to fpc 2.2.2 at least. This is probably this bug
http://bugs.freepascal.org/view.php?id=10202 (or actually 8593, which is
the main cause)

Joost.

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


Re: [Lazarus] SQLite database schema has changed

2008-12-03 Thread Joost van der Sluis
Op woensdag 03-12-2008 om 09:25 uur [tijdzone +0100], schreef Luca
Olivetti:
> I don't think it will help, sqlite will always return the error 
> "database schema has changed" if you ALTER any table in the database.
> There's a bunch of enhanced "v2" functions (see 
> http://sqlite.org/c3ref/funclist.html) to avoid that class of
> problems, 
> but their bindings, AFAIK, aren't available in fpc.

Patches are welcome. And when you're at it, also take a look at
http://bugs.freepascal.org/view.php?id=10821 ;)

Joost.

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


Re: [Lazarus] MYSQL setup

2008-12-03 Thread Joost van der Sluis
Op woensdag 03-12-2008 om 09:40 uur [tijdzone +1030], schreef Eric
March:
> >   
> I have set the connection in MySQL50Connection1to SQLTransaction1
> As you point out I still can't set the transaction to True, so I leave
> it False.
> 
> Now when I set SQLQuery1 to True I get an error
> ".e...e" is an invalid float

Ok, that's not good. The mysql-client which you are using is version
5.0. What is the server version? And which fpc-version did you use?
Maybe you could try with a fpc version 2.2.3 snapshot. And are you on 64
or 32 bit?

Joost.

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


Re: [Lazarus] SQLite database schema has changed

2008-12-02 Thread Joost van der Sluis
Op dinsdag 02-12-2008 om 12:47 uur [tijdzone +0100], schreef Andrea
Mauri:
> Dear All,
> I have a question regarding SQLite.
> I got an error: 'database schema has changed' when I run the following 
> code (code 1)  (when I execute the second Insert Query).

> code1:
> 
>   if FileExists('e:\temp\prova.db') then
> DeleteFile('e:\temp\prova.db');
>   SQLite3Connection1.DatabaseName:= 'e:\temp\prova.db';
>   SQLite3Connection1.ExecuteDirect('create table T1 (ID integer not 
> null, NOME varchar(200))');
>   sqlquery1.SQL.Text:= 'insert into T1 (ID, NOME) values (:ID, :NOME)';
>   SQLQuery1.Params.ParamByName('ID').AsInteger:= 1;
>   SQLQuery1.Params.ParamByName('NOME').AsString:= 'Andrea';
>   SQLQuery1.ExecSQL;

Here you implecitely prepare the query before it gets executed. This is
done so that if you run the query again, it's execution will be faster.
One of the advantages of using parameters.
 
>  SQLite3Connection1.ExecuteDirect('create table T2 (ID integer not null, 
> COGNOME varchar(200))');

But here you change the definition of the database. Thereafter the
preparation of the query is not valid anymore. Call sqlquery.unprepare
to solve the problem.
Apparently Firebird doesn't mind the change in the definition, because
it is on a different table. It looks like it that sqlite can not handle
that.

>   SQLQuery1.Params.ParamByName('ID').AsInteger:= 2;
>   SQLQuery1.Params.ParamByName('NOME').AsString:= 'Marco';
>   SQLQuery1.ExecSQL;
>   SQLTransaction1.CommitRetaining;

This could be fixed by automatically unpreparing all statements when a
ddl-statement (create, drop,...) is executed in sqlite. But I prefer not
to do that, so that you have to do that manually.

Joost.

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


Re: [Lazarus] MYSQL setup

2008-12-02 Thread Joost van der Sluis
Op dinsdag 02-12-2008 om 20:17 uur [tijdzone +1030], schreef Eric March:
> I am guessing the SQLTransaction1 needs to be set to TRUE before I
> can 
> set the SQLQuery1 properties.  I get (and expected) an error on
> SQLQuery1.

But you expected another error, that's why you dind't read it well. (Or
it's too cryptic)

> SQLQuery1 properties:
> Active = False  "True" gives error = "Transaction of connection not
> set" (Expected)

The connection also has a 'transaction' property. You haven't set that
one. In principle this isn't necessary if you set ParseSQL to false, ie:
make it readonly. But that's a different story.

That you can't make a transaction active is because MySQL don't support
transactions. But SQLDB enforce you to use them anyway. They are
useless, but they have to be there.

Joost.



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


Re: [Lazarus] SQLConnector

2008-12-01 Thread Joost van der Sluis
Op maandag 01-12-2008 om 16:48 uur [tijdzone +0100], schreef Andrea
Mauri:
> where I can find information about how to use the SQLConnector 
> component? Is it a general object that can be used to connect to 
> different database types (SQLlite, Firebird, MySQL...)?

That's the idea.

> I saw the property ConnectorType (string), how can I set it? Is 
> TSQLConnector already usable?

You could try, but if I'm correct there are some fundamental flaws in
it's design.

If you need a generic way to connect to several types of databases, just
use simple code like this:

var AConn : TSQLConnection;

begin
  case DBType of
typeFirebird : Aconn := TSQLIBConnection.Create;
typeMysql40  : AConn := TMysql40Conn.Create;
etc..

Joost.

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


Re: [Lazarus] MYSQL setup

2008-12-01 Thread Joost van der Sluis
Op maandag 01-12-2008 om 16:45 uur [tijdzone +1030], schreef Eric March:
> Tom Lisjac wrote: 
> > Hi Eric,
> > 
> >   
> > > I have followed source advice but can't connect.
> > > Can anyone help and/or is there a manual?
> > > 
> > 
> >   
> > > Error: invalid compiler: file
> > > There must be something in my source looking for a compiler in the wrong
> > > place :-(
> > > 
> > 
> > The errors you're getting in the tutorial example are from some hard
> > coded paths in the database_try.lpi project file. It's not a problem
> > with your system. Since Lazarus has changed since the example was
> > written, it might be easier to start your project with the sqldb
> > components.
> > 
> > To install sqldb, go to "Package->Open package file", select and
> > install the lazarus/components/sqldb/sqldblaz.lpk package. After
> > Lazarus recompiles, you should see a "SQLdb" tab. Drop a Mysql50
> > (TMySQL50Connection) on a new form. In the object inspector for this
> > component, enter the hostname (probably localhost), a database (test
> > or mysql as an example or a database you've already created) and the
> > username and password for the database or the "root" you set when
> > installing mysql. At this point, establishing a successful mysql
> > connection is being able to set the Connected property to true without
> > an error.
> > 
> >   
> Thanks heaps for the help.  I Get this far and changing "Connected" to
> "True" 
> gives the error
> "Cannot load MySQL library "libmysqlclient.so. Please check your
> installation."

Maybe we have to improve that error-message even further. You have to
install MySQL to be able to work with it.

So install the mysql-client before you can use it.

On linux it could be that you also have to install the '-dev' package.

Joost

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


Re: [Lazarus] The db-aware controls allow editing a readonly-dataset

2008-11-28 Thread Joost van der Sluis
Op donderdag 27-11-2008 om 22:37 uur [tijdzone +0100], schreef Michael
Van Canneyt:
> 
> On Thu, 27 Nov 2008, Joost van der Sluis wrote:
> 
> > Hi all,
> > 
> > When a dataset is read-only, the db-aware controls allow editing. The
> > changes aren't send to the dataset, though. Which is very confusing for
> > the user.
> > 
> > I don't know how to fix it. I can change TDatalink.ReadOnly so that is
> > checks if the dataset is ReadOnly. But, for exmple, TDBEdit.Readonly
> > directly passes the result of TDatalink.Readonly. And I checked with
> > Delphi and there TDBEdit.Readonly is false, even if the TDataset is
> > readonly.
> 
> That is because the readonly is the TCustomEdit.ReadOnly, no ?
> 
> You can set a edit read-only, even if the field is read-write, so
> this is normal in my eyes.

But also the other way: set a field or an TCustomEdit to read/write, if
the dataset is read-only? (atm , this is possible, and I did check with
Delphi, there you can do this also)

> But if the TDataset is readonly then the edit should of course also
> give readonly=True.

Well, it doesn't. The same holds for Delphi. But in Delphi
TEdit.Readonly is false, but you can't change it's data.

> > Alternative is to check in TDBEdit.IsReadOnly and relatives...
> 
> ? Please explain ?

That's a private function which is used internally. We could check here
if the TDataset is readonly...

Just look up the code, it's pretty straight-forward.

Joost.

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


[Lazarus] The db-aware controls allow editing a readonly-dataset

2008-11-27 Thread Joost van der Sluis
Hi all,

When a dataset is read-only, the db-aware controls allow editing. The
changes aren't send to the dataset, though. Which is very confusing for
the user.

I don't know how to fix it. I can change TDatalink.ReadOnly so that is
checks if the dataset is ReadOnly. But, for exmple, TDBEdit.Readonly
directly passes the result of TDatalink.Readonly. And I checked with
Delphi and there TDBEdit.Readonly is false, even if the TDataset is
readonly.

Alternative is to check in TDBEdit.IsReadOnly and relatives...

Any ideas what's the best approach?

Joost.

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


Re: [Lazarus] Lazarus with Oracle database

2008-11-26 Thread Joost van der Sluis
Op woensdag 26-11-2008 om 14:21 uur [tijdzone +0200], schreef Graeme
Geldenhuys:
> Has anybody user Lazarus, SqlDB and Oracle?  Is there any major
> issues, or is it smooth sailing.
> I want to try out the free Oracle Database 10g Express Edition under Linux.
>   http://www.oracle.com/technology/products/database/xe/index.html

Transactions are not supported. Further it should work, it's rather
straight-forward.

And if you find something strange, just let me know.

Joost.

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


Re: [Lazarus] How to unset bookmarks in the editor?

2008-11-25 Thread Joost van der Sluis
Op dinsdag 25-11-2008 om 18:05 uur [tijdzone +], schreef Martin
Friebe:
> Joost van der Sluis wrote:
> > Op dinsdag 25-11-2008 om 15:25 uur [tijdzone +], schreef Martin
> > Friebe:
> >   
> >> You can put a feature request in the bugtracker ( I will pick it up)
> >> However it will be a while before I get to work on it...
> >>
> >> This is unless someone actually brings a reason, why this would be a bad 
> >> feature
> >> 
> >
> > I use those bookmarks a lot, and it's one of the most lacking features
> > of Delphi imho that it doesn't store it's bookmarks in the session-info,
> > and that they are bound to the current document...
> >
> > Toggling the bookmarks will result in removing a bookmark now and then
> > while I don't want to. For example: I want to jump to bookmark 1, I
> > forgot that I was already there, and press ctrl-1 again. Then I see that
> > this is the wrong bookmark and I go to bookmark 2. Now I press ctrl-1
> > again to go back and find out that my bookmark is gone...
> >
> > ie: It's not a bug, it's a feature. As discussed before. And it's not
> > worth the trouble adding a switch for it. As Graeme doesn't use the
> > bookmarks, he won't mind if they stay there all the time.
> >
> > I do use the bookmarks, and this idea oculd lead to very frustrating
> > situations.
> >
> >   
> Just trying to understand, but the description above doesn't match what 
> I had in mind, or what I thought  Graeme wanted?
> 
> - jumping around using ctrl-1, ctrl-2,... as much forward and backward 
> as you want, will not delete any bookmark ever
> - pressing ctr1 and ctrl-1 again (as in jumping too) while already being 
> at the line, will never remove a bookmark neither.
> 
> 
> But: pressing shift-ctrl-1  (set the bookmar to the current line) will 
> remove it, *if* it is already set.
> 
> if you accidentally press shift-ctrl-x combinations you will also loose 
> bookmarks, by:
> - setting them to a new location
> - setting bookmark 2, where you previously had BM 1, consequently 
> removing BM-1 (yes you still have a BM, but a diff one)
> 
> Now yes, toggling adds a (IMHO) tiny amount ot the (IMHO) quite small 
> change of accidentally deleting a BM.
> 
> 
> As I said , I didn't follow your description above, but if you re-think 
> it, or meant the shift-ctrl as in my description, then let me know.

You're right. I didn't think it through. Forgot that I also have to
press 'shift' to set/remove a breakpoint. Then it's no problem for me...

Joost

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


Re: [Lazarus] How to unset bookmarks in the editor?

2008-11-25 Thread Joost van der Sluis
Op dinsdag 25-11-2008 om 15:25 uur [tijdzone +], schreef Martin
Friebe:
> You can put a feature request in the bugtracker ( I will pick it up)
> However it will be a while before I get to work on it...
> 
> This is unless someone actually brings a reason, why this would be a bad 
> feature

I use those bookmarks a lot, and it's one of the most lacking features
of Delphi imho that it doesn't store it's bookmarks in the session-info,
and that they are bound to the current document...

Toggling the bookmarks will result in removing a bookmark now and then
while I don't want to. For example: I want to jump to bookmark 1, I
forgot that I was already there, and press ctrl-1 again. Then I see that
this is the wrong bookmark and I go to bookmark 2. Now I press ctrl-1
again to go back and find out that my bookmark is gone...

ie: It's not a bug, it's a feature. As discussed before. And it's not
worth the trouble adding a switch for it. As Graeme doesn't use the
bookmarks, he won't mind if they stay there all the time.

I do use the bookmarks, and this idea oculd lead to very frustrating
situations.

Joost.

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


Re: [Lazarus] Running Lazarus GTK1 (32bit) via a remote X11 from 64bit Linux

2008-11-24 Thread Joost van der Sluis
Op maandag 24-11-2008 om 10:27 uur [tijdzone +0200], schreef Graeme
Geldenhuys:

> I get the following error:
> ---
> [EMAIL PROTECTED]:~/programming$ ./lazarus.gtk1
> ./lazarus.gtk1: error while loading shared libraries:
> libglib-1.2.so.0: cannot open shared object file: No such file or
> directory
> ---
> 
> 
> The remote system is Ubuntu 8.04 LTS - 64bit.  Normally you can run
> 32bit software on a 64bit OS.

That's not true. If you want to do that you need an installation which
supports both environments. I don't know how debian/ubuntu handles this,
but I do know that it's different from Fedora which I know better.

>  But I'm not having any luck with
> Lazarus.

That's because you haven't installed a 32-bit version of gtk. 32-bit
Lazarus needs the 32-bits gtk-libraries. You have to install those.

On Fedora if you install a 32-bit package on a 64-bit system, it also
installs all 32-bit dependecies. I think Debian/Ubuntu does the same.
But if you really want to do everything manually, as you are trying to
do - you have to do this yourself. This mean you have to know how your
distribution handle things in detail - I whish you good luck. ;) 

> Is my only option to install GTK1.2 development packages on the remote
> server (which I didn't want to do) and do a 64bit compile of Lazarus
> IDE there?  Anybody know of some other way to get the 32bit Lazarus
> IDE to run on the 64bit Linux OS?

Yes, you need two copies of gtk to be installed on your system.

Joost.

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


Re: [Lazarus] MYSQL setup

2008-11-20 Thread Joost van der Sluis
Op donderdag 20-11-2008 om 20:37 uur [tijdzone +1030], schreef Eric
March:
> Malcolm Poole wrote: 
> > Eric March wrote:
> >   
> > > Hello
> > > I have MYSQL installed and running.
> > > I think I need to install something into Lazarus so I can connect etc to 
> > > DataBases.
> > > I have followed source advice but can't connect.
> > > 
> > > Can anyone help and/or is there a manual?
> > > 
> > Can you tell us what you have tried so far with Lazarus?
> > 
> > Have you followed the guidance at
> > http://wiki.lazarus.freepascal.org/Lazarus_Database_Tutorial ?
> > 
> > Malcolm
> > ___
> > Lazarus mailing list
> > Lazarus@lazarus.freepascal.org
> > http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
> >   
> Yes I have, but it assumes that I can connect.
> If I follow the source to connect it does not work

Oh, it does not work. I was already wondering what your problem was. But
thanks for the clear explanation. Now we know exactly how to help
you! ;)

Joost.

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


Re: [Lazarus] WebLaz - Every other request fails

2008-11-20 Thread Joost van der Sluis
Op woensdag 19-11-2008 om 13:39 uur [tijdzone -0500], schreef Lee
Jenkins:
> Hi all,
> 
> This is a separate issue than that I posted before.  Using either the 
> sessiondemo or echo projects, the request fails every other request.

> ==
> Debug failed: Access violation
> HTTP/1.1 200 OK
> Date: Wed, 19 Nov 2008 18:37:00 GMT
> Server: Apache/2.0.63 (Win32)
> Content-Length: 2545
> Keep-Alive: timeout=15, max=99
> Connection: Keep-Alive
> Content-Type: text/html

Make this the first line of your application:

  SetDebuggingEnabled(false);

And I aggree: this is the most irritating thing in fpWeb, and it took me
some time to completely remove it. The original autor had a
debugger-service running on his servers. It's looking for that service.

Joost.

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


Re: [Lazarus] WebLaz Question

2008-11-19 Thread Joost van der Sluis
Op dinsdag 18-11-2008 om 20:04 uur [tijdzone -0500], schreef Lee
Jenkins:
> ABorka wrote:
> > It might be that
> > 
> > http://bugs.freepascal.org/view.php?id=12375
> > 
> > is not applied yet.
> > 
> > Are you making a CGI program or Apache modules?
> > Windows or Linux?
> > 
> > Also make sure you include the proper httpd files from the fpc source 
> > folders (httpd22, httpd20) if it is apache module you do.
> > 
> > Lee Jenkins wrote:
> >> Anyone using the WebLaz package?  I can compile the demo but when get 
> >> error when 
> >> trying to load the datamodule for these demos.  I have installed the 
> >> weblaz.lpk.
> >>
> 
> Hi it's CGI.  Odd that everything compiles ok, but there is apparently no 
> designer support for the datamodule for some reason.
> 
> I was using powtils, but that doesn't seem to be supported any more.
> 
> 
> 
> Maybe its time that I start working with .net again for my web stuff :(

I use Weblaz for all my web-stuff here. Also using CGI. What is the
error you got?

Joost

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


Re: [Lazarus] Cannot install Lazarus-0.9.26/fpc-2.2.2 on Suse 10.0, help needed

2008-10-30 Thread Joost van der Sluis
Op woensdag 29-10-2008 om 18:04 uur [tijdzone +0100], schreef Bart:
> > Then I recommend you to stick with the releases.
> 
> But I cannot {:-(
> As I described in  my first posting, the RPM for fpc 2.2.2 will not
> install, because it wants glibc version 2.4, which is not available
> for my Suse 10.0
> That is why I wantend to work around it by building fpc from source...

Try to install with rpm -Uhv laza... --nodeps. I woudn't know though why
glibc version < 2.4 won't work. Probably it has some bugs. But it will
install.

Joost

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


Re: [Lazarus] TSQLQuery & ApplyUpdates

2008-10-28 Thread Joost van der Sluis
If you can read dutch, read this:
http://wiki.freepascal.org/index.php?title=SqlDBHowto/nl#Hoe_stuurt_SqlDB_de_wijzigingen_naar_de_Database-server.3F

But I'll give some clues.

Op dinsdag 28-10-2008 om 06:33 uur [tijdzone -0500], schreef Terry A.
Haimann:
> Ok, I am trying to understand how to use tsqlquery to update my data 
> (using mysql.) It doesn't work, but I think I am on the right idea. I 
> have never used this paraterized sql before, so bear with me.
> 
> This is what I have got:
> 
> 
> I Have a TsqlQuerry, lets say its name is MyQuery.
> So MyQuery.UpdateSQL :=
> 
Update MyTable set MyCol = :MyCol
> Where MyIdx = :MyIdx

Looks fine. 

> Now in
> 
> procedure TDatabaseForm.MyQueryAfterPost(DataSet: TDataSet);
> begin

The following you don't need.

> MyQuery.Params.CreateParam(ftString, 'MyIdx', ptinput);
> MyQuery.Params.ParamByName('MyIdx').AsString := 'Idx';
> MyQuery.Params.CreateParam(ftString, 'MyCol', ptinput);
> MyQuery.Params.ParamByName('MyCol').AsString := 'Test Value';

You don't need the above, because ApplyUpdates assigns the right values
to the query. (Param-name should be the same name as the field's name.
If you add _old to the param-name, you can use the values of the field
before the change.)

Update MyTable set MyCol = :MyCol Where MyIdx = :MyIdx_old


> ConstQuery.ApplyUpdates;
> end;
> 
> I am using Updatesql because when I tried it first it said my Updatesql 
> was invalid.

What was the exact message? Most probably it coudn't find any fields for
the where-clause. And that's probably because you use upWhereKey as
UpdateMode, and there's no primary key defined for your table. Try to
change it to upWhereAll.

> I am assuming that I will have to do something like this with Insertsql 
> & deletesql too.

Yes, but if you have just a 'simple select' statement, you don't need
to. Use the auto-generated onces. And, if you have a DB which uses
transactions, don't forget to commit the transaction.

Joost

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


Re: [Lazarus] [PATCH/RFC] DBGrid: allow editing of lookup columns via picklist

2008-10-13 Thread Joost van der Sluis
Op zaterdag 11-10-2008 om 22:48 uur [tijdzone +1100], schreef Alexander
Klenin:

> Regardless of acceptance of this patch, I would like to know current policy:
> If I want to add a feature/fix a bug which requires a change to FPC/FCL,
> how do I proceed? What kinds of workarounds are acceptable?

Submit the necessary patches to fpc first. If those are comitted into
trunk, you can post patches for Lazarus, using {$IFNDEF FPC_2_2_2} (or
equivalent) so that it will only work when Lazarus is compiled with a
newer fpc-version.

If there is a hack available which is really needed, you could also
place that code in an ifdef-block so that it is excluded for newer
fpc-versions. But then it must be really important, or the patch will be
rejected.

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


[Lazarus] Segfault on clicking on a TFPWebModule with fpc 2.3.1/linux/x86_64

2008-09-30 Thread Joost van der Sluis
Hi all,

I have this problem for quite a while now, but I can not fix it. If I
start lazarus, choose File->New->CGI application I get a TFPWebModule.
When I click on it I get an segfault. The backtrace is below.

This does not happen with fpc versions < 2.3.1. (I'm on linux-x86_64)
Thus I'm not sure if it's a Lazarus or fpc-issue. The comment above the
LazGetMethodProp function states that it replaces the buggy
GetMethodProp function of fpc, but those two are exactly the same, as
far as I can see. So I guess that the LazGetMethodProp function can be
removed, but that woudn't solve my problem.

Any ideas?

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 46912508777424 (LWP 7244)]
0x in ?? ()
(gdb) bt
#0  0x in ?? ()
#1  0x009ff1e2 in LAZGETMETHODPROP (LAZGETMETHODPROP={CODE =
0x0, DATA = 0x0}, 
INSTANCE=0x2f770fa0, PROPINFO=0x174edbf) at propedits.pp:2314
#2  0x009ff23b in GETMETHODVALUEAT (GETMETHODVALUEAT=
  {CODE = 0x7fff33281160, DATA = 0xa0a4cf}, INDEX=0,
this=0x2aaab000a540) at propedits.pp:2321
#3  0x009ff09a in GETMETHODVALUE (GETMETHODVALUE=
  {CODE = 0x2f770fa0, DATA = 0x2aaab000a540},
this=0x2aaab000a540) at propedits.pp:2280
#4  0x00a05ff2 in GETVALUE ([EMAIL PROTECTED],
this=0x2aaab000a540, 
[EMAIL PROTECTED]) at propedits.pp:4130
#5  0x009ffd50 in GETVISUALVALUE
([EMAIL PROTECTED], this=0x2aaab000a540, 
[EMAIL PROTECTED]) at propedits.pp:2474
#6  0x009c5827 in DOPAINT (PAINTONLYCHANGEDVALUES=true,
this=0x2fdacc30)
at objectinspector.pp:2494
#7  0x009c58f1 in REFRESHPROPERTYVALUES (this=0x2fdacc30) at
objectinspector.pp:2509
#8  0x009cc349 in REFRESHPROPERTYVALUES (this=0x2fd19e50) at
objectinspector.pp:3760
#9  0x006fe62b in ONCONTROLSELECTIONPROPSCHANGED
(SENDER=0x2ff67040, this=0x2f7c2200)
at main.pp:11698
#10 0x00c22529 in DOCHANGEPROPERTIES (this=0x2ff67040)
at ../designer/controlselection.pp:1800
#11 0x00c200ec in UPDATEREALBOUNDS (this=0x2ff67040)
at ../designer/controlselection.pp:1161
#12 0x00c1f81e in UPDATEBOUNDS (this=0x2ff67040)
at ../designer/controlselection.pp:1004
#13 0x00c0dddc in MOUSEDOWNONCONTROL (SENDER=0x2aaab05c8b50,
[EMAIL PROTECTED], 
this=0x2ff140e0) at ../designer/designer.pp:1378
#14 0x00c0fffe in ISDESIGNMSG (ISDESIGNMSG=true,
SENDER=0x2aaab05c8b50, 
[EMAIL PROTECTED], this=0x2ff140e0)
at ../designer/designer.pp:2011
#15 0x007fc9df in WNDPROC ([EMAIL PROTECTED],
this=0x2aaab05c8b50)
at include/control.inc:1503
#16 0x007f29a8 in WNDPROC ([EMAIL PROTECTED],
this=0x2aaab05c8b50)
at include/wincontrol.inc:4749
#17 0x006b2ac0 in WNDPROC ([EMAIL PROTECTED],
this=0x2aaab05c8b50)
at include/customform.inc:953
#18 0x008e6d7d in DELIVERMESSAGE (DELIVERMESSAGE=7002366,
TARGET=0x2aaab05c8b50, 
[EMAIL PROTECTED]) at gtkproc.inc:3547
#19 0x008f3409 in DELIVERMOUSEDOWNMESSAGE (WIDGET=0x191e200,
EVENT=0x187b4c0, 
AWINCONTROL=0x2aaab05c8b50) at gtkcallback.inc:1421
#20 0x008f3907 in GTKMOUSEBTNPRESS (GTKMOUSEBTNPRESS=true
(4294967295), WIDGET=0x191e200, 
EVENT=0x187b4c0, DATA=0x2aaab05c8b50) at gtkcallback.inc:1549
#21 0x2afdffce in gtk_marshal_BOOL__POINTER ()
from /usr/lib64/libgtk-1.2.so.0
#22 0x2b00f8a7 in ?? () from /usr/lib64/libgtk-1.2.so.0
#23 0x2b011f28 in ?? () from /usr/lib64/libgtk-1.2.so.0
#24 0x2b01267b in gtk_signal_emit ()
from /usr/lib64/libgtk-1.2.so.0
#25 0x2b0486c8 in gtk_widget_event ()
from /usr/lib64/libgtk-1.2.so.0
#26 0x2afde540 in gtk_propagate_event ()
from /usr/lib64/libgtk-1.2.so.0
#27 0x2afdf2e2 in gtk_main_do_event ()
from /usr/lib64/libgtk-1.2.so.0
#28 0x2ad13a5d in ?? () from /usr/lib64/libgdk-1.2.so.0
#29 0x2aae1baa in ?? () from /usr/lib64/libglib-1.2.so.0
#30 0x2aae2345 in ?? () from /usr/lib64/libglib-1.2.so.0
#31 0x2afdf54c in gtk_main_iteration_do ()
from /usr/lib64/libgtk-1.2.so.0
#32 0x008ba626 in APPPROCESSMESSAGES (this=0x2f76a160) at
gtkwidgetset.inc:1187
#33 0x006badb9 in HANDLEMESSAGE (this=0x2b6bf1d0) at
include/application.inc:984
#34 0x006bb18a in RUNLOOP (this=0x2b6bf1d0) at
include/application.inc:1095
#35 0x007361e8 in APPRUN (ALOOP=
  {Proc = {procedure (^pointer)} 0x7fff33282570, Self =
0x2b6bf1d0}, this=0x2f76a160)
at include/interfacebase.inc:49
#36 0x006bb12c in RUN (this=0x2b6bf1d0) at
include/application.inc:1082
#37 0x0068c7c2 in main () at lazarus.pp:107


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


Re: [Lazarus] Debug: evaluate/modify window not working well

2008-09-19 Thread Joost van der Sluis
Op vrijdag 19-09-2008 om 15:48 uur [tijdzone +0200], schreef Tom
Verhoeff:
> I would still be interested in a response to:
> 
> (3) The debug window to evaluate/modify expressions/variables seems
> to have some limitations.  I would like to have some confirmation
> that this is "on purpose" and not a bug for 0.9.24:
> 
> (3a) The expression syntax is rather restrictive, e.g. 1+2 evaluates
>  fine, but 1 + 2 (i.e. with spaces) does not.  Some operators
>  (notably div and mod) are not known.  Can and will this be
>  extended?
> 
> (3b) The modify facility does not work at all.  Is it planned
>  to be make this work?

I guess you'll have to wait until Marc is back from his vacation.

Joost


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


Re: [Lazarus] LoadLibrary on WinCE

2008-09-19 Thread Joost van der Sluis
Op donderdag 18-09-2008 om 23:47 uur [tijdzone +0200], schreef Pavel
Řezníček:
> > Did you use fpc 2.2.2?
> >   
> No, fpc 2.2.3 only.
> Now I have reverted to v0.9.25 r15862 i386-win32-win32/win64 with fpc 
> 2.2.3 but it works fine. 

You gave the lazarus-revision number. But do you also know which
fpc-revision number that is? Kan you give the fpc-revision which does
work (the old one) and the one that doesn't?

Joost.

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


Re: [Lazarus] LoadLibrary on WinCE

2008-09-18 Thread Joost van der Sluis
Op dinsdag 16-09-2008 om 21:16 uur [tijdzone +0200], schreef Pavel
Řezníček:
> On Lazarus v0.9.25 r16541 i386-win32-win32/win64, the LoadLibrary 
> function fails on WinCE.

Did you use fpc 2.2.2?

> I tried to load libpq.dll and sqlite3.dll with no success.

sqlite3.dll works here as a charm. TSQLite3connection also works.

> I have the ARM/WinCE libraries in the same directory as my executable 
> (even in the \gdb folder). All accompanying libraries, *.dll and *.lib, 
> for libpq.dll I have also there.
> 
> I tried to load the libraries myself using a full absolute path (e. g., 
> ExtractFilePath(ParamStr(0)) + 'libpq.dll').
> 
> You can test it on the PQConnection component (try the .Connect 
> property). Of course you should have the libpq.dll file for WinCE.

Did you try any other software that uses this library on WinCE?

> An alternative way is just to load some library you find on your WinCE 
> system, let's say (untested code):
> 
> procedure Form1.Button1Click(Sender: TObject);
> var LibHandle: HInst;
> begin
> LibHandle := Windows.LoadLibrary('mylibrary.dll')
> ShowMessage(IntToStr(LibHandle));
> LibHandle := Windows.LoadLibrary(ExtractFilePath(ParamStr(0)) + 
> 'mylibrary.dll')
> ShowMessage(IntToStr(LibHandle));
> end;
> 
> That's it. If you have the same bug you'll get both handles of zero 
> value (meaning the loading wasn't successful).
> 
> I wonder why just a simple thing as calling an API function would fail. 
> Maybe because the core library from that the LoadLibrary function is 
> imported also fails to load??
> 
> Any clue how to get it working?

I woudn't be suprised if all files must be in the application's
directory. 

Joost.

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


Re: [Lazarus] TDBImage -AV [SOLVED] for Jpeg images

2008-09-04 Thread Joost van der Sluis
Your solution only works if you know for sure that the field contains a
jpeg-image. The lazarus-code assumes that the blob-fields start with the
extension from the image, so that it can 'detect' what kind of image it
is.
That means offcourse, that you also have to use a TDBEdit to place the
image into the database. Or else the leading extension won't be there.

But I think I saw something else which is strange.

btw: maybe you could send a patch (diff -u) next time, that's easier to
read for people who are used to it. This is kind of a puzzle, althoug
maneagable.

Op woensdag 03-09-2008 om 14:56 uur [tijdzone -0300], schreef Osvaldo
Filho:
> The problem, perhaps, is in s.readstring. 
> =
> //dbimage.inc line 135
> 
> procedure TDBImage.LoadPicture;
> var //s: TMemory; // ( lazarus team)
> s: TMemoryStream; // ( mine )
> GraphExt : string;
> gc   : TGraphicClass;
> AGraphic : TGraphic;
> 
> begin
>   if not FPictureLoaded then
> begin
> FUpdatingRecord := True;
> if not assigned(FDatalink.Field) then
> Picture.Assign(FDatalink.Field)
> else
> if FDatalink.field.IsBlob then
>   begin
>   if FDatalink.field is TBlobField then
> begin
> if FDatalink.Field.IsNull then
>   begin
>   Picture.Clear;
>   exit;
>   end;
> //FDataLink.DataSet.CreateBlobStream(FDataLink.Field,bmRead); //
> (lazarus team)

I guess this should be S:=FDatalink.Dataset.CreateBlobstream.etc
Maybe you also have to add the s.position := 0?

> s := TMemoryStream.create; // ( mine )
> (FDataLink.Field as TBlobField).SaveToStream(s); // ( mine )
> s.Position:= 0; // ( mine )
> 
> if (S=Nil) or (s.Size = 0) then
>   begin
>   Picture.Clear;
>   exit;
>   end;
> try
>   //GraphExt :=  s.ReadAnsiString; // (lazarus team)

Add 'gc := nil; AGraphic := nil;' here, as mentioned by someone else.

>   // gc := GetGraphicClassForFileExtension(GraphExt); //
> (lazarus team)
>   //  if assigned(gc) then  // (lazarus team)
>   //  begin   // (lazarus team)
>   
>   Picture.Jpeg.LoadFromStream(s); // ( mine )
>   
>   //AGraphic. := gc.Create;  // (lazarus team)
>   //AGraphic.LoadFromStream(s);  // (lazarus team)
>   //Picture.Assign(AGraphic);
> //end;
> finally
>   //if assigned(AGraphic) then AGraphic.Free;  // (lazarus
> team)
>   s.Free;
> end {try}
> 
> end
>   else
> Picture.Assign(FDataLink.FField);
>   end;
> FUpdatingRecord := False;
> end;
> end;  
> =
> 
> 2008/9/2 Osvaldo TCF - Listas <[EMAIL PROTECTED]>
> With my image: a .jpg file
> ---
> in dbimage.inc, line 163:
>try
>  GraphExt := s.ReadAnsiString;
> 
>  gc := GetGraphicClassForFileExtension(GraphExt);
>  if assigned(gc) then
>begin
>AGraphic := gc.Create;
>AGraphic.LoadFromStream(s);
> 
>Picture.Assign(AGraphic);
>end;
> ---
> 
> gc is not assigned, is it correct?
> ==
> 
> The AV ocour here:
> dbimage.inc line 175
> --
>                Picture.Assign(AGraphic);
>end;
>finally
> line 175>>  if assigned(AGraphic) then AGraphic.Free;
>  s.Free;
>end {try}
> --
> 
> Em Ter, 2008-09-02 às 10:34 +0200, Joost van der Sluis
> escreveu:
> 
> 
> > Op maandag 01-09-2008 om 12:05 uur [tijdzone -0300], schreef
> Osvaldo
> > Filho:
> > > I can not use tdbimage, access violation!
> > >
> > > loadpicture error?
> >
> > Hmm... I had that working with a few hacks. Maybe that it
> doesn't work
> > anymore with the latest image changes in Lazarus-svn. So
> which fpc and
> > lazarus version are you using?
> >
> > Joost
> >
> >
> > ___

Re: [Lazarus] TDBImage - With IBConection and FBDataset - AV

2008-09-02 Thread Joost van der Sluis
Op maandag 01-09-2008 om 12:05 uur [tijdzone -0300], schreef Osvaldo
Filho:
> I can not use tdbimage, access violation!
> 
> loadpicture error?

Hmm... I had that working with a few hacks. Maybe that it doesn't work
anymore with the latest image changes in Lazarus-svn. So which fpc and
lazarus version are you using?

Joost


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


Re: [Lazarus] Lazarus & Databases under OSX

2008-09-02 Thread Joost van der Sluis
Op zondag 31-08-2008 om 20:31 uur [tijdzone +0200], schreef Giuseppe
Luigi Punzi Ruiz:
> Hi,
> 
> 
> I asked this on LAzarus Forums, but I will ask on this way too.
> 
> 
> I need to do some little projects using SQLite and Firebird
> (probably). I would like to run this applications on Windows&Mac.
> 
> 
> I tried to install ZeosDBO without success, getting the error:
> Users/glpunzi/desarrollo/Lazarus/ZEOSDBO-6.6.3-stable/src/plain/ZPlainLoader.pas(97,22)
>  Fatal: Can't find unit libc used by ZPlainLoader 
> 
> 
> I tried to delete all references to libc, and compiled Ok, but then, I
> get an error rebuilding Lazarus.

libc is indeed only available on linux/i386. Maybe you could send a
bug-report to the ZEOS-people to ask if they can remove the
libc-references properly.

> I tried to install SQLDb package too, but still having problems, getting:
> /usr/local/share/lazarus/components/sqldb/registersqldb.pas(1,1) Fatal: Can't 
> find unit dbf_prscore used by bufdataset_parser

That's because tDbf is not compiled by default on OS/X in fpc 2.2.0.
This is changed in fpc 2.2.2. 

Joost.


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


Re: [Lazarus] Security issue (symlink attack) in Lazarus filed on Fedora's bugzilla

2008-08-29 Thread Joost van der Sluis
Op vrijdag 29-08-2008 om 15:53 uur [tijdzone +0200], schreef Mattias
Gaertner:
> On Fri, 29 Aug 2008 14:55:00 +0200
> Joost van der Sluis <[EMAIL PROTECTED]> wrote:
> 
> > Hi all,
> > 
> > As the packager of Lazarus in Fedora, I get notifications if someone
> > files a bug in Fedora's bug-tracker. 
> > 
> > Now someone added a bug-report with a security issue:
> > https://bugzilla.redhat.com/show_bug.cgi?id=460642
> > 
> > And indeed, if someone add a symlink like 'ln
> > -s /tmp/fpc_patchdir /etc' and thereafter someone with
> > root-permissions runs the check_fpc_dependencies.sh script with th
> > following code in it he won't be happy:
> > 
> > 89 TmpDir=/tmp/fpc_patchdir
> > 90 if [ "$WithTempDir" = "yes" ]; then
> > 91 if [ -d $TmpDir ]; then
> > 92   rm -rf $TmpDir/*
> > 93 rm -r $TmpDir
> > 94   fi
> > 
> > How can we fix this?
> 
> I replaced it with
>   rm -rf $TmpDir

Read the link, this was only one example, but there are more. And your
solution works for the hack in my example, but I doubt it is entirely
safe.

Joost.

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


[Lazarus] Security issue (symlink attack) in Lazarus filed on Fedora's bugzilla

2008-08-29 Thread Joost van der Sluis
Hi all,

As the packager of Lazarus in Fedora, I get notifications if someone
files a bug in Fedora's bug-tracker. 

Now someone added a bug-report with a security issue:
https://bugzilla.redhat.com/show_bug.cgi?id=460642

And indeed, if someone add a symlink like 'ln -s /tmp/fpc_patchdir /etc'
and thereafter someone with root-permissions runs the
check_fpc_dependencies.sh script with th following code in it he won't
be happy:

89 TmpDir=/tmp/fpc_patchdir
90 if [ "$WithTempDir" = "yes" ]; then
91 if [ -d $TmpDir ]; then
92   rm -rf $TmpDir/*
93 rm -r $TmpDir
94   fi

How can we fix this?

Joost.


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


Re: [Lazarus] Need some help with UpdateSQL in TSQLQuery and TMySQL50Connection

2008-08-28 Thread Joost van der Sluis
Op donderdag 28-08-2008 om 15:21 uur [tijdzone -0500], schreef Howard
Lee Harkness:
> After several rounds of non-answers here (seems the developers just
> assume everybody else should know the internals of everything, which
> is not realistic),

Assuming that we can understand your problem without knowing the
internals of what you're doing is also not realistic. As I tried to
explain to you, I coudn't figure out what you were trying to do, and how
you tried it. In that case: we can't help you.

>  a member of the Lazarus forum posted the answer to this problem. The
> ApplyUpdates call can be placed in the "after" event handlers. Fairly
> simple, and in retrospect, fairly obvious.

So now I understand what your problem is: actually it's not a problem
with applyUpdates, but you want that it's called 'automagically'.

I think you'd better place the ApplyUpdates in the after-scroll event,
in that case. That's much easier. But your approach will also work.

> Knowing that two months ago would have saved me a lot of time.

This could also help: http://www.catb.org/~esr/faqs/smart-questions.html


>  Meanwhile, I switched to PostgreSQL, and the components for that DB
> don't appear to have the same problem.

That's always a good idea. ;)

Joost.


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


Re: [Lazarus] Pasic Ide - previously named Lightsarus

2008-08-24 Thread Joost van der Sluis
Op zondag 24-08-2008 om 08:10 uur [tijdzone -0700], schreef Ciprian
Mustiata:
> Thank you Florian for your bug report.
> 
> Right now should launch or at least to display a better error in a Message 
> Box. Is fixed and uploaded the fix.

Did you also fix the memmory-issue? Which was the most important
complaint? 28MB for just one error-message is a bit of a problem, no?
For a project that is designed to create small programs?

Joost

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


Re: [Lazarus] Problem working with Params in TSQLQuery

2008-08-22 Thread Joost van der Sluis
Op dinsdag 19-08-2008 om 17:11 uur [tijdzone +0200], schreef Michael Van
Canneyt:
> > 
> > 
> > On Tue, 19 Aug 2008, Eduardo Lopez wrote:
> > 
> > > Yes!! It works now.!!
> > 
> > My challenge is now:
> > 
> > a) modify all my db structure or b) replace the sqldb components with zeos.
> 
> Or pad your parameters.
> 
> Meanwhile I think I know why the problem exists, I will consult with Joost
> for a test and possible solution.

The problem is fixed in trunk. If you don't want to use trunk, or find
it too much of a hassle. You can just place the new 'ibconnection.pp'
unit in the search-path of your project.
(http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/packages/fcl-db/src/sqldb/interbase/ibconnection.pp?revision=11629)

Can you try and please give some feedback, so we know it's really
solved?

Joost.



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


Re: [Lazarus] Problem working with Params in TSQLQuery

2008-08-18 Thread Joost van der Sluis
Op maandag 18-08-2008 om 15:38 uur [tijdzone -0300], schreef Eduardo
Lopez:
> Joost van der Sluis escribió:
> > Op maandag 18-08-2008 om 09:14 uur [tijdzone +0200], schreef Michael Van
> > Canneyt:
> >   
> >> On Mon, 18 Aug 2008, Eduardo Lopez wrote:
> >>
> >> 
> >> ave parameters working. Is the ParseSQL property set to 'True' ?
> >> 
> >
> > That shoudn't make any difference. What if you use
> > params[0].asstring := ... ?
> >
> > Joost
> >   
> 
> First, thanks all for yours reply.
> 
> The ParseSQL has no effect.
> 
> Joost, the change you suggest don't work too.
> 
> I isolate the problem doing a simple program and the problem remains.
> Then make a copy of this simple program and change the components to 
> Zeos. (6.6.3-stable) and works well.
> 
> I'll consider change the sqldb components for Zeos in my application as 
> a possible solution. But the sqldb must be work (i think :-) ).

Offcourse, but then we have to find the problem. Parameters do work
here, also in the testsuite. What happens if you remove the 'trim' in
both cases? (Without the parameter and with?)

Joost

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


Re: [Lazarus] Problem working with Params in TSQLQuery

2008-08-18 Thread Joost van der Sluis
Op maandag 18-08-2008 om 09:14 uur [tijdzone +0200], schreef Michael Van
Canneyt:
> 
> On Mon, 18 Aug 2008, Eduardo Lopez wrote:
> 
> > The scenario:
> > 
> > Lazarus 0.9.25   svn: 16095M
> > fpc 2.2.2
> > Ubuntu 8.04 GTK2
> > SQLDb components
> > TIBConnection
> > 
> > The following query works well:
> > 
> > qry02.SQL.Clear;
> > qry02.SQL.Text:= 'select PASSWOR from USUARIOS where CODUSU = ' + 
> > chr(39) + trim(pUsuario) + chr(39);
> > trn02.Active:=true;
> > qry02.Open;
> > ContrasenaDB:=qry02.FieldByName('PASSWOR').AsString; // <-- 
> > ContrasenaDB get the value from the query
> >
> > 
> > But this one don't get the value of 'PASSWOR':
> > 
> > qry02.SQL.Clear;
> > qry02.SQL.Text:= 'select PASSWOR from USUARIOS where CODUSU = :pCODUSU';
> > qry02.Params.ParamByName('pCODUSU').AsString:= trim(pUsuario);
> > trn02.Active:=true;
> > qry02.Open;
> > ContrasenaDB:=qry02.FieldByName('PASSWOR').AsString;// <--- 
> > ContrasenaDB is empty
> > 
> > (The second code was working with fpc 2.2.0 and the UIB components, with 
> > some changes. When upgrade to fpc 2.2.2 i began to replace de UIB with 
> > the default SQLDb componentes).
> 
> I have parameters working. Is the ParseSQL property set to 'True' ?

That shoudn't make any difference. What if you use
params[0].asstring := ... ?

Joost

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


Re: [Lazarus] Current version?

2008-08-07 Thread Joost van der Sluis
Op donderdag 07-08-2008 om 13:12 uur [tijdzone +], schreef Mark
Morgan Lloyd:
> Over the last couple of years I've been tinkering with Lazarus on i386 
> (Windows and Linux) and SPARC (Linux), I'm mostly using 0.9.24 on FPC 
> 2.2.0. I'm currently trying to get it running on ARM (Linux, little-endian).
> 
> What is the current preferred version for non-core users, in terms of 
> being reasonably stable but with problems being of interest to the core 
> developers?

Here we're using fpc 2.2.3 (thus svn fixes_2_2 branch) and lazarus-svn
(trunk).

That's reasonably stable. And if lazarus becomes unstable, you could
just revert to an somewhat older version which you remember does work.

Joost.



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


Re: [Lazarus] TDBEdit shows 4 characters from a Char(1) field

2008-08-05 Thread Joost van der Sluis
Op dinsdag 05-08-2008 om 13:40 uur [tijdzone +0200], schreef Graeme
Geldenhuys:
> On 8/5/08, Martin Schreiber <[EMAIL PROTECTED]> wrote:
> Maybe SqlDB developers need to take a peak at MSEgui's DB code as
> well.  Thanks again!

MSEgui's DB code is a fork of sqldb. We know that code quite well.. ;) 

Joost.

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


Re: [Lazarus] Firebirdsql Characters Compatibility

2008-07-25 Thread Joost van der Sluis
Op vrijdag 25-07-2008 om 09:35 uur [tijdzone -0300], schreef Osvaldo
TCF:
> 
> environment
> ubuntu 8.04
> fpc 2.2.3
> lazarus gtk2 r15343
> firebird 2.0.4 win1252
> components tested: uib + uibdataset ; uib + fbdataset ; sqldb + sqlquery
> 
> Problem:
> characters 'ã', 'á', 'Á' (...) apear diferent in lazarus and flamerobin
> and ibeasy. Ibeasy and flamerobin show  the same form, diferent from
> lazarus dataware componets.
> 
> When i enter from flamerobin or ibeasy (via wine) the characters are
> showed normal in flamerobin and ibeasy but apear how squares with X
> (#225 i think) in lazarus dataware components.

This is the same question as in the 'Unicode and DBAware' thread. The
strings in the database are stored in some local character set (probably
iso-8859-1) by Ibeasy and Flamerobin. But the latest Lazarus version
expect all strings to be in utf-8 encoding. 

So you have two options: store all data in the database using utf-8. If
Flamerobin and Ibeasy do not support utf-8, you could consider using
IBExpert, for example. (Windows only)

Or you could convert all data read from the dataset from the encoding
used by Flamerobin and Ibeasy to the utf8-encoding. And offcourse, if
you store data into the database, you have to convert the data from
utf-8 to the other encoding. How you can do that you can find in my mail
in the DBAware-thread. Or you could use the OnGetText and OnSetText
properties from the TStringFields you are using.

I think it's obvious that if you have full control over the database,
the first option is the best one.

There is a change that the second option will be automated in fpc 2.4.0
or 2.2.4, but that's hard to say now.

And I think that, especially when Lazarus 0.9.26 is released, we'll get
this question very often. Maybe something to mention in the releasenotes
or the FAQ?

Joost.



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


Re: [Lazarus] [Fwd: Re: DisplayFormat property of dbgrid?]

2008-07-25 Thread Joost van der Sluis
Op zaterdag 19-07-2008 om 15:54 uur [tijdzone -0600], schreef Howard Lee
Harkness:
> 
> Well, as I thought I had mentioned, there does not appear to be any
> masking available in the dbGrid component. I suppose I need to look at
> Zeos, assuming Zeos will work with PostgreSQL.  

You could use the TField.OnGetText and .OnSetText for that purpose. This
is TDataset/TField functionality, and so is not available for ZEOS only.

Joost.

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


Re: [Lazarus] Unicode and DBAware

2008-07-23 Thread Joost van der Sluis
You could override the TDataset.DataConvert procedure or the
TDataset.Translate procedure and set the Transliterate property to true
of the TStringFields of which you want to convert the data.

If you e.g. use a TSQLQuery, you can add your own
TTransSQLQuery=class(TSQLQuery) and override one of the above
procedures.

Joost 

Op woensdag 23-07-2008 om 18:39 uur [tijdzone +0200], schreef JoshyFun:
> Hello Lazarus,
> 
> I'm now "upgrading" a Lazarus 0.9.24 DB project to 0.9.25 with by
> default unicode support. The problem is that the database can not
> currently be upgraded to be unicode compliant so it is using the
> default codepage meanwhile all the visual objects like dbgrid are
> unicode.
> 
> The problem is that when a text field has a "special" character
> (codepage) the string fails to be rendered displaying nothing (blank
> line) and I'm unable to find a way to insert the Utf8ToAnsi and
> AnsiToUtf8 conversions somewhere.
> 
> My layout is a non visual firebird connection which is linked to the
> visual object after form creation and the connection is linked to a
> SQLQuery -> DataSource -> DBGrid
> 
> May anybody help me in the best way to insert the necessary
> conversions ?
> 
> Note: I'm not using the fields definition in the SQLQuery object as at
> design time the database connection is not present in the form.
> 
-- 

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


Re: [Lazarus] The drop-down menu not list data table

2008-06-26 Thread Joost van der Sluis
Op donderdag 26-06-2008 om 17:43 uur [tijdzone +0800], schreef peng:
> 
> I connect to a database, using the DBComboBox component, linked to a
> field in the Datasource, running, we can see the current record field
> values. However, the mouse click it, the drop-down box is empty. 
> How can the drop-down box show records that all of the query? 

You have probably only set the datasource+field of the field in which
you want to store the data. You also have to provide a datasource and
two fields (one with the key, one with the value you want to show) to
generate the list from which you want to choose. Look at ListDatasource,
KeyField and ListField.

Joost

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


Re: [Lazarus] 0.925 editor of the Chinese characters overlap

2008-06-24 Thread Joost van der Sluis
Op dinsdag 24-06-2008 om 12:05 uur [tijdzone +0800], schreef peng:
> In addition, I found sqlite components have been included in the new
> version, good news!

There already were sqlite components. You only have to install them. 

Now you have two options: sqlite using sqldb, of the more 'native'
sqlite3dataset component which you still have to install yourself.
(packages -> configure installed packages)

Joost.

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


Re: [Lazarus] Advice about creating database-aware application with Lazarus

2008-06-23 Thread Joost van der Sluis
Op zondag 22-06-2008 om 19:34 uur [tijdzone -0600], schreef Howard Lee
Harkness:
> 
> What I REALLY wanted was to be able to drop some components on a form
> (connection, query, datasource, dbgrid, and dbnavigator), and link
> them together with some properties, and have it work without writing a
> lick of code -- just like I once did with Delphi 3 over a decade ago.
> So far, Lazarus has not caught up with D3, much less D6.

With MySQL 4 or 5? I doubt it. 

And with the latest Delphi versions, you'll also fail. They also need an
applyupdates call, just like fpc does.

This is not a problem of fpc, but more a problem that you don't know
how to use it (yet). Or if you want, a documentation problem.

Joost.

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


Re: [Lazarus] SQLite - WinCe

2008-06-22 Thread Joost van der Sluis
Op zondag 22-06-2008 om 19:41 uur [tijdzone +0200], schreef
[EMAIL PROTECTED]:
> I am testing SQLite under WinCE. A few notes:
>  
> - When the db file is in a shared folder linked to the Emulator, it
> cannot be opened. Needs to becopied to an internal folder. This may
> have nothing to do with Lazarus, but might be a useful peace of
> information anyway.

Hmm. That could explain somethings. I think it's somewhat different. In
my experience the application made an database-file, but it coudn't be
seen on the host-os. I guess there's some synchonise-issue.

> - SQLite3Connection does not  raise an exception when it cannot
> connect. Connected becomes  "true" no matter what.

That's probably because messageboxes do not work. (in my experience)
Place the .open in a try-except-block and catch the error message.
That's how I did it.

> - Opening a SQLQuery raises Bus error or "misaligned data".

Update to a recent fpc version. (2.2.2rc1 or later)

> - Sqlite3Dataset:  Loading a less then 2MByte dataset takes around 15
> seconds in the emulator on a  Centrino  Dothan 1.6 CPU.  Is this the
> speed to expect, or Sqlite3Dataset needs to be checked?

Changing folders did also take a few seconds here. Try it on a real
device...

Joost.


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


Re: [Lazarus] [lazarus] Advice about creating database-aware application with Lazarus

2008-06-22 Thread Joost van der Sluis
Op zaterdag 21-06-2008 om 20:06 uur [tijdzone -0600], schreef Howard Lee
Harkness:

> At that point, I could insert a record, but not edit or delete a
> record. So, I tried the following:
> 
> procedure TForm1.DBNavigator1Click(Sender: TObject; Button:
> TDBNavButtonType);
> begin
>   case Button of
>   nbDelete, 
>   nbPost: begin
>   SQLQuery1.DisableControls;
>   SQLQuery1.ApplyUpdates;
>   SQLQuery1.EnableControls;
>   end;
>   nbRefresh: begin
>  SQLQuery1.Close;
>  SQLQuery1.Open;
>  end;
>   end;
> end;
> 
> Lo, and behold! I could now insert a record, and delete a record!!!
> Elated, I tried the following:

My question is why you did DBNavigator1Click at all? On nbPost, it
should call - first of all - SQLQuery1.Post. You forgot that. (I guess
that that's your edit-problem) Normally, if you don't implement
DBNavigator1Click it will do that automatically.

If you want the changed to be committed to the underlying database
immediately (Is that a good design?) then you can add the
disable-apply-enable sequence to the SQLQuery1.AfterScroll event. Then
you don't need the DBNavigator1Click-hack.

Joost

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


Re: [Lazarus] Need some help with UpdateSQL in TSQLQuery and TMySQL50Connection

2008-06-22 Thread Joost van der Sluis
You can disregard this mail, in the mean time most issues are cleared
out. ;)

Joost.

Op zondag 22-06-2008 om 15:48 uur [tijdzone +0200], schreef Joost van
der Sluis:
> Op zaterdag 21-06-2008 om 14:04 uur [tijdzone -0500], schreef Howard Lee
> Harkness:
> > On Thu, Jun 19, 2008 at 8:22 AM, Joost van der Sluis <[EMAIL PROTECTED]>
> > wrote:
> > Op zaterdag 14-06-2008 om 16:06 uur [tijdzone -0500], schreef
> > Howard Lee
> > Harkness:
> > 
> > > However, it doesn't seem to matter what I put in for
> > nbDelete. I
> > > always get the error "There are no fields found to generate
> > the
> > > where-clause" if I do ApplyUpdates for nbDelete. If I put
> > nothing in
> > > there, the field appears to be deleted, but it is still in
> > the table,
> > > and comes back to the grid when I press "refresh".
> > 
> 
> > Yes, and yes. See the code that I posted at the beginning of the
> > thread -- if you see a problem with the code , please tell me what I'm
> > doing wrong, or not doing right. There is definitely something wrong
> > with it, because it doesn't work. If I left something out, tell me and
> > I can just zip up the whole project and email it to you.
> 
> Sorry, but with the code you've sent, it's truely impossible to get the
> error-message you claim that you got. There even is no 'ApplyUpdates' in
> your code. That code is completely irrelevent - it's the code of an empy
> program.
> 
> Please, don't send puzzles to us, we can't help you if you do.
> 
> For an example look at the fpc-code: packages/fcl-db/sqldb/examples
> 
> 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] [lazarus] Advice about creating database-aware application with Lazarus

2008-06-22 Thread Joost van der Sluis
Op zaterdag 21-06-2008 om 17:05 uur [tijdzone -0500], schreef Howard Lee
Harkness:
> 
> Seems to me that I should have been able to get a program as trivial
> as the one I am trying to write running with stuff that was available
> two years ago. Kinda makes me wonder if I'm just trying to use the
> wrong tools. 

Yes, you are. You are using MySQL for a non-web-based application. ;)

Joost.

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


Re: [Lazarus] Need some help with UpdateSQL in TSQLQuery and TMySQL50Connection

2008-06-22 Thread Joost van der Sluis
Op zaterdag 21-06-2008 om 14:04 uur [tijdzone -0500], schreef Howard Lee
Harkness:
> On Thu, Jun 19, 2008 at 8:22 AM, Joost van der Sluis <[EMAIL PROTECTED]>
> wrote:
> Op zaterdag 14-06-2008 om 16:06 uur [tijdzone -0500], schreef
> Howard Lee
> Harkness:
> 
> > However, it doesn't seem to matter what I put in for
> nbDelete. I
> > always get the error "There are no fields found to generate
> the
> > where-clause" if I do ApplyUpdates for nbDelete. If I put
> nothing in
> > there, the field appears to be deleted, but it is still in
> the table,
> > and comes back to the grid when I press "refresh".
> 

> Yes, and yes. See the code that I posted at the beginning of the
> thread -- if you see a problem with the code , please tell me what I'm
> doing wrong, or not doing right. There is definitely something wrong
> with it, because it doesn't work. If I left something out, tell me and
> I can just zip up the whole project and email it to you.

Sorry, but with the code you've sent, it's truely impossible to get the
error-message you claim that you got. There even is no 'ApplyUpdates' in
your code. That code is completely irrelevent - it's the code of an empy
program.

Please, don't send puzzles to us, we can't help you if you do.

For an example look at the fpc-code: packages/fcl-db/sqldb/examples

Joost.


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


Re: [Lazarus] [lazarus] Advice about creating database-aware application with Lazarus

2008-06-19 Thread Joost van der Sluis
Op zaterdag 14-06-2008 om 19:16 uur [tijdzone -0500], schreef Howard Lee
Harkness:
> Did you ever get an answer to this question? I am having a similar
> difficulty, and information on ApplyUpdates is infuriatingly hard to
> find.

You can find this problem in the bug-tracker. You can work around it
with 'TDataset.DisableControls' and 'TDataset.Enablecontrols' around the
applyupdates call. Or try fpc 2.2.2rc1 or any later version.

Joost.

> On Tue, Oct 10, 2006 at 1:11 AM, Adrian Maier <[EMAIL PROTECTED]>
> wrote:
> On 10/10/06, Joost van der Sluis <[EMAIL PROTECTED]> wrote:
> 
> Well... As I read it, that's not the problem. All
> changes are made in an
> update-buffer first. So if you do a 'delete' in the
> grid, the records
> get deleted in that buffer. Thus the record should
> disapear immediately
> in the grid. But not yet on the database.
> 
> The 'delete'-sql is only send to the database on
> the .applyupdates
> command. And committed on the .commitretaining. Thus
> that can happen
> much later. (on the click on the 'save' button)
> 
> But if I understood you correctly, the delete fails
> immediately. That
> means that there's a problem in the deletion of
> records in a grid. Or in
> the .delete from Tbufdataset. You first have to test
> that. Easiest way
> is to add a button 'delete' which does
> sqlquery1.delete. That'll delete
> the current record, and it should be immediately
> visible in the grid.
> Else you could do a .refresh after the .delete, to be
> sure that the grid
> gets refreshed. (If not, it's a bug, btw)
> 
> 
> I've added a button which calls query1.Delete.  The row
> disappears
> from the grid now. So, it looks like TdbNavigator's
> "Delete" button does
> something different than it's supposed to do ?
> 
> However, when I press "Save" (which does applyupdates and
> commitretaining)
> the program crashes with  :
> 
> TApplication.HandleException Access violation
>  Stack trace:
>  $08211A8E
>  $0821AE3F  TCUSTOMDBGRID__UPDATESCROLLBARRANGE,  line 1336 of
> dbgrids.pas
>  $0821B013  TCUSTOMDBGRID__DOLAYOUTCHANGED,  line 1402 of
> dbgrids.pas
>  $0821CB35  TCUSTOMDBGRID__ENDLAYOUT,  line 2164 of
> dbgrids.pas
>  $0821B660  TCUSTOMDBGRID__LAYOUTCHANGED,  line 1568 of
> dbgrids.pas
>  $08219DA2  TCUSTOMDBGRID__ONDATASETCHANGED,  line 814 of
> dbgrids.pas
>  $0821E518  TCOMPONENTDATALINK__DATASETCHANGED,  line 2722 of
> dbgrids.pas
>  $0820E0F4
>  $0820EEF5
>  $0820F10B
>  $08202E6B
>  $08205F5D
>  $08211320
>  $08211264
>  $0807DE10  TFORMASIMPLA__ACTIONCOMMITEXECUTE,  line 85 of
> forma_simpla.pas
>  $0808DDB5
>  $081755F2  TCONTAINEDACTION__EXECUTE,  line 110 of
> ./include/containedaction.inc
> 
> In ContainedAction.inc:
> 
> function TContainedAction.Execute: Boolean;
> begin
>  Result := (ActionList <> nil) and
> ActionList.ExecuteAction(Self)
>   or ((ApplicationActionComponent<>nil)
>and ApplicationActionComponent.ExecuteAction(Self))
>   or inherited Execute //
> <- line 110
>   or (SendApplicationMessage(CM_ACTIONEXECUTE, 0,
> PtrInt(Self)) = 1);
> end;
> 
> 
> Cheers,
> Adrian Maier
> 
> 
> 
> _
>To unsubscribe: mail [EMAIL PROTECTED] with
>   "unsubscribe" as the Subject
>  archives at http://www.lazarus.freepascal.org/mailarchives
> 
> 
> 
> 
> -- 
> Howard Lee Harkness
> ___
> 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] Need some help with UpdateSQL in TSQLQuery and TMySQL50Connection

2008-06-19 Thread Joost van der Sluis
Op zaterdag 14-06-2008 om 16:06 uur [tijdzone -0500], schreef Howard Lee
Harkness:

> However, it doesn't seem to matter what I put in for nbDelete. I
> always get the error "There are no fields found to generate the
> where-clause" if I do ApplyUpdates for nbDelete. If I put nothing in
> there, the field appears to be deleted, but it is still in the table,
> and comes back to the grid when I press "refresh".

Does your table has a primary key? And do you have set the
'UsePrimaryKeyAsKey' property to true?

sqldb tries to create an delete-query for you, but to do that it has to
indentify the record that should be deleted. Normally it uses the
primary key for that. If there is no primary key, you have to tell it
which fields should be included as a 'key'. (ie: be a part of the
where-statement in the delete query: 'delect from table where ...)

Joost.

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


Re: [Lazarus] Registering Dll for WinCe

2008-06-19 Thread Joost van der Sluis
Op vrijdag 13-06-2008 om 15:40 uur [tijdzone +0200], schreef
[EMAIL PROTECTED]:
> > Define "register a dll"
> 
> I am trying to make an app based on a SQLlite database.
> When the program is loading it does not find the sqlite3.dll, though it is 
> in the same dir and it is the right build (for WinCE).
> 
> After some googling it seems that it is not enough simply to copy the dll to 
> the application directory, WinCe needs to be told it is there.
> 
> Does this clear the picture?

Only a few dll need registering, and I used the sqlite3.dll without
registering by placing it in the same directory as the application. so I
guess your problem is something else.

Joost.

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


Re: [Lazarus] TEST SQLITE

2008-06-19 Thread Joost van der Sluis
sqlite doesn't even have a memo-field type. So how should we support it?

But sqlite doesn't support any field-type, so we could mask this. But
what are you trying to do?

Joost.

Op woensdag 11-06-2008 om 20:51 uur [tijdzone +0200], schreef Chris37:
> Hi all,
> 
> Lazarus 0.9.25 and FPC 2.2.2rc1
> 
> With SQLITE3Connection and SQLQuery
> 
> I have error message 'ftMemo not supported'
> 
> Have you problems with type ftMemo and Sqlite3 please ?
> 
> Regards
> Chris
> 
> ___
> 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] Report: 0.925 connect PostgreSQL collapse

2008-06-19 Thread Joost van der Sluis
Op zaterdag 07-06-2008 om 19:35 uur [tijdzone -0300], schreef Felipe
Monteiro de Carvalho:
> Please file a bug report. Specify in the bug report that this is a
> regression. The bug is most likely a Free Pascal bug, so report for
> Free Pascal and not Lazarus.

Well, according to Peng it did work in lazarus 0.9.24 with fpc 2.2.0,
but doesn't work with lazarus 0.9.25 with fpc 2.2.0. So I don't think it
has anything to do then with fpc.

Joost.

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


[Lazarus] Problems building Lazarus on Fedora 9

2008-06-01 Thread Joost van der Sluis
Hi all,

When I try to build a Lazarus rpm for fedora 9 (x86_64) I get the result
below. Could it be that there really is an incompatible glibc?

ma
in.pp(1110,35) Warning: Constructing a class "TPkgManager" with abstract
methods
Linking ../lazarus
/usr/bin/ld
:
 
s
k
i
p
p
i
n
g
 
i
n
c
o
m
p
a
t
i
b
l
e
 
/usr/lib/libglib.so
 
w
h
e
n
 
s
e
a
r
c
h
i
n
g
 
f
o
r
 
-lglib
/usr/bin/ld
:
 
c
a
n
n
o
t
 
f
i
n
d
 
-lglib
lazarus.pp(114,1) Error: Error while linking
lazarus.pp(114,1) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
make[2]: Leaving directory
`/builddir/build/BUILD/lazarus-0.9.24/lazarus/ide'

-- 

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


Re: [Lazarus] TEST SQLITE

2008-05-30 Thread Joost van der Sluis
Op vrijdag 30-05-2008 om 01:01 uur [tijdzone +0200], schreef Chris37:
> @ Joost van der Sluis
> 
> Ref: http://bugs.freepascal.org/view.php?id=11350
> 
> Hi,
> Thank but wich version of Lazarus could i download for tested your 
> correction ?

I think I was in time to make it into the snapshots of today or any
later date. You can use a lazarus snapshot which contains fpc version
2.1.1

Joost.

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


Re: [Lazarus] PostgreSQL database connection error

2008-05-29 Thread Joost van der Sluis
Op vrijdag 30-05-2008 om 04:43 uur [tijdzone +0800], schreef peng:

> According to PostgreSQL users told me that in the P client set
> transcoding, for example:SET CLIENT_ENCODING TO 'GBK' .
> The GBK is better able to show that the Chinese encoding, but, which
> position this SQL statement to add in ? I tried to add SQL attributes
> in TSQLQuery components,  such as: 
> 
> set client_encoding to 'gbk'
> Select * from xiang 


> However, Lazarus report errors: 
> -- 
> error: 
>  Operation cannot be performed on an active dataset 
> OK 
> -- 
> 
> If I make the database active attribute to false, then it can no longer be a 
> True.

You should first set the client_encoding with
'TSQLConnection.ExecuteDirect('set client_encoding to ''gbk'');'
Then you can open your query. (Note that you can only change the
sql-statement of an query when it's closed)

Joost.


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


Re: [Lazarus] Postgres Dlls not found

2008-05-29 Thread Joost van der Sluis
Op donderdag 29-05-2008 om 22:24 uur [tijdzone +0200], schreef Dave
Coventry:
> > Also, for the record, installing a Verifone application called "PC
> Charge"
> > can throw your PostgreSQL client because Verifone decided to name
> one of
> > their DLLs libpq.dll and put in in the windows system folder
> (idiotic in
> > this day) along with a slew of other DLLs to add to the mess.
> The client machines are 'out of the box' and have no other software
> installed. 

You didn't mix up 64-bit and 32-bit dlls accidentally?

Joost

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


Re: [Lazarus] Inactive Dataset

2008-05-29 Thread Joost van der Sluis
Op donderdag 29-05-2008 om 10:21 uur [tijdzone +0200], schreef Dave
Coventry:
> 
> Next step, removed the Reference in the Datasource property of the
> SQLQuery. It Works! 

Duh.

That sounds logical. And I do aggree that this is very confusing. I
already wanted to change that, but it's Delphi compatibility

But maybe we can do something about that error message. Maybe we can
detect this problem somewhat better

Joost

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


Re: [Lazarus] SQLQuery1: Field not Found: "enquiryreferencenumber"

2008-05-28 Thread Joost van der Sluis
Op woensdag 28-05-2008 om 06:02 uur [tijdzone +0200], schreef Dave
Coventry:
> Hi.
> 
> Following Damien's instructions I have DROPped my original table and
> created a new one in it's place:
> 
> CREATE table registration (
> fname char(50),
> sname char(50),
> enquiryreferencenumber INT4 PRIMARY KEY DEFAULT nextval('reg_seq'))
> WITHOUT OIDS;
> 
> I have run my INSERT Query under PQConnection1 using the following arguments:
> 
>   sqlq:='INSERT INTO registration (fname,sname) ';
>   sqlq:=sqlq+'VALUES
> ('''+FName.Text+''','''+SName.Text+''')RETURNING
> enquiryreferencenumber;';
>   PQConnection1.Connected:=True;
>   PQConnection1.ExecuteDirect('Begin Work;');
>   PQConnection1.ExecuteDirect(sqlq);
>   PQConnection1.ExecuteDirect('Commit Work;');
>   PQConnection1.Connected:=False;
> 
> Then I have attempted to retrieve the enquiryreferencenumber using
> SQLQuery1 as follows:
>   SQLQuery1.SQL.Text:='SELECT enquiryreferencenumber FROM
> registration WHERE fname='''+fname.Text+''' AND
> sname='''+sname.Text+'''ORDER BY enquiryreferencenumber DESC LIMIT
> 1;';
>   SQLQuery1.Open;
>   
> enquiryreferencenumber.Text:=SQLQuery1.FieldByName('enquiryreferencenumber').AsString;
>   SQLQuery1.Close;
> 
> This gives me the following error:
>  SQLQuery1: Field not Found: "enquiryreferencenumber"
> 
> Can anyone help?

No idea. But you could try to set the fieldname between double-quotes
(") But that should only be an issue when you also did that while you
created the database.

You could also try SQLQuery1.Fields[0].AsString; as you did in your
first example.

And which version of fpc are you using? It could be a releaf if you use
a recent 2.2.1 snapshot.

Joost.

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


Re: [Lazarus] Connecting to a Postgres Database

2008-05-25 Thread Joost van der Sluis
Op zondag 25-05-2008 om 17:54 uur [tijdzone +0200], schreef Dave
Coventry:
> I don't HAVE a windows postgres installation.

Then you can't use postgres on that machine. 

> Why are they needed, anyway? I don't see any mention of their
> requirement in the wiki(s).

"I need to read this word-document. And now someone tells me to install
'Microsoft Word'. That's bull, it must be something else. Why do I need
Word, anyway?"

> I'm not actually convinced that this is the problem; how do I test to
> see if the Ubuntu server is allowing Postgres transactions?

If the error says: the postgres-client is not installed, you doubt that
that is the problem?!?

If you want to test if your ubuntu-server to allow postgres-connections,
you can do that with the 'psql' utility. If you want to know where you
can find it: it's part of the postgresql-client. You know, that
application that you don't need. 

> Many thanks,

Sorry, coudn't resist.

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


Re: [Lazarus] [LAZARUS] Tsqlquery

2008-05-25 Thread Joost van der Sluis
Op vrijdag 23-05-2008 om 23:50 uur [tijdzone +0200], schreef Chris37:
> Hi,
> 
> I would like to know read a rows number after an update or delete with 
> TSqlquery and Oracle Connection
> They are not a property rowsaffected !
> 
> Are you an idea please ?

There is a property rowsaffected, but only for fpc > 2.2.0. Thus at this
moment only in the development-versions.

But I think that this property doesn't work with Oracle (yet). But
you'll have to check that.

Joost

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


Re: [Lazarus] Trouble with TIBConnection and Numeric (N,6) fields.

2008-05-25 Thread Joost van der Sluis
Op vrijdag 23-05-2008 om 11:17 uur [tijdzone +0200], schreef Gerard N/A:
> Hi all,
> 
> I've got a problem acessing a Firebird DB (2.0) with TIBConnection + 
> TSQLQuery.
> I get 'Unkonwn field type ' when opening querys wich do
> selects to tables having NUMERIC fields with 6 decimals.
> 
> Any idea on how to fix this?

Yes, implement TFmtBCDField. At this moment, fpc doesn't support decimal
fields with more then 4 decimals. 

Joost.

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


Re: [Lazarus] Crash on clicking on TFPWebModule (designer)

2008-05-21 Thread Joost van der Sluis
Op dinsdag 20-05-2008 om 19:09 uur [tijdzone +0200], schreef Mattias
Gaertner:
> On Tue, 20 May 2008 18:11:42 +0200
> Joost van der Sluis <[EMAIL PROTECTED]> wrote:
> 
> > Hi All,
> > 
> > I have a program with a TFPWebModule with lot of components on it.
> > When I open the project, and click on an empty space on the
> > TFPWebModule, I get a SIGSEGV with the backtrace below. This did work
> > in the past and I have no idea how to fix it. Maybe that someone can
> > find it with this backtrace?
> 
> Probably the TCustomFPWebModule.OnGetAction property.
> I need an example to fix this.

I've added assigend() statements to the OnGetAction-functions. But this
doesn't seems to help. 

I already have this problem when I do 'new -> CGI Application' and then
click on the TFPWebModule. (You'll need thw WebLaz package, offcourse)
But it could be that it has something to do with my local changes, I
have quite a lot of them...

Joost


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


[Lazarus] BT of AV while exiting Lazarus

2008-05-20 Thread Joost van der Sluis
Hi all,

After the problem with a TFPWebModule (see other mail), I can not close
the IDE anymore. I get a combobox with the message 'Access violation'. 

Maybe that someone can do something with this bt? (latest trunk, Lazarus
and fpc)

Program received signal SIGSEGV, Segmentation fault.
0x00aff7fb in SEARCH (ANUNITINFO=0x2aaab04fa1e0, 
ACOMPONENT=0x2aaab000dc40, parentfp=0x7fffa7185c20)
at project.pp:3658
3658if (PropInfo^.PropType^.Kind=tkClass) then begin
(gdb) bt
#0  0x00aff7fb in SEARCH (ANUNITINFO=0x2aaab04fa1e0, 
ACOMPONENT=0x2aaab000dc40, parentfp=0x7fffa7185c20)
at project.pp:3658
#1  0x00aff50c in UPDATEUNITCOMPONENTDEPENDENCIES (
this=0x2aaab04e2040) at project.pp:3736
#2  0x006cd85f in UNITCOMPONENTISUSED (
UNITCOMPONENTISUSED=false, ANUNITINFO=0x2aaab04fa1e0, 
CHECKHASDESIGNER=false, this=0x2f7c2200) at main.pp:6269
#3  0x006cd31d in CLOSEUNITCOMPONENT (CLOSEUNITCOMPONENT=264, 
ANUNITINFO=0x2aaab04fa1e0, FLAGS=0, this=0x2f7c2200)
at main.pp:6158
#4  0x006d0f8b in DOCLOSEEDITORFILE (DOCLOSEEDITORFILE=2, 
PAGEINDEX=3, FLAGS=4, this=0x2f7c2200) at main.pp:7145
#5  0x006d596b in DOCLOSEPROJECT (DOCLOSEPROJECT=1, 
this=0x2f7c2200) at main.pp:8276
#6  0x006b7cc7 in MAINIDEFORMCLOSEQUERY (SENDER=0x2f7c2200, 
[EMAIL PROTECTED], this=0x2f7c2200) at main.pp:1498
#7  0x006d909d in QUITIDE (QUITIDE=false, this=0x2f7c2200)
at main.pp:9011
#8  0x006bfc99 in MNUQUITCLICKED (SENDER=0x2b703b00, 
this=0x2f7c2200) at main.pp:3140
#9  0x00ac01ac in MENUITEMCLICK (SENDER=0x2b73cb20, 
this=0x2b703b00) at menuintf.pas:525
---Type  to continue, or q  to quit---
#10 0x00ac3b21 in MENUITEMCLICK (SENDER=0x2b73cb20, 
this=0x2b703b00) at menuintf.pas:1500
#11 0x007b367a in CLICK (this=0x2b73cb20)
at include/menuitem.inc:74
#12 0x007b3e80 in DOCLICKED ([EMAIL PROTECTED], 
this=0x2b73cb20) at include/menuitem.inc:261
#13 0x0068301c in SYSTEM_TOBJECT_$__DISPATCH$formal ()
#14 0x007b3e50 in ?? () at include/mainmenu.inc:27
#15 0x2b73cb20 in ?? ()
#16 0x01225b70 in _$MENUS$_Ld45 ()
#17 0x0001 in ?? ()
#18 0x0006 in ?? ()
#19 0x7fffa7186288 in ?? ()
#20 0x2b73cb20 in ?? ()
#21 0x2b73b020 in ?? ()
#22 0x017dd440 in ?? ()
#23 0x7fffa7186320 in ?? ()
#24 0x017dd440 in ?? ()
#25 0x in ?? ()


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


[Lazarus] Crash on clicking on TFPWebModule (designer)

2008-05-20 Thread Joost van der Sluis
Hi All,

I have a program with a TFPWebModule with lot of components on it. When
I open the project, and click on an empty space on the TFPWebModule, I
get a SIGSEGV with the backtrace below. This did work in the past and I
have no idea how to fix it. Maybe that someone can find it with this
backtrace?

Joost.

GetAdjustment 01850510=LCLWinapiWidget [FPr]
LCLObject=2FD4B5B0=ComponentTree:TComponentTreeView
GetAdjustment 01850690=LCLWinapiWidget [FPr]
LCLObject=2FD4BD70=Splitter1:TSplitter
GetAdjustment 01850AA0=LCLWinapiWidget [FPr]
LCLObject=2FD667B0=PropertyGrid:TOICustomPropertyGrid
GetAdjustment 01850BF0=LCLWinapiWidget [FPr]
LCLObject=2FF30170=EventGrid:TOICustomPropertyGrid
GetAdjustment 01850FB0=LCLWinapiWidget [FPr]
LCLObject=2FF31D30=FavouriteGrid:TOICustomPropertyGrid
GetAdjustment 018703F0=LCLWinapiWidget [FPr]
LCLObject=2FF338F0=RestrictedGrid:TOICustomPropertyGrid
GetAdjustment 01871C00=LCLWinapiWidget [FStPr]
LCLObject=2AAAB04766B0=MessageTreeView:TTreeView

Program received signal SIGSEGV, Segmentation fault.
0x in ?? ()
(gdb) bt
#0  0x in ?? ()
#1  0x009c28cf in LAZGETMETHODPROP (LAZGETMETHODPROP={CODE =
0x0, DATA = 0x0}, INSTANCE=0x2aaab000dc40, PROPINFO=0x1648cdf)
at propedits.pp:2163
#2  0x009c292b in GETMETHODVALUEAT (GETMETHODVALUEAT={CODE =
0x7fffb69afbb8, DATA = 0x2f7c2200}, INDEX=0, this=0x2aaab00d47c0)
at propedits.pp:2170
#3  0x009c2792 in GETMETHODVALUE (GETMETHODVALUE={CODE = 0x0,
DATA = 0x2fd71e40}, this=0x2aaab00d47c0) at propedits.pp:2129
#4  0x009c90e3 in GETVALUE ([EMAIL PROTECTED],
this=0x2aaab00d47c0, [EMAIL PROTECTED]) at propedits.pp:3913
#5  0x009c33f0 in GETVISUALVALUE
([EMAIL PROTECTED], this=0x2aaab00d47c0,
[EMAIL PROTECTED]) at propedits.pp:2313
#6  0x0098993b in DOPAINT (PAINTONLYCHANGEDVALUES=true,
this=0x2ff338f0) at objectinspector.pp:2394
#7  0x00989a01 in REFRESHPROPERTYVALUES (this=0x2ff338f0) at
objectinspector.pp:2409
#8  0x00990039 in REFRESHPROPERTYVALUES (this=0x2f7b8bd0) at
objectinspector.pp:3562
#9  0x006e31cb in ONCONTROLSELECTIONPROPSCHANGED
(SENDER=0x2fd1f900, this=0x2f7c2200) at main.pp:11341
#10 0x00b52579 in DOCHANGEPROPERTIES (this=0x2fd1f900)
at ../designer/controlselection.pp:1800
#11 0x00b5013c in UPDATEREALBOUNDS (this=0x2fd1f900)
at ../designer/controlselection.pp:1161
#12 0x00b4f86e in UPDATEBOUNDS (this=0x2fd1f900)
at ../designer/controlselection.pp:1004
#13 0x00b3f13c in MOUSEDOWNONCONTROL (SENDER=0x2aaab0773990,
[EMAIL PROTECTED], this=0x2aaab00140e0)
at ../designer/designer.pp:1375
#14 0x00b41173 in ISDESIGNMSG (ISDESIGNMSG=true,
SENDER=0x2aaab0773990, [EMAIL PROTECTED], this=0x2aaab00140e0)
at ../designer/designer.pp:1993
#15 0x007d30bf in WNDPROC ([EMAIL PROTECTED],
this=0x2aaab0773990) at include/control.inc:1502
#16 0x007c8de0 in WNDPROC ([EMAIL PROTECTED],
this=0x2aaab0773990) at include/wincontrol.inc:4715
#17 0x00699460 in WNDPROC ([EMAIL PROTECTED],
this=0x2aaab0773990) at include/customform.inc:947
#18 0x008b0550 in DELIVERMESSAGE (DELIVERMESSAGE=6898974,
TARGET=0x2aaab0773990, [EMAIL PROTECTED]) at gtkproc.inc:3605
#19 0x008bc8f9 in DELIVERMOUSEDOWNMESSAGE (WIDGET=0x19fe320,
EVENT=0x17cd070, AWINCONTROL=0x2aaab0773990) at gtkcallback.inc:1409
#20 0x008bcdfc in GTKMOUSEBTNPRESS (GTKMOUSEBTNPRESS=false,
WIDGET=0x19fe320, EVENT=0x17cd070, DATA=0x2aaab0773990)
at gtkcallback.inc:1522
#21 0x2afdffce in gtk_marshal_BOOL__POINTER ()
from /usr/lib64/libgtk-1.2.so.0
#22 0x2b00f8a7 in ?? () from /usr/lib64/libgtk-1.2.so.0
#23 0x2b011f28 in ?? () from /usr/lib64/libgtk-1.2.so.0
#24 0x2b01267b in gtk_signal_emit ()
from /usr/lib64/libgtk-1.2.so.0
#25 0x2b0486c8 in gtk_widget_event ()
from /usr/lib64/libgtk-1.2.so.0
#26 0x2afde540 in gtk_propagate_event ()
from /usr/lib64/libgtk-1.2.so.0
#27 0x2afdf2e2 in gtk_main_do_event ()
from /usr/lib64/libgtk-1.2.so.0
#28 0x2ad13a5d in ?? () from /usr/lib64/libgdk-1.2.so.0
#29 0x2aae1baa in ?? () from /usr/lib64/libglib-1.2.so.0
---Type  to continue, or q  to quit---
#30 0x2aae2345 in ?? () from /usr/lib64/libglib-1.2.so.0
#31 0x2afdf54c in gtk_main_iteration_do ()
from /usr/lib64/libgtk-1.2.so.0
#32 0x0088435e in APPPROCESSMESSAGES (this=0x2b736160) at
gtkwidgetset.inc:1162
#33 0x006a1641 in HANDLEMESSAGE (this=0x2b6bf1d0) at
include/application.inc:975
#34 0x006a1a12 in RUNLOOP (this=0x2b6bf1d0) at
include/application.inc:1086
#35 0x006fa3a8 in APPRUN (ALOOP={Proc = {procedure (^pointer)}
0x7fffb69b0ca0, Self = 0x2b6bf1d0}, this=0x2b736160)
at include/interfacebase.inc:49
#36 0x006a19b4 in RUN

  1   2   >