Re: [lazarus] New help doc format?

2006-05-12 Thread Michael Van Canneyt


On Thu, 11 May 2006, Luiz Americo wrote:

 Michael Van Canneyt escreveu:
   sqlite is good candidate too (multiplatform,single file,fast, only
   one
   dll/so required)
   
  
  Sorry, but no:
  - No external dependencies, please.
  - Specifically: sqlite is a horrible database for use in Pascal.
  
 Based in what you say that?

Based on extensive tests which I did and which I published in a German 
magazine.

 In fact the TDataset descendant  has better performance (see
 http://www.geocities.com/camara_luiz/sqlite4fpc/benchmarks.html) than sqldb
 (Mysql,Postgresql, firebird). This is so true that recently the sqldb internal
 data handling schema was changed borrowing some ideas from
 TCustomSqliteDataset. Of course, you are invited to try to replicate the
 benchmarks and/or post new benchmarks (with the sources) you did.


It has nothing to do with TDataset. I did tests based on direct API calls.

 
 It also has some extra features like Master/Detail, Lookup,Locate, LocateNext,
 Auto Increment.
 
 Any way you can use sqlite using the plain interface (sqlite, sqlite3 units)
 that directly call the sqlite dll. Exactly how a C program does. So the
 problem is not the pascal language or implementation.

This is what I did.

  And very slow for complex queries, in general.
  
 Again, post benchmarks/tests.

See the German Toolbox issues 1,2 and 3 of this year.

 Notice that to keep code small the sqlite SQL optimizer only handles the
 common queries and let the corner cases to hand optimizations.

I find
SELECT 
  COUNT(PU_ID) 
FROM 
  PUPIL 
  LEFT JOIN PUPILTRACK ON (PT_PUPIL_FK=PU_ID) 
WHERE
  (PT_DATE='2005-09-06') AND (PT_CODE='I')  AND (PT_TIME='08:28:00');

A VERY simple query and the result is a factor 180 worse than 
Firebird or MySQL.
Some timings;

  sqlite firebird  Mysql

1 0:0:42.00 0:1:29.47 0:40.48
2 0:6:12.75 0:0:02.58 0:02.40
3 0:0:00.67 0:0:00.44 0:02.43
4 0:5:59.38 0:0:00.48 0:02.44

1. is the insert of 600.000 records. Here SQLIte is very fast.
The rest are selects like the one above.

I did more tests, all give comparable results: sqlite is very 
fast for simple stuff.

And yes, I did all possible optimizations. Version 3 was used.
I have a lot of experience with databases of all kinds, and I 
know what to test for.

 
 Finishing, sqlite is not for all uses neither mysql, postgres. See
 http://www.sqlite.org/whentouse.html.

Look, I know that SQLite is popular, but it's simply not suitable for 
enterprise-use 
nor for complex queries. Furthermore a database which says that 'we don't do 
typechecking' is completely on the wrong track, even more so in a Pascal 
environment. And this is the conclusion of my articles...

Michael.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Lazarus Help System Requirements

2006-05-12 Thread Graeme Geldenhuys

On 12/05/06, Felipe Monteiro de Carvalho
[EMAIL PROTECTED] wrote:

Hello,

On 5/11/06, Alexandre Leclerc [EMAIL PROTECTED] wrote:
 Yes, odt files  al. are open format. And as of 1 may 2006 it is now
 an official ISO 26300 approved format (as other format like PDF and
 HTML who are also ISO approved).

Ok, Open Document is good, but it has some problems:

1 - We cannot just get dependent on Open Office. It´s a huge
dependency, and won´t work on wince for example.

2 - Whatever the format is, I would like to be able to write my own
viewer for it. It may be very hard to write a viewer for odt. For
viewing HTML (or HTML extracted from a CHM or CHM-Like file) there is
a lot of stuff ready.

thanks,
--
Felipe Monteiro de Carvalho



I think OpenOffice 2.x has some excellent ideas in there help system.
I found a
110 page pdf document explaining the internal workings of the help system.
[ http://documentation.openoffice.org/online_help/index.html ]
There is even a Import/Export filter for OpenOffice to generate the
help file format, so you can author your help in OpenOffice (and get
spellcheck and formatting for free).

I'm still busy reading the document, so ain't sure what exact format
they use inside the *.jar files (html, straight xml or odt ...) and
what viewer they use for the help.  They do use the Berkeley Database
for indexes, keywork search and extended tooltips.

I would suggest some of you read that PDF as well so we can extract
all good ideas.


Regards,
 - Graeme -


--
There's no place like 127.0.0.1

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Lazarus Help System Requirements

2006-05-12 Thread Micha Nelissen

Graeme Geldenhuys wrote:

they use inside the *.jar files (html, straight xml or odt ...) and
what viewer they use for the help.  They do use the Berkeley Database
for indexes, keywork search and extended tooltips.


Berkeley DB ? Sorry, but that rings alarm bells over here ... all 
projects I've heard using it have corruption from time to time :-(.


Micha

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Lazarus Help System Requirements

2006-05-12 Thread Bogusław Brandys

Micha Nelissen wrote:

Graeme Geldenhuys wrote:

they use inside the *.jar files (html, straight xml or odt ...) and
what viewer they use for the help.  They do use the Berkeley Database
for indexes, keywork search and extended tooltips.


Berkeley DB ? Sorry, but that rings alarm bells over here ... all 
projects I've heard using it have corruption from time to time :-(.


Micha



Huh! So Berkeley DB is good but using sqlite (public domain) is 
forbidden ? Anyway it's still external tool.



Regards
Boguslaw

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Lazarus Help System Requirements

2006-05-12 Thread Graeme Geldenhuys

On 12/05/06, Micha Nelissen [EMAIL PROTECTED] wrote:

Graeme Geldenhuys wrote:
 they use inside the *.jar files (html, straight xml or odt ...) and
 what viewer they use for the help.  They do use the Berkeley Database
 for indexes, keywork search and extended tooltips.

Berkeley DB ? Sorry, but that rings alarm bells over here ... all
projects I've heard using it have corruption from time to time :-(.


I do not know much of the Berkeley DB, except that GNU/Linux uses it a
lot, so it can't be that bad.  Also, I just stated what OOo uses.  It
is up to us to decide what is best for our help system.

Regards,
 - Graeme -


--
There's no place like 127.0.0.1

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Help Framework proposal

2006-05-12 Thread Graeme Geldenhuys

I don't like the Help Component idea.  I think adding methods to the
TApplication is better.

I am not sure if you are familiar with the Kylix Help system (more
correctly a CLX help system as it works under Windows too).  It uses a
bunch of Interfaces (IHelpSystem, ICustomHelpViewer,
IExtendedHelpViewer, etc...) to implement the help and works really
well and it is very easy to extend with different help
systems/viewers.  Borland created two help viewers for Kylix.  A Man
Page viewer and a Hyper Help viewer.  J.G.Software created a simple
HTML Help viewer based on the QTextBrowser component.

Kylix 1 HelpIntfs.pas   =  http://tinyurl.com/fesp8
J.G.Software HTML help viewer =  http://www.helpscribble.com/linux.html
BDN Article HTML help viewer  =  http://tinyurl.com/og8nj

Regards,
 - Graeme -


On 12/05/06, Felipe Monteiro de Carvalho
[EMAIL PROTECTED] wrote:

Hello,

We had some talks about file formats for the help system, but I´m
still uncertain how the framework will actually work, so I gathered
some information and ideas here.

My idea is to develop a help system agnostic framework, so the
software does the same calls to display help independently of the file
type.

The idea is quite simple. Just add some Delphi help methods to
TApplication, like:

function HelpContext(Context: Integer): Boolean;
function HelpCommand(Command: Word; Data: Longint): Boolean;
property HelpFile: string;
function HelpJump(const JumpID: string): Boolean;

The developer will use this functions (and only them) to access the
underlying help engine.

But only implement them as calls to a object set by a property, like:

TApplication.HelpEngine: THelpEngine;

This would be like a DataSet in the sence that on the startup of your
application you set that property to the HelpEngine of your
preference, be it CHM, CHM-like, sqlite, or whatever.

So now people can develop their engines. One of the engines could be
WinHelp, and that one would be compatible with Delphi =)

The default could be empty help (nil), and engines are on their own
units, so filesize is preserved =)

Another option is not to have this on TApplication, but rather on a
component you can drop on the form. Then you can link that to other
components that are the help engines.

I also have some doubts:

* The Help context is a integer on Delphi. Is this good enougth? Or
some help systems would we rather have a string for help context?

Also contribute your own ideas for a framework =)

Ah, and remember this is specifically targeted for apps created on
Lazarus, not particularly for the IDE Help.

thanks,
--
Felipe Monteiro de Carvalho

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives




--
There's no place like 127.0.0.1

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Lazarus Help System Requirements

2006-05-12 Thread Michael Van Canneyt



On Fri, 12 May 2006, Bogusaw Brandys wrote:


Micha Nelissen wrote:

Graeme Geldenhuys wrote:

they use inside the *.jar files (html, straight xml or odt ...) and
what viewer they use for the help.  They do use the Berkeley Database
for indexes, keywork search and extended tooltips.


Berkeley DB ? Sorry, but that rings alarm bells over here ... all projects 
I've heard using it have corruption from time to time :-(.


Micha



Huh! So Berkeley DB is good but using sqlite (public domain) is forbidden ? 
Anyway it's still external tool.


No-one is suggesting to use Berkeley DB yet. Graeme is studying the 
format openoffice uses, that's all. It may wel be that Graeme decides

it's too difficult to use...

In the worst case, Berkeley DB is a documented file format,
So you can write pascal code to read/write it, and other people
can use the native API.

The point is that we'd like a 100% OOP solution.

Michael.

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Where is code completion function?

2006-05-12 Thread Mattias Gaertner
On Thu, 11 May 2006 20:35:19 -0400
Alexandre Leclerc [EMAIL PROTECTED] wrote:

 2006/5/11, Mattias Gaertner [EMAIL PROTECTED]:
  Right. It works only with code macros enabled.
  If you want to fix it: ide/codemacroprompt.pas ExecuteCodeTemplate
 
 Yep, I see in the code that the problem is not there. I feel the
 pattern is trimmed before it reaches this funciton. But i can't find
 where the function is called at all. The Windows find in file crap
 finds nothing.

Find in files works here. Since this week you can press F1 to get help for
this dialog.
It's a wiki, so please extend it.

 
 Any pointer from where the code is actually called and where the
 patern is loaded?

Use find in files to search for ExecuteCodeTemplate: uniteditor.pp (3026,3)

 
 There is also another problem: If I add the macro flag in a pattern
 $(EnableMakros), when I reload the patern in the patern editor, the
 macro flag is not showed any more... it is stripped (just as these
 functions are doing). So you have no choices to edit manually the .dci
 file to remove it.

The bug was in the loading function:
syneditautocomplete ParseCompletionList

Fixed.


Mattias

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Lazarus Help System Requirements

2006-05-12 Thread Marco Ciampa
On Thu, May 11, 2006 at 03:33:02PM +0200, Michael Van Canneyt wrote:
 I think the po2xml is just used to translate the program strings which 
 appear in the docs (used to refer to button captions etc), not for the actual 
 documentation text.
Wrong. It is used for documentation writing too as you can see here,
for the LinuxFromScratch manual:

http://www.mail-archive.com/lfs-dev@linuxfromscratch.org/msg06863.html

---
Hello,

ok, this is my third try to get a mail sent to this list...:

i got good news for all LFS translators.
Today i commited the patch below to the KDE repository.

This means for LFS translators: With upcoming versions of KDE (= 3.5.3)
you can use the KDE i18n tools po2xml and xml2pot (from package kdesdk)
again for translating the book. This was nearly impossible in the past because
those  tools extracted complete chapters and appendixes into a single, huge
msgid.

I hope this brings some translations back to the LFS community :)

Bye,
Thomas
---

 Changing 1 letter in the documentation text would completely kill your 
 po2xml output, since it is based on textual search.
That is easily managed by the gettext update utility like msgmerge.

bye

-- 

Marco Ciampa

++
| Linux User  #78271 |
| FSFE fellow   #364 |
++

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Lazarus Help System Requirements

2006-05-12 Thread Michael Van Canneyt



On Fri, 12 May 2006, Marco Ciampa wrote:


On Thu, May 11, 2006 at 03:33:02PM +0200, Michael Van Canneyt wrote:

I think the po2xml is just used to translate the program strings which
appear in the docs (used to refer to button captions etc), not for the actual
documentation text.

Wrong. It is used for documentation writing too as you can see here,
for the LinuxFromScratch manual:

http://www.mail-archive.com/lfs-dev@linuxfromscratch.org/msg06863.html


In that case, I understand even less why they use it. In my opinion,
the .po format is totally unsuitable for this kind of thing.

Michael.

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Lazarus Help System Requirements

2006-05-12 Thread A.J. Venter
 Indeed, I think the idea would be a by-product just as a pdf in that
 case. A viewer would not be simple to do, but the format is simple.
 The file is actually a zip file with xml stuff files in it.
Indeed, OOo's file are quite easy to hack. It's zipped up xml - the reason it 
was chosen by the ODF as their standard is exactly that, not only is it fully 
publicly document - it is a non-binary format, and it will always be possible 
to write another unzip+xml-parsing routine. 

I wouldn't depend on OOo for reading at all - I think depending on it for 
editing help files is a minor, if anything it is a feature rather than  a bug 
as the writer is a very lovely interface for the task.
Just think a moment about what this could do - the IDE can generate the class 
description as an OOo template - the programmer fires up OOo, opens the 
template and writes the complete doc, saves the odt and done. 

A bigger factor IMHO is that OOo has way too many features, if we don't use 
writer as our viewer then we need to code a viewer to display writer files 
and it will almost by default lose formatting because nobody here feels like 
cloning the entire OOo codebase (sorry - I don't contribute to java projects 
as a matter of principle :p )
A.J.
-- 
80% Of a hardware engineer's job is application of the uncertainty principle.
80% of a software engineer's job is pretending this isn't so.
A.J. Venter
Chief Software Architect
OpenLab International
http://www.getopenlab.com   | +27 82 726 5103 (South Africa)
http://www.silentcoder.co.za| +55 118 162 2079 (Brazil)

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Lazarus Help System Requirements

2006-05-12 Thread Graeme Geldenhuys

On 12/05/06, Micha Nelissen [EMAIL PROTECTED] wrote:

Graeme Geldenhuys wrote:
 I think this is quite a elegant solution for application help and can
 even be applied to the LCL and FCL documentation which is currently
 stored in XML.

Sure there are a lot of elegant solutions, but who is going to write it
? Let's be realistic here. For CHM we already have a decoder and viewer,


I started with a prototype already... well more like putting some ideas to code.
A good help framework in the LCL is also important. Felipe mentioned
some ideas, and Mattias has implemented something already for Lazarus,
so I need to look at that as well, so see how flexible it is.  Can you
used that for applications written with Lazarus, or was that for
Lazarus alone.



for the .jar way we need multiple decoders and translators AFAICS (jar,
xhp, css, xslt, more?) still to be implemented. Again, if anyone wants


* xhp is just XML and as for an example, LCL and FPC help already
comes in xml format.
* css can be added at a later stage, or a very basic style sheet could
be added for a start. All of 5 minutes work.
* xslt might take a bit longer, but looking at what fpdoc does to
convert the XML to HTML (as it currently does) should give a good
starting point.  Also, I will be taking a look at what OOo did, and
maybe just massage their Translation Style Sheet to fit our needs.
* As for the HTML viewer component?  Any suggestions? Do any support basic CSS?



to write all this, nothing is stopping you, but CHM seems like a faster
 more productive route ATM, if the coder doesn't care anyway.


Brings me back to the same old question everybody seems to avoid
answering.  May we use the CHM format - is it proprietary/patented by
Microsoft?

Regards,
 - Graeme -


--
There's no place like 127.0.0.1

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Lazarus Help System Requirements

2006-05-12 Thread Micha Nelissen

Graeme Geldenhuys wrote:

to write all this, nothing is stopping you, but CHM seems like a faster
 more productive route ATM, if the coder doesn't care anyway.


Brings me back to the same old question everybody seems to avoid
answering.  May we use the CHM format - is it proprietary/patented by
Microsoft?


Depends on where you are obviously :-). AFAIK, it can't be here in 
Europe. Besides, a file format is just a file format, there is no 
invention in a format, it's just a choice.


Micha

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] SSE bug

2006-05-12 Thread S0vNarK0m


Hi all, somebody can say something about
http://www.freepascal.org/bugs/showrec.php3?ID=5073

BR.

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Lazarus Help System Requirements

2006-05-12 Thread Marco Ciampa
On Fri, May 12, 2006 at 11:23:23AM +0200, Michael Van Canneyt wrote:
 On Fri, 12 May 2006, Marco Ciampa wrote:
 On Thu, May 11, 2006 at 03:33:02PM +0200, Michael Van Canneyt wrote:
 I think the po2xml is just used to translate the program strings which
 appear in the docs (used to refer to button captions etc), not for the 
 actual
 documentation text.
 Wrong. It is used for documentation writing too as you can see here,
 for the LinuxFromScratch manual:
 
 http://www.mail-archive.com/lfs-dev@linuxfromscratch.org/msg06863.html
 
 In that case, I understand even less why they use it. In my opinion,
 the .po format is totally unsuitable for this kind of thing.
Sorry, I do not understand and I really want to see your point.
Could you please tell me why you consider .po files not suitable for the
job?
I do not know of some other tool able to manage the update problem of a
multilingual translation as the gettext tool. May be I'm wrong but I
think that such a tool simply does not exist!

-- 

Marco Ciampa

++
| Linux User  #78271 |
| FSFE fellow   #364 |
++

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Lazarus Help System Requirements

2006-05-12 Thread Michael Van Canneyt



On Fri, 12 May 2006, Marco Ciampa wrote:


On Fri, May 12, 2006 at 11:23:23AM +0200, Michael Van Canneyt wrote:

On Fri, 12 May 2006, Marco Ciampa wrote:

On Thu, May 11, 2006 at 03:33:02PM +0200, Michael Van Canneyt wrote:

I think the po2xml is just used to translate the program strings which
appear in the docs (used to refer to button captions etc), not for the
actual
documentation text.

Wrong. It is used for documentation writing too as you can see here,
for the LinuxFromScratch manual:

http://www.mail-archive.com/lfs-dev@linuxfromscratch.org/msg06863.html


In that case, I understand even less why they use it. In my opinion,
the .po format is totally unsuitable for this kind of thing.

Sorry, I do not understand and I really want to see your point.
Could you please tell me why you consider .po files not suitable for the
job?
I do not know of some other tool able to manage the update problem of a
multilingual translation as the gettext tool. May be I'm wrong but I
think that such a tool simply does not exist!


.po files are designed/meant for captions, short one-line descriptions to be
displayed in a program, produced by gettext from sources.
Gettext uses a very inefficient algorithm for translation: it searches
in the .po (or .mo) file for the original text, and then returns the
translated text. You can't get more inefficient than that.

Conclusion:
The .po format is not designed/meant for large pieces of continuous text.

I agree with you that a good tool for translations does not exist.
The question is whether such a tool should exist. A simple diff
(with nice gui) in any text editor can help you in keeping your
translation up to date just as much...
There is no need to use a .po file format for this.

How would you translate a document written in Latex, or Ms-Word or
OpenOffice Writer? There are no good tools for this, and I don't
believe it's possible to write such a tool other than some visual
aid for detecting differences...

For example:
The fpdoc format is much more suitable for translation, because all
pieces of text are identified with unique names. It would be much more
easy to write a translator program for that.

Michael.

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Lazarus Help System Requirements

2006-05-12 Thread Marco Ciampa
On Fri, May 12, 2006 at 12:01:39PM +0200, Micha Nelissen wrote:
 Graeme Geldenhuys wrote:
 to write all this, nothing is stopping you, but CHM seems like a faster
  more productive route ATM, if the coder doesn't care anyway.
 
 Brings me back to the same old question everybody seems to avoid
 answering.  May we use the CHM format - is it proprietary/patented by
 Microsoft?
 
 Depends on where you are obviously :-). AFAIK, it can't be here in 
 Europe. 
Now. Perhaps not forever.

Besides, a file format is just a file format, there is no 
 invention in a format, it's just a choice.
Yes but M$ patented his xml file formats...ok again not in Europe but
...better prevent than cure!


-- 

Marco Ciampa

++
| Linux User  #78271 |
| FSFE fellow   #364 |
++

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] New help doc format?

2006-05-12 Thread Andrew Haines

George Lober wrote:



The code in /components/chmhelp looks like it's either GPL or LGPL. 
For code that would need to be used in target application, could  
these be changed to the Modified LGPL?  Also the license headers refer 
to  COPYING.LCL  which I can't find anywhere ??



The chm viewer itself is GPL but all of the units it uses (chmbase, 
chmreader etc) are under the modified LGPL. In SVN the files say 
COPYING.modifiedLGPL now.


There is a package you can use in your programs to control the help 
viewer, that package is subject to the modified LGPL so that your 
program can be any license


Andrew

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Postgres connection question

2006-05-12 Thread Alex du Plessis
How does one access the error messages from a postgres database when 
using the sqldb components (i.e. TPQConnection, TSQLTransaction and 
TSQLQuery)?


_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] New help doc format?

2006-05-12 Thread Luiz Americo

Michael Van Canneyt escreveu:

On Thu, 11 May 2006, Luiz Americo wrote:

  

Michael Van Canneyt escreveu:


sqlite is good candidate too (multiplatform,single file,fast, only
one
dll/so required)



Sorry, but no:
- No external dependencies, please.
- Specifically: sqlite is a horrible database for use in Pascal.

  

Based in what you say that?



Based on extensive tests which I did and which I published in a German 
magazine.


  

In fact the TDataset descendant  has better performance (see
http://www.geocities.com/camara_luiz/sqlite4fpc/benchmarks.html) than sqldb
(Mysql,Postgresql, firebird). This is so true that recently the sqldb internal
data handling schema was changed borrowing some ideas from
TCustomSqliteDataset. Of course, you are invited to try to replicate the
benchmarks and/or post new benchmarks (with the sources) you did.




It has nothing to do with TDataset. I did tests based on direct API calls.

  

It also has some extra features like Master/Detail, Lookup,Locate, LocateNext,
Auto Increment.

Any way you can use sqlite using the plain interface (sqlite, sqlite3 units)
that directly call the sqlite dll. Exactly how a C program does. So the
problem is not the pascal language or implementation.



This is what I did.

  

And very slow for complex queries, in general.

  

Again, post benchmarks/tests.



See the German Toolbox issues 1,2 and 3 of this year.

  

Notice that to keep code small the sqlite SQL optimizer only handles the
common queries and let the corner cases to hand optimizations.



I find
SELECT 
  COUNT(PU_ID) 
FROM 
  PUPIL 
  LEFT JOIN PUPILTRACK ON (PT_PUPIL_FK=PU_ID) 
WHERE
  (PT_DATE='2005-09-06') AND (PT_CODE='I')  AND (PT_TIME='08:28:00');


A VERY simple query and the result is a factor 180 worse than 
Firebird or MySQL.

Some timings;

  sqlite firebird  Mysql

1 0:0:42.00 0:1:29.47 0:40.48
2 0:6:12.75 0:0:02.58 0:02.40
3 0:0:00.67 0:0:00.44 0:02.43
4 0:5:59.38 0:0:00.48 0:02.44

1. is the insert of 600.000 records. Here SQLIte is very fast.
The rest are selects like the one above.

I did more tests, all give comparable results: sqlite is very 
fast for simple stuff.
  
Your results are comparable from one made without index published in 
sqlite wiki, but when using index, according to the test, sqlite 
compares to the other.

See: http://www.sqlite.org/cvstrac/wiki?p=SpeedComparison

And yes, I did all possible optimizations. Version 3 was used.
I have a lot of experience with databases of all kinds, and I 
know what to test for.


  
Please post the database schema, no of records, indexes, so i can 
reproduce and publish in a site. As i said, sqlite requires some hand 
SQL optimizations. You can see here:

http://www.sqlite.org/cvstrac/wiki?p=PerformanceTuning
http://web.utk.edu/~jplyon/sqlite/SQLite_optimization_FAQ.html

If you're using Windows take read this 
http://www.sqlite.org/cvstrac/wiki?p=PerformanceTuningWindows.

Specially the last topic.

Finishing, sqlite is not for all uses neither mysql, postgres. See
http://www.sqlite.org/whentouse.html.



Look, I know that SQLite is popular, but it's simply not suitable for enterprise-use 
nor for complex queries. Furthermore a database which says that 'we don't do 
typechecking' is completely on the wrong track, even more so in a Pascal 
environment. And this is the conclusion of my articles...
  

As i said above

Luiz

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] New help doc format?

2006-05-12 Thread Michael Van Canneyt



On Fri, 12 May 2006, Luiz Americo wrote:

I did more tests, all give comparable results: sqlite is very fast for 
simple stuff.


Your results are comparable from one made without index published in sqlite 
wiki, but when using index, according to the test, sqlite compares to the 
other.


Obviously, I have created the same indexes in all 3 databases.


See: http://www.sqlite.org/cvstrac/wiki?p=SpeedComparison

And yes, I did all possible optimizations. Version 3 was used.
I have a lot of experience with databases of all kinds, and I know what to 
test for.



Please post the database schema, no of records, indexes, so i can reproduce 
and publish in a site.


I'll send it in private if you want, but you don't have permission to publish 
it.
(my contract with the journal's editor forbids that)

As i said, sqlite requires some hand SQL 
optimizations. You can see here:

http://www.sqlite.org/cvstrac/wiki?p=PerformanceTuning
http://web.utk.edu/~jplyon/sqlite/SQLite_optimization_FAQ.html

If you're using Windows take read this


It was all on Linux.

Look, I appreciate the effort you are doing to promote sqlite, but as long
as they don't do type checking, it's out for me. The speed issue is of
secundary importance because at best you get similar results as the
other 2 databases.

Currently, I would order them as follows for use as _embedded_ databases,
taking into consideration ease of use and speed:

- Firebird is best: scores good in both areas.
- Then SQLite (ease of use: very good. Speed: YMMV...)
- Then MySQL (speed is very good, but ease of use: -infinity !)

I still need to test Advantage Database Server and NexusDB
(the former Turbopower's FlashFiler)

Michael.

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Where is code completion function?

2006-05-12 Thread Alexandre Leclerc

2006/5/12, Mattias Gaertner [EMAIL PROTECTED]:

On Thu, 11 May 2006 20:35:19 -0400
Alexandre Leclerc [EMAIL PROTECTED] wrote:

 2006/5/11, Mattias Gaertner [EMAIL PROTECTED]:
  Right. It works only with code macros enabled.
  If you want to fix it: ide/codemacroprompt.pas ExecuteCodeTemplate

 Yep, I see in the code that the problem is not there. I feel the
 pattern is trimmed before it reaches this funciton. But i can't find
 where the function is called at all. The Windows find in file crap
 finds nothing.

Find in files works here. Since this week you can press F1 to get help for
this dialog.
It's a wiki, so please extend it.


:) I was talking about the 'find in files' of microsoft file explorer.
This is why I was not so polite with it. I didn't know the feature was
in fpc.


 Any pointer from where the code is actually called and where the
 patern is loaded?

Use find in files to search for ExecuteCodeTemplate: uniteditor.pp (3026,3)


 There is also another problem: If I add the macro flag in a pattern
 $(EnableMakros), when I reload the patern in the patern editor, the
 macro flag is not showed any more... it is stripped (just as these
 functions are doing). So you have no choices to edit manually the .dci
 file to remove it.

The bug was in the loading function:
syneditautocomplete ParseCompletionList

Fixed.


Well, I did not had the pleasure to fix it, but it was a nice playing
arround in the code anyway. Thanks for the fix then.

--
Alexandre Leclerc

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] New help doc format?

2006-05-12 Thread Andrew Haines

Felipe Monteiro de Carvalho wrote:


On 5/11/06, Andrew Haines [EMAIL PROTECTED] wrote:


Sigh. :) Have a look in the components/chmhelp directory. In that
directory is a program written entirely in pascal that uses the LCL to
view chm files using the TurboPowerIpro HTML component and a package to
integrate that program in the IDE.



Are you trying to impress me? You did it.


For creating chms a project was started in c on savannah:
http://download.savannah.gnu.org/releases/hhm/
http://savannah.nongnu.org/projects/hhm

It currently can make a chm except it cannot write the special parts 
like the TOC and the Index which are mostly html files.


Andrew

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Lazarus Help System Requirements

2006-05-12 Thread Alexandre Leclerc

2006/5/12, A.J. Venter [EMAIL PROTECTED]:

 Indeed, I think the idea would be a by-product just as a pdf in that
 case. A viewer would not be simple to do, but the format is simple.
 The file is actually a zip file with xml stuff files in it.
Indeed, OOo's file are quite easy to hack. It's zipped up xml - the reason it
was chosen by the ODF as their standard is exactly that, not only is it fully
publicly document - it is a non-binary format, and it will always be possible
to write another unzip+xml-parsing routine.

I wouldn't depend on OOo for reading at all - I think depending on it for
editing help files is a minor, if anything it is a feature rather than  a bug
as the writer is a very lovely interface for the task.
Just think a moment about what this could do - the IDE can generate the class
description as an OOo template - the programmer fires up OOo, opens the
template and writes the complete doc, saves the odt and done.


Indeed; in another project we are planning to work with OOo document
to produce reports. It is just too simple. I know there is a 'python'
project for a odt file viewer.
(http://visioo-writer.tuxfamily.org/EN/index.html) Maybe there are
simple tricks to convert a document with xslt magic. I dont know.

We could indeed write the doc in a odt compatible editor (like Writer)
then we could use xslt stuff to export to other format if we want
(like HTML). All these features are included in OOo 2.


A bigger factor IMHO is that OOo has way too many features, if we don't use
writer as our viewer then we need to code a viewer to display writer files
and it will almost by default lose formatting because nobody here feels like
cloning the entire OOo codebase (sorry - I don't contribute to java projects
as a matter of principle :p )
A.J.


--
Alexandre Leclerc

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Help Framework proposal

2006-05-12 Thread Felipe Monteiro de Carvalho

On 5/12/06, Graeme Geldenhuys [EMAIL PROTECTED] wrote:

I am not sure if you are familiar with the Kylix Help system (more
correctly a CLX help system as it works under Windows too).  It uses a
bunch of Interfaces (IHelpSystem, ICustomHelpViewer,
IExtendedHelpViewer, etc...) to implement the help and works really
well and it is very easy to extend with different help
systems/viewers.


Ok, this system is surely much better =)

Now, should we be compatible with CLX system? If so, how do we procede
without breaking copyright? That .pas file is probably in a unsuitable
license for us, so it´s better not look in it too long.

Another thing, does CLX has a help property on all controls to easely
respond to F1 keypress? Would it be good for us to implement it?

thanks,
--
Felipe Monteiro de Carvalho

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Where is code completion function?

2006-05-12 Thread Felipe Monteiro de Carvalho

On 5/12/06, Alexandre Leclerc [EMAIL PROTECTED] wrote:

:) I was talking about the 'find in files' of microsoft file explorer.
This is why I was not so polite with it. I didn't know the feature was
in fpc.


There is a Find in Files dialog on Lazarus IDE. You will find it
very usefull =)

--
Felipe Monteiro de Carvalho

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: patch: encloseselectiondlg

2006-05-12 Thread Alexandre Leclerc

Who is maintaining the dialog?

2006/5/11, Alexandre Leclerc [EMAIL PROTECTED]:

Patch generated in source directory:
/lazarus/ide/

Description:
Small patch for better keyboard working:
- correct tab order
- correct default/cancel buttons


--
Alexandre Leclerc

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Code Explorer Improvements

2006-05-12 Thread Al Boldi

The Object Inspector currently syncs with the form editor as one traverses 
the tree, but the Code Explorer needs some help with this one liner:

procedure TCodeExplorerView.CodeTreeviewSelectionChanged(Sender: TObject);
begin
  JumpToSelection;
end;

This makes it sync with the source editor,  but what command is needed to 
make it sync with the object inspector?

Thanks!

--
Al

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Help Framework proposal

2006-05-12 Thread Felipe Monteiro de Carvalho

One more thing: Delphi uses a THelpType to choose which help system to
use, a number or a string to choose the topic. Is this useful to us? A
string could be transformed in a number and then we remove 2
properties. This looks like just backwords compatibility. But then we
could want to be compatible ...


THelpType indicates whether components invoke the help system using a
context ID or a keyword.

Unit

Classes

Delphi syntax:

type THelpType = (htKeyword, htContext);

C++ syntax:

enum THelpType {htKeyword, htContext};

Description

These are the possible values of the THelpType type:

Value   Meaning

htKeyword   Help topics are identified by a string. The HelpKeyword
property is used to identify help topics. This mechanism is available
for all help systems.
htContext   Help topics are identified by a context ID. The HelpContext
property is used to identify help topics. This mechanism is not
available for all help systems, but is typically faster for those
systems that support it.

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] filefind patch

2006-05-12 Thread barko
some changes in lpk for filefind  
(lazarus/examples/codepageconverter/filefind)


--
BARKO

bye,
...s]-[it happens...

filefind.diff.tar.gz
Description: GNU Zip compressed data


Re: [lazarus] Help Framework proposal

2006-05-12 Thread Graeme Geldenhuys

On 12/05/06, Felipe Monteiro de Carvalho
[EMAIL PROTECTED] wrote:

Now, should we be compatible with CLX system? If so, how do we procede
without breaking copyright? That .pas file is probably in a unsuitable
license for us, so it´s better not look in it too long.


We could use the principle of interfaces yes, but I don't think it
needs to be compatible with CLX.  Also the principle of what the
HelpManager does is a common feature I have learned years ago with OOP
and Design Patterns.  I use such a design pattern in a lot of my code.


Another thing, does CLX has a help property on all controls to easely
respond to F1 keypress? Would it be good for us to implement it?


Yes it does.  I don't have Kylix installed on this computer, but I do
remember it was the same as in VCL. You could select some or other
combo box in the Object Inspector to select between Keyword or Index
help.  Then there was some property that you could populate with what
ever value needs to be looked up in the help when F1 was pressed. eg:
a help ID.

Regards,
 Graeme


--
There's no place like 127.0.0.1

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Help Framework proposal

2006-05-12 Thread Graeme Geldenhuys

One more thing: Delphi uses a THelpType to choose which help system to
use, a number or a string to choose the topic. Is this useful to us? A


That's what I referred to in my previous post. Just couldn't remember
what they called it! :-)

Graeme.


--
There's no place like 127.0.0.1

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Lazarus Help System Parts

2006-05-12 Thread Mattias Gaertner

It seems the thread about 'help' can go on forever and probably many had
stopped reading all of it. This mail should define some tasks on the road to
a help for LCL applications:

1.
the LCL must be extended to recognize help queries (e.g. pressing F1)

1.1 The VCL handles winapi WM_HELP messages. I don't know if such a thing
exists under any other widgetset, but the I'm sure that the TWMHelp.HelpInfo
is quite winapi specific. The LCL should get a TControl.IntfXXX method to be
called by the interface instead.

1.2 The VCL TCustomForm has an event OnHelp: THelpEvent, which is called
with various contants and typecasts pointers from TApplication. I would
suggest to not support this and add instead a more OOP defined event.

2.
The LCL must delegate Help queries to the HelpSystem.
The HelpSystem of the VCL is defined in HelpIntfs and may be sufficient for
small things. But for the Open Source (e.g. Lazarus IDE itself) it is not
flexible/comfortable enough. That's why I propose to move the Help interface
unit of the IDEIntf to the LCL, rename the units (prefix l or laz) and use
that as a helpsystem.
It needs some pascal interfaces to be used in TCustomForm and TApplication.

3.
Then the help system needs help databases: the actual stuff. This means you
have to provide an editor for the format.
And the help viewers: the browsers.


I can do 1) and 2). 
For 3) we have already a basic type for fpdoc help databases and as a viewer
a simple webbrowser 'viewer'. 

Then you can implement any database and/or viewer for whatever format you
prefer.

Which format we use for the Lazarus-doc binary releases will be decided when
the rest is working.
Of course there are still a lot of other issues to solve like translations
and a better lazdoc.


Mattias

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] patch: encloseselectiondlg

2006-05-12 Thread Vincent Snijders

Alexandre Leclerc wrote:

Patch generated in source directory:
/lazarus/ide/

Description:
Small patch for better keyboard working:
- correct tab order
- correct default/cancel buttons



Thanks. Applied.

I added your name to the contributors.

Vincent.

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: patch: encloseselectiondlg

2006-05-12 Thread Vincent Snijders

Alexandre Leclerc wrote:

Who is maintaining the dialog?



No one in particular, so the Lazarus team.

Do you have any question?

Vincent

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: patch: encloseselectiondlg

2006-05-12 Thread Alexandre Leclerc

2006/5/12, Vincent Snijders [EMAIL PROTECTED]:

Alexandre Leclerc wrote:
 Who is maintaining the dialog?


No one in particular, so the Lazarus team.

Do you have any question?


Well, yes; I tought that maybe the patch had something wrong because I
made the changes in the ide... But I see that I was just impatient. :)

Thank you.

--
Alexandre Leclerc

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: patch: encloseselectiondlg

2006-05-12 Thread Vincent Snijders

Alexandre Leclerc wrote:

2006/5/12, Vincent Snijders [EMAIL PROTECTED]:


Alexandre Leclerc wrote:
 Who is maintaining the dialog?


No one in particular, so the Lazarus team.

Do you have any question?



Well, yes; I tought that maybe the patch had something wrong because I
made the changes in the ide... But I see that I was just impatient. :)



I took a quick glance, then tried to apply, this went without problems.

Then recompiled Lazarus and showed the dialog (for the first time ever, 
I guess) and it looked ok, so I was bold and committed the patch.


Vincent.

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: patch: encloseselectiondlg

2006-05-12 Thread Alexandre Leclerc

2006/5/12, Vincent Snijders [EMAIL PROTECTED]:

Alexandre Leclerc wrote:
 2006/5/12, Vincent Snijders [EMAIL PROTECTED]:

 Alexandre Leclerc wrote:
  Who is maintaining the dialog?
 

 No one in particular, so the Lazarus team.

 Do you have any question?


 Well, yes; I tought that maybe the patch had something wrong because I
 made the changes in the ide... But I see that I was just impatient. :)


I took a quick glance, then tried to apply, this went without problems.

Then recompiled Lazarus and showed the dialog (for the first time ever,
I guess) and it looked ok, so I was bold and committed the patch.


You do a great job. :)

Best regards.

--
Alexandre Leclerc

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Lazarus Help System Parts

2006-05-12 Thread Vincent Snijders

Mattias Gaertner wrote:

It seems the thread about 'help' can go on forever and probably many had
stopped reading all of it. This mail should define some tasks on the road to
a help for LCL applications:

1.
the LCL must be extended to recognize help queries (e.g. pressing F1)

1.1 The VCL handles winapi WM_HELP messages. I don't know if such a thing
exists under any other widgetset, but the I'm sure that the TWMHelp.HelpInfo
is quite winapi specific. The LCL should get a TControl.IntfXXX method to be
called by the interface instead.

1.2 The VCL TCustomForm has an event OnHelp: THelpEvent, which is called
with various contants and typecasts pointers from TApplication. I would
suggest to not support this and add instead a more OOP defined event.

2.
The LCL must delegate Help queries to the HelpSystem.
The HelpSystem of the VCL is defined in HelpIntfs and may be sufficient for
small things. But for the Open Source (e.g. Lazarus IDE itself) it is not
flexible/comfortable enough. That's why I propose to move the Help interface
unit of the IDEIntf to the LCL, rename the units (prefix l or laz) and use
that as a helpsystem.
It needs some pascal interfaces to be used in TCustomForm and TApplication.

3.
Then the help system needs help databases: the actual stuff. This means you
have to provide an editor for the format.
And the help viewers: the browsers.


I can do 1) and 2). 
For 3) we have already a basic type for fpdoc help databases and as a viewer
a simple webbrowser 'viewer'. 


Then you can implement any database and/or viewer for whatever format you
prefer.

Which format we use for the Lazarus-doc binary releases will be decided when
the rest is working.
Of course there are still a lot of other issues to solve like translations
and a better lazdoc.


Seems fine to me. It is open enough for other people to write their own 
viewers and db's.


Vincent.

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Lazarus Help System Requirements

2006-05-12 Thread Jeff Wormsley

Micha Nelissen wrote:

Graeme Geldenhuys wrote:

they use inside the *.jar files (html, straight xml or odt ...) and
what viewer they use for the help.  They do use the Berkeley Database
for indexes, keywork search and extended tooltips.


Berkeley DB ? Sorry, but that rings alarm bells over here ... all 
projects I've heard using it have corruption from time to time :-(.


Perhaps, but those projects by and large aren't READ ONLY, like a help 
file would be.


Jeff.

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Postgres connection question

2006-05-12 Thread Joost van der Sluis
On Fri, 2006-05-12 at 12:38 +0200, Alex du Plessis wrote:
 How does one access the error messages from a postgres database when 
 using the sqldb components (i.e. TPQConnection, TSQLTransaction and 
 TSQLQuery)?

You know, the irritating thing with error messages, is that they pop-up.
You just get them.

I don't know exactly what you mean. But if you mean the errormessages
during Applyupdates - I'm working on that.

Joost.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Fpcunit question

2006-05-12 Thread Dean Zobec
Joost van der Sluis wrote:

 If I have several tests defined for a component. The component is
 created and destroyed in the setup and teardown procedures. And then one
 test is done.

 But now, when all tests are performed. I want to run those tests again,
 but then with one different value for a property of the component.

 And then once again, with another property change.

 How can I do that in w nice way?
 The framework as designed in JUnit has no external input. So, the
 simplest way is to write a set of tests in which you use the same setup
 and teardown code and assign the value to a property in the body of the
 test method.
 
 But then, how can I run those tests more then once?
 
 Or else I've to add wrappers for all the properties I want to change.
 for example 10 tests, running with 20 different settings writing =
 20*10=200 procedures...
 
 or you could decide to read the property from a text file, but in this
 case you should always remember to change this value and repeat the
 tests, non practical at all.
 Can you send me an example of your tests for which you need this, maybe
 a concrete case could give me a better idea.
 
 See the attachment in my mail from 11:40 pm. The tests in TestDBBasics.
 I want to run them all with GetNDataset(x).Packetrecords := -1, 1, 5,
 10, 100
 
 Btw: what do you think of the tests? Improvements are welcome...
Didn't have the time to look at your tests yet, but I've written a small
example on how to effectively write parameterized tests in fpcunit, that
I'm attaching to this mail.
It proves once again that the junit framework design is quite flexible
and can be simply adapted to different testing needs. I added a short
description and some comments to the code to see how to proceed.
Ciao, Dean
unit paramstests;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, fpcunit, testutils, testregistry; 

type
{sometimes the different tests to run have a lot of common functionality
and they differ only for the presence of a different parameter, or a different
property of the class under test. To remove duplication and unnecessary code
there is the possibility to manually build a parameterized test suite, see the
following example that can be used as a template. The steps are simple, create
a new constructor for the testcase that has the parameters you'll want to pass
in the tests (in the following examples the parameters are a string input parameter
and an integer parameter to use for the testing of the results). In this constructor
you have to call the inherited CreateWithName constructor passing the name of the
actual test (in the following code the actual test is the DoTest procedure that
performs a simple test of the lenght function for the string passed as parameter to
the testcase). The parameters are then stored in some private fileds of the testcase.
Then you'll have to construct the test suite manually, see the
Suite class function, passing the constructor of the testcase with the wanted parameters.
Finally you'll add the constructed test to the test registry using the
GetTestRegistry.AddTest function in the initialization section.
In this example you'll see that four isolated different tests with the same name (DoTest)
will be created. The only drawback is in the fact that in case of failure it's not
immediate to see which test went wrong, as the tests have the same name. I suggest
to pass some information in the string description of the extended assertequals function
as a hint (in the DoTest example below I've inserted the parameter that was passed into the test)

The same parameterized testcase could be constructed by loading the parameters
from an xml file or from an ini file instead of storing them in the private fields
of the testcase. I leave this simple implementation as an exercise for the reader :)


  { TParameterizedTestCase }

  TParameterizedTestCase = class(TTestCase)
  private
aParam: string;
aOut: integer;
  public
constructor Create(const aParameter: string; aOutput: integer); virtual; overload;
class function Suite: TTestSuite;
  published
procedure DoTest;
  end;

implementation

{ TParameterizedTestCase }

constructor TParameterizedTestCase.Create(const aParameter: string; aOutput: integer);
begin
  //create a new DoTest testcase
  inherited CreateWithName('DoTest');
  //store the parameters
  aParam := aParameter;
  aOut := aOutput;
end;

class function TParameterizedTestCase.Suite: TTestSuite;
begin
//manually create the test suite
  Result := TTestSuite.Create('TParameterizedTestCase');
  Result.AddTest(TParameterizedTestCase.Create('', 0));
  Result.AddTest(TParameterizedTestCase.Create('o', 1));
  Result.AddTest(TParameterizedTestCase.Create('two', 3));
  Result.AddTest(TParameterizedTestCase.Create('three', 5));
end;

procedure TParameterizedTestCase.DoTest;
begin
//insert here the common functionality of the parameterized test
//here for example we are testing the Length function:
  AssertEquals('test ' + 

[lazarus] VirtualTreeView compile error - FPC 2.0.2

2006-05-12 Thread Alexandre Leclerc

I'm trying to install the VTV component compiling with fpc 2.0.2 and I
get an error:

C:\lazarus\components\virtualtreeview\Src\VirtualTrees.pas(1440,77)
Error: Illegal symbol for property access

The line is:
   property TreeOptions: TVirtualTreeOptions read FOptions write SetOptions;

Set options:
   procedure SetOptions(const Value: TCustomVirtualTreeOptions);

TVirtualTreeOptions:
 TVirtualTreeOptions = class(TCustomVirtualTreeOptions)

I dont see anything wrong int setoptions, the types (a base type is
used)... unless it make too much time I did not code in Pascal.

--
Alexandre Leclerc

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] TImageList.Add does not seem to work

2006-05-12 Thread Andreas Berger
I am porting an application from Delphi that depends heavily on images 
added at runtime to a TImageList. However, the Add method does not seem 
to work in Lazarus. Here is an example:


   normalImages := TImageList.Create(AOwner);
   normalImages.Height := 33;
   normalImages.Width := 33;
   normalImages.Masked := false;
   . . .
   image := TBitmap.Create;
   image.LoadFromFile(f);
   currImages.Add(image, Nil);
   . . .
   normalImages.GetBitmap(baseImage * uc_NumOptions + imageIndex, 
image.Picture.Bitmap);   // This copies nothing into image


It also does not work if I place a TImageList on a form and add the 
images (as above) at runtime. However, if I place a TImageList on the 
form  and store the images into it via the object inspector then the 
above line works ok. I assume that the Add function does not work correctly.


Andreas



_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] VirtualTreeView compile error - FPC 2.0.2

2006-05-12 Thread Micha Nelissen

Alexandre Leclerc wrote:

I'm trying to install the VTV component compiling with fpc 2.0.2 and I
get an error:

C:\lazarus\components\virtualtreeview\Src\VirtualTrees.pas(1440,77)
Error: Illegal symbol for property access

The line is:
   property TreeOptions: TVirtualTreeOptions read FOptions write 
SetOptions;


Set options:
   procedure SetOptions(const Value: TCustomVirtualTreeOptions);


Parameter type is not correct.



TVirtualTreeOptions:
 TVirtualTreeOptions = class(TCustomVirtualTreeOptions)


Micha

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Fpcunit question

2006-05-12 Thread Joost van der Sluis

On Fri, 2006-05-12 at 15:57 +0200, Dean Zobec wrote:
 Joost van der Sluis wrote:

  If I have several tests defined for a component. The component is
  created and destroyed in the setup and teardown procedures. And then one
  test is done.
 
  But now, when all tests are performed. I want to run those tests again,
  but then with one different value for a property of the component.
 
  And then once again, with another property change.
 
  How can I do that in w nice way?
  The framework as designed in JUnit has no external input. So, the
  simplest way is to write a set of tests in which you use the same setup
  and teardown code and assign the value to a property in the body of the
  test method.
  
  But then, how can I run those tests more then once?
  
  Or else I've to add wrappers for all the properties I want to change.
  for example 10 tests, running with 20 different settings writing =
  20*10=200 procedures...
  
  or you could decide to read the property from a text file, but in this
  case you should always remember to change this value and repeat the
  tests, non practical at all.
  Can you send me an example of your tests for which you need this, maybe
  a concrete case could give me a better idea.
  
  See the attachment in my mail from 11:40 pm. The tests in TestDBBasics.
  I want to run them all with GetNDataset(x).Packetrecords := -1, 1, 5,
  10, 100
  
  Btw: what do you think of the tests? Improvements are welcome...
 Didn't have the time to look at your tests yet, but I've written a small
 example on how to effectively write parameterized tests in fpcunit, that
 I'm attaching to this mail.
 It proves once again that the junit framework design is quite flexible
 and can be simply adapted to different testing needs. I added a short
 description and some comments to the code to see how to proceed.

This is great. Thank you.

Joost.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Lazarus Help System Requirements

2006-05-12 Thread Marco Ciampa
On Fri, May 12, 2006 at 12:23:57PM +0200, Michael Van Canneyt wrote:
 On Fri, 12 May 2006, Marco Ciampa wrote:
 On Fri, May 12, 2006 at 11:23:23AM +0200, Michael Van Canneyt wrote:
 On Fri, 12 May 2006, Marco Ciampa wrote:
 On Thu, May 11, 2006 at 03:33:02PM +0200, Michael Van Canneyt wrote:
 I think the po2xml is just used to translate the program strings which
 appear in the docs (used to refer to button captions etc), not for the
 actual
 documentation text.
 Wrong. It is used for documentation writing too as you can see here,
 for the LinuxFromScratch manual:
 
 http://www.mail-archive.com/lfs-dev@linuxfromscratch.org/msg06863.html
 
 In that case, I understand even less why they use it. In my opinion,
 the .po format is totally unsuitable for this kind of thing.
 Sorry, I do not understand and I really want to see your point.
 Could you please tell me why you consider .po files not suitable for the
 job?
 I do not know of some other tool able to manage the update problem of a
 multilingual translation as the gettext tool. May be I'm wrong but I
 think that such a tool simply does not exist!
 
 po files are designed/meant for captions, short one-line descriptions to be
 displayed in a program, produced by gettext from sources.
Right. It is the kind of use I intended for gettext. We both agree about
po files scope but I think you missed the point.

 Gettext uses a very inefficient algorithm for translation: it searches
 in the .po (or .mo) file for the original text, and then returns the
 translated text. You can't get more inefficient than that.
No. It is really quick and it doesn't search the .po file but its
compiled form, the .mo and anyway, I never intended to use it as a final 
product, so I do not really care if it's fast or not.


 Conclusion:
 The .po format is not designed/meant for large pieces of continuous text.
Yes, I agree again and the use I have in mind 

([EMAIL PROTECTED] in this ml grasped the concept quickly, see:



 Maybe a source format file combination of *.po files and a XML
 file:

 
 xml
 title path= title.po /

 contents path= contents.po /

 /xml
 
yes, sort of...





) is to use the interesting propriety of the .po files with the gettext 
utility suite only for source code, not for the final result. 
Infact I never inteded it to. 
A paragraph is always a short text, in general a fiew lines, so it's 
ideal for gettext  .po strings.


 I agree with you that a good tool for translations does not exist.
 The question is whether such a tool should exist. 
The right tool do not exist but gettext is the most andvanced tool in
this direction thought.


 A simple diff
 (with nice gui) in any text editor can help you in keeping your
 translation up to date just as much...
No, really not, it's a nightmare, believe me! 
My main occupation (as a volunteer) is to translate free software 
programs and manuals (like GIMP) and I can assure you: without gettext
revision control it's really difficult to keep track of the
modifications inserted at random (in time and location) by contributors 
even using a language (the english) as a reference and with cvs (and
cvs web interface).


 There is no need to use a .po file format for this.
For the final product, no. I really intended to obtain html _AND_ any
other suitable for browse/search format like chm or pdf or info or
whatever you like.


 How would you translate a document written in Latex, or Ms-Word or
 OpenOffice Writer? 
Cut it in paragraps and paste it in many .po strings and the work 
is easier than that with any other source format.


 There are no good tools for this, and I don't
 believe it's possible to write such a tool other than some visual
 aid for detecting differences...
Have you used tools like intltool-update from the gnome project lately?
It works like a sharm! Is it possible to obtain the same result with any
other tool? Do you know of any similar tools? Without gettext utilities 
like msgmerge?


 For example:
 The fpdoc format is much more suitable for translation, because all
 pieces of text are identified with unique names. 
The text is really a unique identifier, or not?


 It would be much more easy to write a translator program for that.
Yes its simple in a one-shot effort. Pray to be not the manual 
mantainer...and why should you reinvent the wheel when there are so many
instruments like poedit, kbabel, emacs po-mode, even rosetta web
interface from the ubuntu project!?!

Remember: the problem is _not_ the easyness to translate the manual
_but_ the maintainability of it!

-- 

Marco Ciampa

++
| Linux User  #78271 |
| FSFE fellow   #364 |
++

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] VirtualTreeView compile error - FPC 2.0.2

2006-05-12 Thread Alexandre Leclerc

2006/5/12, Micha Nelissen [EMAIL PROTECTED]:

Alexandre Leclerc wrote:
 I'm trying to install the VTV component compiling with fpc 2.0.2 and I
 get an error:

 C:\lazarus\components\virtualtreeview\Src\VirtualTrees.pas(1440,77)
 Error: Illegal symbol for property access

 The line is:
property TreeOptions: TVirtualTreeOptions read FOptions write
 SetOptions;

 Set options:
procedure SetOptions(const Value: TCustomVirtualTreeOptions);

Parameter type is not correct.


Yes, but they are same descendent no? I'll correct that then and see.

(I was compiling with 2.1.1 in fact; error of myself).

--
Alexandre Leclerc

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] VirtualTreeView compile error - FPC 2.0.2

2006-05-12 Thread Alexandre Leclerc

2006/5/12, Alexandre Leclerc [EMAIL PROTECTED]:

2006/5/12, Micha Nelissen [EMAIL PROTECTED]:
 Alexandre Leclerc wrote:
  I'm trying to install the VTV component compiling with fpc 2.0.2 and I
  get an error:
 
  C:\lazarus\components\virtualtreeview\Src\VirtualTrees.pas(1440,77)
  Error: Illegal symbol for property access
 
  The line is:
 property TreeOptions: TVirtualTreeOptions read FOptions write
  SetOptions;
 
  Set options:
 procedure SetOptions(const Value: TCustomVirtualTreeOptions);

 Parameter type is not correct.

Yes, but they are same descendent no? I'll correct that then and see.

(I was compiling with 2.1.1 in fact; error of myself).


Should I send a patch here? Else, to whom?

--
Alexandre Leclerc

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] VirtualTreeView compile error - FPC 2.0.2

2006-05-12 Thread Alexandre Leclerc

2006/5/12, Alexandre Leclerc [EMAIL PROTECTED]:

Should I send a patch here? Else, to whom?


Ok, it's already correction in svn tree.

--
Alexandre Leclerc

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] VirtualTreeView compile error - FPC 2.0.2

2006-05-12 Thread Christian U.
is fixed in cvs since 2 month


regards
Christian

- Original Message -
From: Alexandre Leclerc [EMAIL PROTECTED]
To: lazarus@miraclec.com
Sent: Friday, May 12, 2006 4:40 PM
Subject: Re: [lazarus] VirtualTreeView compile error - FPC 2.0.2


 2006/5/12, Alexandre Leclerc [EMAIL PROTECTED]:
  2006/5/12, Micha Nelissen [EMAIL PROTECTED]:
   Alexandre Leclerc wrote:
I'm trying to install the VTV component compiling with fpc 2.0.2 and
I
get an error:
   
C:\lazarus\components\virtualtreeview\Src\VirtualTrees.pas(1440,77)
Error: Illegal symbol for property access
   
The line is:
   property TreeOptions: TVirtualTreeOptions read FOptions write
SetOptions;
   
Set options:
   procedure SetOptions(const Value: TCustomVirtualTreeOptions);
  
   Parameter type is not correct.
 
  Yes, but they are same descendent no? I'll correct that then and see.
 
  (I was compiling with 2.1.1 in fact; error of myself).

 Should I send a patch here? Else, to whom?

 --
 Alexandre Leclerc

 _
  To unsubscribe: mail [EMAIL PROTECTED] with
 unsubscribe as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives




_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Compiling laz from svn + statistically linked components

2006-05-12 Thread Alexandre Leclerc

I installed vtv and worked nice. Laz recompiled itself.

I use an independent tree for svn version that I compile and use and
if all works well I move to my usual working lazarus tree.

Now I see that the vtv component is not included in the compilation of
laz from svn. I did:
- copied vtv folder in components
- copied /lazarus/staticpackages.inc to my svn tree too.

Now i feel I must tell the compiler to add the stuff... but I just
don't know how.

--
Alexandre Leclerc

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] VirtualTreeView compile error - FPC 2.0.2

2006-05-12 Thread Alexandre Leclerc

2006/5/12, Christian U. [EMAIL PROTECTED]:

is fixed in cvs since 2 month


Do you have svn access?

--
Alexandre Leclerc

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] New help doc format?

2006-05-12 Thread Luiz Americo

Michael Van Canneyt escreveu:



On Fri, 12 May 2006, Luiz Americo wrote:

I did more tests, all give comparable results: sqlite is very fast 
for simple stuff.


Your results are comparable from one made without index published in 
sqlite wiki, but when using index, according to the test, sqlite 
compares to the other.


Obviously, I have created the same indexes in all 3 databases.


See: http://www.sqlite.org/cvstrac/wiki?p=SpeedComparison

And yes, I did all possible optimizations. Version 3 was used.
I have a lot of experience with databases of all kinds, and I know 
what to test for.



Please post the database schema, no of records, indexes, so i can 
reproduce and publish in a site.


I'll send it in private if you want, but you don't have permission to 
publish it.

(my contract with the journal's editor forbids that)
Please send it. I'll take a look if some easy optization can be done and 
i'll return to you privately.


Luiz

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] VirtualTreeView compile error - FPC 2.0.2

2006-05-12 Thread Christian U.
 Do you have svn access?

Thers no svn for Virtualtreeview 
Thers cvs.
and its on my server so i have access :)



 
 -- 
 Alexandre Leclerc
 
 _
  To unsubscribe: mail [EMAIL PROTECTED] with
 unsubscribe as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives
 
 
 

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] TImageList.Add does not seem to work

2006-05-12 Thread Andreas Berger

Andreas Berger wrote:

I am porting an application from Delphi that depends heavily on images 
added at runtime to a TImageList. However, the Add method does not 
seem to work in Lazarus. Here is an example:


   normalImages := TImageList.Create(AOwner);
   normalImages.Height := 33;
   normalImages.Width := 33;
   normalImages.Masked := false;
   . . .
   image := TBitmap.Create;
   image.LoadFromFile(f);
   currImages.Add(image, Nil);
   . . .
   normalImages.GetBitmap(baseImage * uc_NumOptions + imageIndex, 
image.Picture.Bitmap);   // This copies nothing into image


It also does not work if I place a TImageList on a form and add the 
images (as above) at runtime. However, if I place a TImageList on the 
form  and store the images into it via the object inspector then the 
above line works ok. I assume that the Add function does not work 
correctly.


Andreas


Ok I found the problem. Lazarus simply adds the image to the list 
without making a copy, so when I deleted the image after adding it (like 
is done in delphi) the image vanished :) . Is this an error?


_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Lazarus Help System Requirements

2006-05-12 Thread lazarus . mramirez

 1 - We cannot just get dependent on Open Office. It´s a huge
 dependency, and won´t work on wince for example.

Open Office format it's too complicated for a help file.

 a lot of stuff ready.

-
Marco Aurelio Ramirez Carrillo
[EMAIL PROTECTED] [.mx]

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Pixels

2006-05-12 Thread Andreas Berger
Reading and writing pixels to a bitmap under windows 98 does not work. I 
have looked at the Lazarus LCL code and it seem correct since it ends up 
calling Windows.GetPixel and Windows.SetPixel. The only thing I can 
assume is that the handle is corrupt. Can someone who knows the 
internals better check this out?


Thanks,
Andreas

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Lazarus Help System Requirements

2006-05-12 Thread lazarus . mramirez

  more productive route ATM, if the coder doesn't care anyway.

 Micha

It seems that the one that implements it's proposal wins...

-
Marco Aurelio Ramirez Carrillo
[EMAIL PROTECTED] [.mx]

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Lazarus Help System Requirements

2006-05-12 Thread L505

 Micha Nelissen wrote:
  Graeme Geldenhuys wrote:
  they use inside the *.jar files (html, straight xml or odt ...) and
  what viewer they use for the help.  They do use the Berkeley Database
  for indexes, keywork search and extended tooltips.
  
  Berkeley DB ? Sorry, but that rings alarm bells over here ... all 
  projects I've heard using it have corruption from time to time :-(.
 
 Perhaps, but those projects by and large aren't READ ONLY, like a help 
 file would be.
 

So what about SVN?

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Lazarus Help System Requirements

2006-05-12 Thread Graeme Geldenhuys

On 12/05/06, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:

Open Office format it's too complicated for a help file.


I can't see why?  If you are referring to the tags while authoring
help, when last have you seen all the tags for Windows Help.  Also the
Help Authoring Plugin of OOo makes authoring help much easier.  Plus
you get the benefit of what OOo Writer has to offer.

Regarding generating the HTML from the XML.  That would be a once off
design of XSLT rules.  Not difficult, just time consuming.  I am sure
we can peak at the OOo XSLT to help us along.

The only thing to I can think of that might be a pain, is finding a
decent HTML Viewer component for Lazarus and something that supports
basic CSS would be a big bonus. This isn't really a issue against the
OOo format as the consensus is that HTML as one of the final output
formats is the preferred choice.  In that case, no matter what help
format we use, we still need to be able to viewer the HTML in some
viewer component.

Regards,
 Graeme.


--
There's no place like 127.0.0.1

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Lazarus Help System Requirements

2006-05-12 Thread lazarus . mramirez
 Conclusion:
 The .po format is not designed/meant for large pieces of continuous text.

The cool thing about *.po files are

One text file for a set of messages, each message with a string ID.

What about a BINARY replacement of text files such as:

-
Binary Help Index table (*.hidx):
-
Identifier|Offset
-
1.|0
2.|5
-

--
Binary Help Message table (*.hmsg):
--
RecordNumber|Message
--
0...|Hello
5...|World
--

--
Pascal file that uses resources (*.pas):
--

const
  resHello = 1; // for Binary Index file
  resWorld = 2; // for Binary Index file

...

function _(const Identifier: Integer): string;
// function that loads a resourcestring, guven its identifier

var S: string;
...
  S := _(resHello) + ' ' + _(resWorld);

--

And use it to make a help system.

My 2 cents...

-
Marco Aurelio Ramirez Carrillo
[EMAIL PROTECTED] [.mx]

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] VirtualTreeView compile error - FPC 2.0.2

2006-05-12 Thread Alexandre Leclerc

2006/5/12, Christian U. [EMAIL PROTECTED]:

 Do you have svn access?

Thers no svn for Virtualtreeview
Thers cvs.
and its on my server so i have access :)


Well, I meant access in a broader term (svn based access). I do not
use csv... but I think there is something like tortoisecsv for the
brokenOS on which i'm right now. I'll try to get a download.

Is there a reason why zip distrib are not frequently released (since
it makes 2 months it's corrected)? Is there a reason not to use the
csv version?

Regards.

--
Alexandre Leclerc

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Who needs Unicode controls.

2006-05-12 Thread lazarus . mramirez
Hi, I have a question.

Who of you need Unicode support in visula controls.

What non Latin languages (such as Arabic, Chinese) do you need to be
supported ?

Just curious.

-
Marco Aurelio Ramirez Carrillo
[EMAIL PROTECTED] [.mx]

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] SSE bug

2006-05-12 Thread zeljko
On Friday 12 May 2006 12:02, S0vNarK0m wrote:
 Hi all, somebody can say something about
 http://www.freepascal.org/bugs/showrec.php3?ID=5073

yes, $ASMMODE intel is broken in 2.1.1, with 2.0.2 it compiles.

http://www.freepascal.org/bugs/showrec.php3?ID=5015
and
http://www.freepascal.org/bugs/showrec.php3?ID=5036

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Who needs Unicode controls.

2006-05-12 Thread ik
בFriday 12 May 2006 19:22, נכתב על ידי [EMAIL PROTECTED]:
 Hi, I have a question.

 Who of you need Unicode support in visula controls.

It will be great for me, my native language is Hebrew and BiDi (I have a 
binding code for freebidi btw) with unicode can be great.


 What non Latin languages (such as Arabic, Chinese) do you need to be
 supported ?

 Just curious.

 -
 Marco Aurelio Ramirez Carrillo
 [EMAIL PROTECTED] [.mx]


-- 
  William Safire's rules for writing as seen in the New York Times

 Do not put statements in the negative form.
 And don't start sentences with a conjunction.
 If you reread your work, you will find on rereading that a great
 deal of repetition can be avoided by rereading and editing.
 Never use a long word when a diminutive one will do.
 Unqualified superlatives are the worst of all.
 If any word is improper at the end of a sentence, a linking verb is.
 Avoid trendy locutions that sound flaky.
 Never, ever use repetitive redundancies.
 Also, avoid awkward or affected alliteration.
 Last, but not least, avoid cliche's like the plague.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Pixels

2006-05-12 Thread Micha Nelissen
On Fri, 12 May 2006 13:50:22 -0300
Andreas Berger [EMAIL PROTECTED] wrote:

 Reading and writing pixels to a bitmap under windows 98 does not work. I 
 have looked at the Lazarus LCL code and it seem correct since it ends up 

Please send an example project that reproduces the error.

Micha

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Who needs Unicode controls.

2006-05-12 Thread Felipe Monteiro de Carvalho

On 5/12/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

Hi, I have a question.

Who of you need Unicode support in visula controls.


I already use Unicode support in visual controls, on Gtk 2 interface.

What is missing is adding support for utf-8 on the win32 interface.

It would probably have to be something like this:

If Windows 9x, then convert utf-8 to adequate iso

If Windows NT, then convert utf-8 to utf-16 and call the Wide version
of Windows API.

--
Felipe Monteiro de Carvalho

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] New help doc format?

2006-05-12 Thread L505
 In your lazarus directory /components/chmhelp/packages/chm/ there is a
 unit called chmreader. It is simple to get a list of any of the files in
 the chm and extracting them:

 That's how easy it is to get all the files out of a chm :)

Okay so its easy to get the HTML out of CHM (legally.. not sure), now how do I 
convert the
CHM file into a web program that runs on my web server and allows people to 
make queries
at my website to search the html files? This is my case for using a database 
from day 1,
for both jobs - instead of using CHM for the desktop and some other database 
for the web
server docs.

BTW Felipe, if you are listening - CHM was not available on Windows CE either - 
someone
has done some work to get it working on Windows CE though.. just as someone got 
SQLite
working on Windows CE. My point is that databases are no worse than CHM for the 
Windows CE
argument.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] New help doc format?

2006-05-12 Thread Felipe Monteiro de Carvalho

On 5/12/06, L505 [EMAIL PROTECTED] wrote:

BTW Felipe, if you are listening - CHM was not available on Windows CE either - 
someone
has done some work to get it working on Windows CE though.. just as someone got 
SQLite
working on Windows CE. My point is that databases are no worse than CHM for the 
Windows CE
argument.


Well, but basically it was decided that the help framework will allow
people to implement their own Viewers and DBs, so this discussion
seams to be about the help that Lazarus will use, right?

In that case the core developers already forbit external dependencies,
and I agree with them. Lazarus should use a 100% oop solution. This
also makes the IDE easier to deploy, We don´t want to be forced to
deploy sqlite together with the IDE.

For your own programs, please feel free to write DB and viewer classes
for sqlite =) We can use the Lazarus CCR to host such viewers and help
DB solutions, so people can then choose which one to use.

--
Felipe Monteiro de Carvalho

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Can't make it work (my own laz distro)

2006-05-12 Thread Alexandre Leclerc

Hi all,

I did compile the latest of fpc and lazarus (with the latest fpc). But
I'm not able to compile anything in Lazarus. There is something I'm
missing. Any pointers would be helpful. (Under windows).

With FPC 2.0.2 I compiled latest svn fpc.

set path=C:\FPC\2.0.2\bin\i386-win32;c:\fpcsvn
make all
make install

I copied make.exe from the 2.0.2 to the new /pp/bin... folder. Then
with latest fpc I compile lazarus (svn source).

set path=C:\pp\bin\i386-win32;c:\lazarus
make

The I movex /pp to /lazarus/pp and moved /fpcsvn to /lazarus/fpcsvn
(renamed to fpcsrc)

When I run Lazarus, I set the Config-Environnement Options and all is
fine. But when I run lazarus to compile a test program, there is no
way to find any unit. (Interfaces, etc.)

In fact all /lazarus/lcl/interfaces ... are there. But it can't find
it. Is it because I must compile these? If yes, how? (I can't see any
differences with a normal working lazarus distro.)

--
Alexandre Leclerc

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Lazarus Help System Parts

2006-05-12 Thread Felipe Monteiro de Carvalho

On 5/12/06, Mattias Gaertner [EMAIL PROTECTED] wrote:

2.
The LCL must delegate Help queries to the HelpSystem.
The HelpSystem of the VCL is defined in HelpIntfs and may be sufficient for
small things. But for the Open Source (e.g. Lazarus IDE itself) it is not
flexible/comfortable enough. That's why I propose to move the Help interface
unit of the IDEIntf to the LCL, rename the units (prefix l or laz) and use
that as a helpsystem.
It needs some pascal interfaces to be used in TCustomForm and TApplication.


I took a look at HelpIntfs at lclintf directory, and it doesn´t seam
easely extensible, nor provides a way to have multiple viewers and
dbs.

IMHO it doesn´t seam suitable to be utilized as a Framework for apps
produced with Lazarus.

On another thread there is the description of the Kylix help system,
what do you guys (lazarus developers) think of using either the Kylix
system, or a Kylix-like system?

I can develop such unit, with interfaces to be implemented by people
writing their own viewers / dbs.

thanks,
--
Felipe Monteiro de Carvalho

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] MacOS X - Lazarus installation

2006-05-12 Thread Panagiotis Sidiropoulos
Working on a iBook G4, I got fpc and lazarus on the system through  
svn. Both are located in a subfolder in my personal folder. Decide to  
go though this way because prefer updating system (just svn update).


Running make install into fpc folder I get a series of command not  
found messages as follow:

make: -iVSPTPSOTO: Command not found
make: -iSP: Command not found
make: -iTP: Command not found
make: -iSO: Command not found
make: -iTO: Command not found
make -C ide idepkg
make[1]: -iSP: Command not found
make[1]: -iTP: Command not found
make[1]: -iSO: Command not found
make[1]: -iTO: Command not found
...

Same happen while make-ing Lazarus:
make: -iVSPTPSOTO: Command not found
make: -iSP: Command not found
make: -iTP: Command not found
make: -iSO: Command not found
make: -iTO: Command not found
make -C ide ide
make[1]: -iSP: Command not found
make[1]: -iTP: Command not found
...

I cannot explain this although followed instructions at:
http://wiki.lazarus.freepascal.org/index.php/ 
Installing_Lazarus#Installing_Free_Pascal_under_Mac_OS_X


My next option is to use ready binary packages at http:// 
www.de.freepascal.org/lazarus/ but I would like to keep this way.


This is the second time posted for installing on MacOSX. first time  
related to an Intel based system but I exchanged with this  
traditional system hoping to get smoother installation and usage.


Regard, Panagiotis

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Turbopower ipro HTML Viewer

2006-05-12 Thread Graeme Geldenhuys

Hi,

I saw the ipro components in the Lazarus directory and noticed that
there is a HTML Viewer component.  Anybody know how good that
component is?  Does it support basic CSS?

Regards,
 - Graeme -

--
There's no place like 127.0.0.1

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] MacOS X - Lazarus installation

2006-05-12 Thread Vincent Snijders

Panagiotis Sidiropoulos wrote:
Working on a iBook G4, I got fpc and lazarus on the system through  svn. 
Both are located in a subfolder in my personal folder. Decide to  go 
though this way because prefer updating system (just svn update).


Running make install into fpc folder I get a series of command not  
found messages as follow:

make: -iVSPTPSOTO: Command not found
make: -iSP: Command not found
make: -iTP: Command not found
make: -iSO: Command not found
make: -iTO: Command not found
make -C ide idepkg
make[1]: -iSP: Command not found
make[1]: -iTP: Command not found
make[1]: -iSO: Command not found
make[1]: -iTO: Command not found
...

Same happen while make-ing Lazarus:
make: -iVSPTPSOTO: Command not found
make: -iSP: Command not found
make: -iTP: Command not found
make: -iSO: Command not found
make: -iTO: Command not found
make -C ide ide
make[1]: -iSP: Command not found
make[1]: -iTP: Command not found
...


It seems you don't have a compiler on your path. To compile fpc you need 
a compiler, for example from a binary package. For powerpc download the 
fpc 2.0.2 macosx installer, for intel download a 2.1.1 snapshot. Note 
only the compiler (ppcppc or ppc386) is needed.


Vincent.

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Lazarus Help System Parts

2006-05-12 Thread Vincent Snijders

Felipe Monteiro de Carvalho wrote:

On 5/12/06, Mattias Gaertner [EMAIL PROTECTED] wrote:


2.
The LCL must delegate Help queries to the HelpSystem.
The HelpSystem of the VCL is defined in HelpIntfs and may be 
sufficient for

small things. But for the Open Source (e.g. Lazarus IDE itself) it is not
flexible/comfortable enough. That's why I propose to move the Help 
interface
unit of the IDEIntf to the LCL, rename the units (prefix l or laz) and 
use

that as a helpsystem.
It needs some pascal interfaces to be used in TCustomForm and 
TApplication.



I took a look at HelpIntfs at lclintf directory, and it doesn´t seam
easely extensible, nor provides a way to have multiple viewers and
dbs.



Why isn't it extensible?

Some code may need to be moved, maybe the HelpManager needs to be added.

Multiple databases:
See procedure THelpManager.RegisterIDEHelpDatabases

Multiple viewers is also possible:
Extend procedure THelpManager.RegisterDefaultIDEHelpViewers;

I don't see what is missing.

Vincent.

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Lazarus Help System Parts

2006-05-12 Thread Graeme Geldenhuys

On 12/05/06, Vincent Snijders [EMAIL PROTECTED] wrote:

Why isn't it extensible?

Some code may need to be moved, maybe the HelpManager needs to be added.

Multiple databases:
See procedure THelpManager.RegisterIDEHelpDatabases

Multiple viewers is also possible:
Extend procedure THelpManager.RegisterDefaultIDEHelpViewers;

I don't see what is missing.

Vincent.



I haven't had time to study the related code yet, so excuse me if I
got this all wrong.  From the method names mentioned above, I come to
the conclusion that this help system only works for the Lazarus IDE?

Can one implement help for applications written with Lazarus and LCL as well.?

Regards,
 Graeme.




--
There's no place like 127.0.0.1

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Turbopower ipro HTML Viewer

2006-05-12 Thread A.J. Venter
On Friday 12 May 2006 23:14, Graeme Geldenhuys wrote:
 Hi,

 I saw the ipro components in the Lazarus directory and noticed that
 there is a HTML Viewer component.  Anybody know how good that
 component is?  Does it support basic CSS?
It's not great but it's pretty decent, I use it in some projects.
It does handle at least some CSS enough anyway to open html docs created in 
OOo.
In some regards it's not the prettiest out there, but it's generally quite 
good enough for embedding a bit of html somewhere when you need it.
I use it for inline help windows, to show parsed wikiquote results in, to 
power the get new wordlists feature in tappytux etc.

Ciao
A.J.
-- 
there's nothing as inspirational for a hacker as a cat obscuring a bug 
by sitting in front of the monitor - Boudewijn Rempt
A.J. Venter
Chief Software Architect
OpenLab International
www.getopenlab.com
www.silentcoder.co.za
+27 82 726 5103

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Turbopower ipro HTML Viewer

2006-05-12 Thread Graeme Geldenhuys

On 12/05/06, A.J. Venter [EMAIL PROTECTED] wrote:

It's not great but it's pretty decent, I use it in some projects.
It does handle at least some CSS enough anyway to open html docs created in
OOo.


Thanks AJ.  I will give it a try in the coming week.  I am hunting for
a HTML viewer I can use in a application Help System.  I gather it is
cross platform otherwise it wouldn't ship with Lazarus.

Regards,
 Graeme.



--
There's no place like 127.0.0.1

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Turbopower ipro HTML Viewer

2006-05-12 Thread Andrew Haines

Graeme Geldenhuys wrote:


On 12/05/06, A.J. Venter [EMAIL PROTECTED] wrote:


It's not great but it's pretty decent, I use it in some projects.
It does handle at least some CSS enough anyway to open html docs 
created in

OOo.



Thanks AJ.  I will give it a try in the coming week.  I am hunting for
a HTML viewer I can use in a application Help System.  I gather it is
cross platform otherwise it wouldn't ship with Lazarus.


That's the HTML viewer that was used in chmhelp. If you need an example 
of making a DataProvider for the TIProHTMLViewer then there is an 
example you can use to get an idea of how it works.


Andrew

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Lazarus Help System Requirements

2006-05-12 Thread Marco Ciampa
On Fri, May 12, 2006 at 05:07:28PM +0200, Michael Van Canneyt wrote:
 Not for the initial format either:
You have to insert the tag:

 element name=TMyClass.MyMethod
 descr lang=en
   rdate=200613050135

 pblah-blah/p
 pblah2-blah2/p
 /descr
 descr lang=de
  rdate=20061305

 pblah-blah/p
 pblah2-blah2/p
 /descr

1) you have to make the tool that parses the source in search of a 
ReleaseDATE 
   mismatch to signal the change and 'jumps' to it
2) you have to create the macros to update the rdate tag
3) you have to check for the validation of the code

and so on... to be short, you find yourself reinventing the wheel of the 
gettext 
platform...


 Will do just fine. Any changes to portions of the first descr node can be
 made visible in a decent fpdoc editing program, and the relevant portion
 of the second node can be displayed in parallel...

reinventing poedit...


 No _need_ for .po files. You could use them, but I doubt they are
 needed.

Ofter the advandages of using a standard tool are not apparent at first
but when you have already done much of the work... :-(

 since fpdoc is a structured format, showing differences
 is just a matter of having the correct tools in your editor.
yes but why to recode something that is already there?


New Murphy law: for every new RAD there will be a new (and buggy) help
format  tool :-/

-- 

Marco Ciampa

++
| Linux User  #78271 |
| FSFE fellow   #364 |
++

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Who needs Unicode controls.

2006-05-12 Thread Borut Maricic
It would also be great for me to have Unicode controls under
win32.

On 2006-05-12 at 19:58, 
Felipe Monteiro de Carvalho ([EMAIL PROTECTED]) wrote:

 What is missing is adding support for utf-8 on the win32 interface.
 It would probably have to be something like this:
 If Windows 9x, then convert utf-8 to adequate iso
 If Windows NT, then convert utf-8 to utf-16 and call the Wide version
 of Windows API.

I agree - this is also my understanding after the recent
thread. It seems that it would be highly inefficient on
native utf-16 machines (such as WinNT+), but it should work,
in principle. I have not tried it (yet), but I am browsing the
code from time to time (when I find some time).

Let me quote two other posts on the subject, just for the
sake of completeness...

On 2005-11-18 at 00:02,
Marc Weustink ([EMAIL PROTECTED]) wrote:
 The LCL consists of 2 parts, one which implements a class hierarchy
 compatible with the VCL and one that communicates to the various widgets
 of the various platforms. The communication between the 2 parts is done
 by a abstract class TWidgetset. Each widgetset is implemented by its own
 derived class form TWidgetset. Where the GTK widgetset is the oldest. In
 this widgetset the string encoding is determined by the LANG environment
 var. If it is a UTF8 variant, all strings from and to native
 controls/widgets are UTF8 encoded. However utf8 may affect keyboard
 handling for gtk1. On gtk2 this problem is solved, but not implemented
 yet, the keyboard routines still rely on gtk1 code there.
 The win32 interfaces is iirc setup with ansi widgets, so you wont get
 unicode there.
 In the new OSX interface we decided to make it UTF8 internally, since
 there is a movement to make the LCL UTF8 aware.

 Back to your question. IMO it doesn't make much sense to add  new
 unicode controls, since the native controls should support that (I read
 UTF8 here as unicode) in the future.
 It is not like delphi where you must add new unicode aware controls
 since you cannot change the creation of the VCL controls.

On 2006-05-01 at 14:16,
roozbeh gholizadeh ([EMAIL PROTECTED]) wrote:
 Well i read your mail fast,although i shouldnt for this reply on it,but
 here are few things just to remind.
 Currently all windows apis are mapped to *A version,as far as i know like
 c headers there arent define words like unicode which you can alter
 that,so you have to change all of them-or only those you require-to be
 unicode versions.
 Secondly using getwindowtextw or getwindowstexta when your window is
 created by createwindowa,doesnt differ.
 So you have to change all window creation too,to make them really unicode.
 Not doing that and using *W version is just like using *A version and then
 converting that string to widestring.

 If you have time-which should be more than normal :)-take a look at tnt
 components and see how they have implemented everything,and whats the
 diffrence between them and vcl,the same will apply here too.

Regards,
Borut

_
 To unsubscribe: mail [EMAIL PROTECTED] with
unsubscribe as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Lazarus Help System Parts

2006-05-12 Thread Felipe Monteiro de Carvalho

On 5/12/06, Vincent Snijders [EMAIL PROTECTED] wrote:

Why isn't it extensible?

Multiple databases:
See procedure THelpManager.RegisterIDEHelpDatabases

Multiple viewers is also possible:
Extend procedure THelpManager.RegisterDefaultIDEHelpViewers;


But this procedures have no parameters!

It is just my oppinion, but I think that a model with Interfaces to be
implemented is more straigth forward and easier to be understood for
people creating software with Lazarus.

Looking at HelpIntfs the way it is currently, it´s very hard to find
out what should I implement, what class to derive from to build by own
viewer / db? Also a interface has a advantage here that it can be
utilized on a class derived from anything.

thanks,
--
Felipe Monteiro de Carvalho

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] New help doc format?

2006-05-12 Thread Andrew Haines

George Lober wrote:



Looking at it , it looks like it is all dependent on LHelp, which is 
GPL.  So if I can't compile that  into my application or distribute it 
under my license,  you are left with situation where the end user 
somehow has to get  LHelp themselves.  Are they supposed to install 
Lazarus and compile it themselves ?


The unit/package to control lhelp (modified LGPL) does not link to lhelp 
in any way. It talks to it using the IPC units that come with fpc. 
basically sending to lhelp text commands. You may distribute the lhelp 
program with your program but that does not make your program subject to 
lhelp's license because there is no linking of any sort between them.



BTW, LHelp seems to have a few noticeable bugs reading chm files.


Please send me descriptions of the bugs so they can be fixed. :)


Andrew

_
To unsubscribe: mail [EMAIL PROTECTED] with
   unsubscribe as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives