[lazarus] the DB error - I know what is wrong

2006-03-17 Thread johnf
Hi,
I'm sure some of you have been following my learning curve with Lazarus and 
using SQLdb.  At last I think I have the issue.

I think I have now discovered the error in updating the data on the postgres 
database.  The sqlquery is passing a bad string to the postgres database 
engine.  In my case the the following is passed:
Update arcust set custno = 'BRS', company = 'Blue Ribbon Stairs' where 
(custno=BRS)

Notice that the BRS lacks single quotes.  It should be (custno='BRS').

The append works - the insert statement was perfect. 

Now how do I fix it?

John

below is the simple code to show the error:
unit Unit1; 

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs,
  pqconnection, sqldb, StdCtrls, Buttons;

type

  { TForm1 }

  TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
Edit1: TEdit;
Edit2: TEdit;
PQConnection1: TPQConnection;
SQLQuery1: TSQLQuery;
SQLTransaction1: TSQLTransaction;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
  private
{ private declarations }
  public
{ public declarations }
  end; 

var
  Form1: TForm1; 

implementation

{ TForm1 }

procedure TForm1.FormCreate(Sender: TObject);
begin
  self.PQConnection1.DatabaseName :='Real-Accounting';
  self.PQConnection1.UserName:='johnf';
  self.PQConnection1.HostName:='192.168.1.200';
  self.PQConnection1.Password:='jfabiani';
  self.PQConnection1.Transaction:=self.SQLTransaction1;
  self.SQLQuery1.DataBase:=self.PQConnection1;
  self.SQLQuery1.sql.clear;

end;

procedure TForm1.Button1Click(Sender: TObject);
var mystring:string;
VAR mysqlstr:string;
begin
   mysqlstr:= 'Select custno,company from arcust where custno = 
'++edit1.Text+;
  self.SQLQuery1.SQL.Add(mysqlstr);
  //self.SQLQuery1.SQL.Add(self.edit1.Text);
  //mystring:={'}
 // self.SQLQuery1.sql.Add();
  mystring:=self.SQLQuery1.SQL.Text;
  self.SQLQuery1.open;
  self.edit2.Text:=sqlquery1.FieldByName('company').AsString;
  self.edit2.Refresh;
  self.SQLQuery1.Edit;
end;

procedure TForm1.Button2Click(Sender: TObject);
Var updtestr:string;
begin
  //self.sqlquery1.Clear;
  //self.SQLQuery1.Edit;
  SQLQuery1.FieldByName('company').AsString:= self.edit2.Text;
  //updtestr:='update set company = '++edit2.text++' where custno = '+ 
'++edit1.Text+;
  //self.SQLQuery1.SQL.Text:=;

  //self.SQLQuery1.Append;
  //self.SQLQuery1.FieldByName('custno').AsString:='BRS';
  //self.SQLQuery1.FieldByName('company').AsString:='JFCS';
  self.SQLQuery1.Post;
  self.SQLQuery1.ApplyUpdates;
  self.SQLTransaction1.Commit;
  self.SQLQuery1.Close;

  
  
end;

initialization
  {$I unit1.lrs}

end. 

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


Re: [lazarus] SQL Statement

2006-03-17 Thread Graeme Geldenhuys
There is no problem with the error message. Did a quick test and it returns
Cannot open a non-select statement - so all is fine.

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] 'Find in Files enhancements

2006-03-17 Thread Graeme Geldenhuys
On 3/16/06, Alexandre Leclerc [EMAIL PROTECTED] wrote:
 This is a very funny one from microsoft. The user interface (explorer)
 will not let you do this... but the API will let you do it! So
 programatically, you can do it. Try to figure that out. :)

How weird is that!  :-)

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] SQL Statement

2006-03-17 Thread Panagiotis Sidiropoulos
Thank you for your time and directions.
Guidelines provided by you are very important to me and will be followed. 
I totally agree with you and I believe I respect members, I first dig into 
information resources on the net before bother list members, check list 
archive, but sometimes do not compose query effectively. Please give people 
time to learn and improve themselves, don't shoot :-).

Cause now I still don't know if it's a bug or not.

No, it is not a bug. Non-Select statements need .ExecSQL method, not .open. I 
had a couple of replies on this, tested and confirmed.

Regards,
Panagiotis

-Original Message-
From: Joost van der Sluis [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 16, 2006 1:03 PM
To: lazarus@miraclec.com
Subject: Re: [lazarus] SQL Statement


What I missed in this question, and the one before, is the error-message you've 
got. It should be: 'Cannot open a non-select statement'

If you had asked the question: What do I do wrong when I got: 'Cannot open a 
non-select statement', everyone here with some sql-knowledge would have known 
the answer. Then no other information was even needed, and we didn't have to 
dig into your code, looking at the quotes, wondering what they are and such.

A quote from the link i've send:
-
Q:
My {program, configuration, SQL statement} doesn't work
A:
This is not a question, and I'm not interested in playing Twenty Questions to 
pry your actual question out of you — I have better things to do. On seeing 
something like this, my reaction is normally of one of the following:

  * do you have anything else to add to that?

  * oh, that's too bad, I hope you get it fixed.

  * and this has exactly what to do with me?
-

Next time, describe accurately what happens. Cause now I still don't know if 
it's a bug or not. Can you tell me if the program gave the error i told about 
above? If not, it's a bug. If it does, I need to clarify the error-message a 
bit.

On Wed, 2006-03-15 at 22:32 +, Panagiotis Sidiropoulos wrote:
 It is not my intention being irritating, on the contrary. Composing 
 this post I thought that subject was describing the problem, focusing 
 on the SQL statement syntax and not to the code. I apologise. Your 
 answer gives me the impression that you are tired reading this kind of 
 not well described posts from me. I do not feel this is true, I only 
 had another such comment once at the past in a case not more 
 information was available than provided.
 
 What I can promise is to try harder and read url with directions 
 suggested. I also ask you to be patient in such cases, you see it is 
 an international meeting point at which people with different cultures 
 meet communicating in English, not mother language for many of us.
 
 So, please let me provide full code. While executing, code exit at 
 .open point. Trying a test SELECT statement it is OK. If you can think 
 anythink to direct me where to search it would be most helpful to me.
 
 // update ID data
 function mgspsUpdateIDData: integer;
 var
nLicensesLeft: integer;
cCustID: string;
 
 begin
  // update
  Result := MGSPS_ERROR_UPDATE_FAILED;
  nLicensesLeft :=
 SQLQuery.FieldByName( 'ids-licenses-left' ).AsInteger - 1;
  cCustID := SQLQuery.FieldByName( 'ids-internet-id' ).AsString;
  SQLQuery.Close;
  SQLQuery.SQL.Clear;
  SQLQuery.SQL.Add( 'update `ids-aa`' );
  SQLQuery.SQL.Add( ' set `ids-licenses-left`=1' );
  SQLQuery.SQL.Add( ' where 
 `ids-internet-id`=aa-123456789012345678' );
  SQLQuery.Open;
 
  Result := MGSPS_ALL_OK;
 end;
 
  An why all these quotes arount the field names? Does that even 
  compile?
 
 These quotes are necessary maybe because of field names form, dash 
 character is used separating parts of names making these more 
 readable. I tried it without quotes and had dificulties. This way 
 works fine, I have Select statements executed normally but not this 
 Update which I think is in a general accepted form.
 
 As I wrote on my complementary reply, this is running on Linux using 
 SQLDB components and MySQL database server.
 
 Panagiotis
 
 Στις 15-03-2006, ημέρα Τετ, και ώρα 20:27 +0100, ο/η Joost van der 
 Sluis
 έγραψε:
  This is gettig irritating.
  
  'statement is not accepted'
  
  Is that the error message? 'statement not accepted' You can't expect 
  us to keep answering this kind of questions.
  
  An why all these quotes arount the field names? Does that even 
  compile?
  
  And read this, before you sent another question: 
  www.catb.org/~esr/faqs/smart-questions.html
  
  On Wed, 2006-03-15 at 21:14 +, Panagiotis Sidiropoulos wrote:
   I use following code to update a table. Connection is succesfuly 
   carried out and before this, Select statement executed succesfuly. 
   Problem is that this statement is not accepted. I checked this 
   same statement through an MySQL client and it was executed 
   properly. Can anyone please advise?

Re: [lazarus] Error in wiki (incorrect language)

2006-03-17 Thread Vincent Snijders

Graeme Geldenhuys wrote:

If you go to the Index page and select Lazarus IDE, you would expect
to get to an English language page.  Seeing that all other language
have the title/lang format.

Selecting Lazarus IDE takes you to a Slovensky (sk) language page.



Fixed. The Slovak translator initially named the Slovak translation of 
the Lazarus Tutorial Lazarus IDE. To fix this the page was moved to 
Lazarus Tutorial/sk.


Just now I removed Lazarus IDE which only contained a redirect to 
Lazarus Tutorial/sk.


There is no Lazarus IDE page in the index anymore.

Thanks for reporting.

Vincent.

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


RE: [lazarus] SQL Statement

2006-03-17 Thread Joost van der Sluis
 Cause now I still don't know if it's a bug or not.
 
 No, it is not a bug. Non-Select statements need .ExecSQL method, not .open. I 
 had a couple of replies on this, tested and confirmed.

I'm still curious if you've got the error message 'Cannot open a non-
select statement' or not. (when you're using open)

Joost

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


Re: [lazarus] the DB error - I know what is wrong

2006-03-17 Thread Joost van der Sluis

 I think I have now discovered the error in updating the data on the postgres 
 database.  The sqlquery is passing a bad string to the postgres database 
 engine.  In my case the the following is passed:
 Update arcust set custno = 'BRS', company = 'Blue Ribbon Stairs' where 
 (custno=BRS)
 
 Notice that the BRS lacks single quotes.  It should be (custno='BRS').

Can you add a bug-report for this here
http://www.freepascal.org/bugs/add.php3

Else I might forget to fix it.

 The append works - the insert statement was perfect. 

In the mean time, define a numerical field as the primary key. It's
quite uncommon to use a string-field as the primary key. 

Joost

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


Re: [lazarus] Changing SynEdit

2006-03-17 Thread Mattias Gaertner
On Thu, 16 Mar 2006 18:05:11 -0700
L505 [EMAIL PROTECTED] wrote:

 
Unless you have in depth knowledge about how every bit of ansistring
memory management works, using getmem and freemem and pchars are
simpler, no? Because you are not battling the automatic memory
management. Now, if you are an expert in battling the automatic
memory management maybe you can battle ansistrings enough to be
almost or just as fast as pchars. Is this what we are doing in the
fpc sources? I will have to look, and see.
  
   Yes.
 
  For example: The codetools use ansistrings. Less than 1% use PChars.
  Just avoid the + operator as you would avoid ReAllocMem and StrCopy.
 
 However, string[i] isn't so convenient as the '+' operator because you
 have to think about all your calculations quite a bit. Really string[i] is
 smart pchars.
 
 Stringbuffer type would allow you to use the + operator and eat your cake
 too, because every time you use the + operator the getmem() is not called.

Yes, for the price of memory overhead. 

 
 Further benefits of StringBuffer type will have to be explored - at this
 point it does'nt have enough benefits to be justified since you can just
 get along with string[i].

If there would be a capacitated string type, I would use it. Of course it
should work as a string. At least reference counted, :=, +, System.Pos,
copy, length, setlength, uniquestring.
And even nicer: the implicit uniquestring on s[]:= and the implicit
exception frames. But this requires compiler magic.


Mattias

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


RE: [lazarus] SQL Statement

2006-03-17 Thread Panagiotis Sidiropoulos
I'm still curious if you've got the error message 
'Cannot open a non- select statement' or not. 
(when you're using open)

Νο, I did not get such message.
Just a while ago, Graeme replied reporting this message Cannot open a
non-select statement which made me wonder why I did not, so, checked
again my application and relized that my function is called from inside
a try..end structure which is not ready to handle exceptions. This
simple thing started all this conversation, blame me. Now I'm seeking to
find how to handle exceptions my own.

Did you realy think that I could bother list members with such a
question if getting this clear message from my application? :-)

Panagiotis

-Original Message-
From: Joost van der Sluis [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 17, 2006 12:33 PM
To: lazarus@miraclec.com
Subject: RE: [lazarus] SQL Statement


 Cause now I still don't know if it's a bug or not.
 
 No, it is not a bug. Non-Select statements need .ExecSQL method, not 
 .open. I had a couple of replies on this, tested and confirmed.

I'm still curious if you've got the error message 'Cannot open a non-
select statement' or not. (when you're using open)

Joost

_
 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] TPageControl

2006-03-17 Thread Micha Nelissen

m2 wrote:
procedure TPrimoForm.BookChanging(Sender: TObject; var AllowChange: 
Boolean);

begin
  if FTaskRunning then AllowChange := false;
end;

doesn't work as it does with Delphi.

Is it a normal behaviour (i.e., is the Lazarus TPageControl type
different from the Delphi one) or is it a bug?


A bug. Please report.

Micha

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


[lazarus] Size of Executable on Win32

2006-03-17 Thread Sergio X
Hi list. I'm new lazarus user. I think lazarus is a great tool. But I have some questions:

1) On Win32 the executable has 5 - 6 Mb for a simple program (the program don't have any code, only the main window). There are some configuration for reduce the size of the executable?
2) How can write components? I search in new project menu, but I can´t find the option to start write.

Very thank's.


Re: [lazarus] Size of Executable on Win32

2006-03-17 Thread Vincent Snijders

Sergio X wrote:
Hi list. I'm new lazarus user. I think lazarus is a great tool. But I 
have some questions:
 
1) On Win32 the executable has 5 - 6 Mb for a simple program (the 
program don't have any code, only the main window). There are some 
configuration for reduce the size of the executable?


http://wiki.lazarus.freepascal.org/index.php/Lazarus_Faq#Why_are_the_generated_binaries_so_big.3F

Vincent

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


Re: [lazarus] Size of Executable on Win32

2006-03-17 Thread Adrian Maier
On 3/17/06, Sergio X [EMAIL PROTECTED] wrote:

 Hi list. I'm new lazarus user. I think lazarus is a great tool. But I have
 some questions:

 1) On Win32 the executable has 5 - 6 Mb for a simple program (the program
 don't have any code, only the main window). There are some configuration for
 reduce the size of the executable?

There is a utility (called strip) that you can use to remove the
debugging information,
which reduces the executable size.

You can find information about this here:
http://wiki.lazarus.freepascal.org/index.php/File_size_and_smartlinking


 2) How can write components? I search in new project menu, but I can´t find
 the option to start write.

I am a newbie, too .  Perhaps others can answer you.


Cheers,
Adrian Maier



Adrian Maier

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


Re: [lazarus] compiling lazarus from the SVN

2006-03-17 Thread Burkhard Carstens
 I you talk about the link stage failing then maybe this can help:
 (Don't know which dist you are using. I'm on opensuse 10.0)
 Create a link from libglib-1.2.so.0.0.10 (or something equal) to
 libglib.so. Under suse this is in /opt/gnome/lib.
 You need this link for glib-1.2 not glib-2.

Just for the records:
On my suse 10.0, there is libglib.so - libglib-1.2.so.0.0.10.
There is another link libglib-2.0.so - libglib-2.0.so.0.800.1.

AFAIK, I didn't do that, i.e. it's default.

BTW.: I don't have the Can't find unit glib problem ..

Burkhard

ps. Uwe: Sorry for the pm, got the wrong button ..

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


Re: [lazarus] Size of Executable on Win32

2006-03-17 Thread Sergio X
Kool. Very thanks.
2006/3/17, Mattias Gaertner [EMAIL PROTECTED]:
On Fri, 17 Mar 2006 14:33:43 +0200Adrian Maier 
[EMAIL PROTECTED] wrote: On 3/17/06, Sergio X [EMAIL PROTECTED] wrote:   Hi list. I'm new lazarus user. I think lazarus is a great tool. But I
  have some questions:   1) On Win32 the executable has 5 - 6 Mb for a simple program (the  program don't have any code, only the main window). There are some  configuration for reduce the size of the executable?
 There is a utility (called strip) that you can use to remove the debugging information, which reduces the executable size. You can find information about this here: 
http://wiki.lazarus.freepascal.org/index.php/File_size_and_smartlinking  2) How can write components? I search in new project menu, but I can´t
  find the option to start write. I am a newbie, too .Perhaps others can answer you.http://wiki.lazarus.freepascal.org/index.php/Lazarus_Packages#Quick_Start
Mattias_To unsubscribe: mail [EMAIL PROTECTED] with unsubscribe as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] another newbie ? on DB

2006-03-17 Thread Alexandre Leclerc
On 3/16/06, Joost van der Sluis [EMAIL PROTECTED] wrote:
  Just a question like this are you using a SQLQuery to get your
  information and display it? If yes, (from Delphi experience), you
  can't commit like that the changes. In Delphi the programmer required
  to use another object... a kind of SQLCommit (???) object and define
  there the required SQL commands to send the updates and other actions.

 The SQLQuery component wich comes with SQLDB has that functionality
 internally. If PaseSQL is True, then it tries to create some update-
 queries if ApplyUpdates is called. This can be done using the primary
 key, or bu using all fields in the where part of the update statement.

Nice, I didn't know that. Thanks.

--
Alexandre Leclerc

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


Re: [lazarus] [patch] doceditor

2006-03-17 Thread Alexandre Leclerc
On 3/17/06, Graeme Geldenhuys [EMAIL PROTECTED] wrote:
 On 16/03/06, Alexandre Leclerc [EMAIL PROTECTED] wrote:
  I usually use this folder in my projects to put units... and a /bin
  for executables, and /dcu for compiled objects... (comming from
  delphi).. but I would have use something like /ppu for lazarus... for
  ppu and o... but this is your patch, not mine! :)

 Under Delphi, I used to use _dcu, but thought that wouldn't be
 appropriate for Lazarus, so used units.  Hey, if we can come up with
 a better name it would be no problem changing the patch.  :)

Well, you know, we could waste hours and create a full thread on the
issue... all that for a small folder name. Make it a standard; the
moment there is no confusion, it's good enought for me. ;)

Regards!

--
Alexandre Leclerc

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


Re: [lazarus] the DB error - I know what is wrong

2006-03-17 Thread johnf
On Friday 17 March 2006 02:44, Joost van der Sluis wrote:
  I think I have now discovered the error in updating the data on the
  postgres database.  The sqlquery is passing a bad string to the postgres
  database engine.  In my case the the following is passed:
  Update arcust set custno = 'BRS', company = 'Blue Ribbon Stairs' where
  (custno=BRS)
 
  Notice that the BRS lacks single quotes.  It should be (custno='BRS').

 Can you add a bug-report for this here
 http://www.freepascal.org/bugs/add.php3

 Else I might forget to fix it.

  The append works - the insert statement was perfect.

 In the mean time, define a numerical field as the primary key. It's
 quite uncommon to use a string-field as the primary key.

 Joost
Thank you for your help in this matter.  Now that someone has taken the time 
to explain the workings of the SQLdb I think I understand.  I will transfer 
my knowledge to the wiki.  It has been years since I have had such a learning 
experience.  I had to learn how to turn on a postgres log (only 10 mintues).  
But the real fun was reading so many Delphi articles.  In reflection I think 
not one article applies to Lazarus.  Maybe Pascal in general.

BTW:
The reason I used char as the data type of the primary key was because all the 
tables have the OID turned on.  A OID is a self regulating field 
(serial,sequence).  So I thought I was avoiding the requirement of using 
nextval() for inserts.  Also as a primary key using the char for custno 
solved the user issues of trying to remember numbers instead of strings.  
'BRS123' is an easy lookup for 'Blue Ribbon Stairs' for example verus 
'123897' and faster that typing 'Blue Ribbon Stairs'. I could also use the 
serial data type as a column with similar results. 

I hope the bug will be fixed very soon.  I, of course need it.  You might want 
to look at the blob issue too.

John 

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


Re: [lazarus] TPageControl

2006-03-17 Thread m2

Micha Nelissen a écrit :

m2 wrote:
procedure TPrimoForm.BookChanging(Sender: TObject; var AllowChange: 
Boolean);

begin
  if FTaskRunning then AllowChange := false;
end;

doesn't work as it does with Delphi.

Is it a normal behaviour (i.e., is the Lazarus TPageControl type
different from the Delphi one) or is it a bug?


A bug. Please report.


I cannot. Each time I try to enter a password (+confirm) and I click
on Update User, the program answers :

  APPLICATION ERROR #12

  This account is protected. You are not allowed to access this until
  the account protection is lifted.

?

mm

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


Re: [lazarus] graphical shapes library or component

2006-03-17 Thread Danny Milosavljevic
Hi,

Am Freitag, den 10.03.2006, 10:17 -0600 schrieb Matt Henley:
 A question on this one... once diacanvas wrapped qtk2q is working for
 lazarus.. would this be cross platform, say for Windows and OSX?

in the sense of works-out-of-the box: no.

It is as cross-platform as gtk+ 2 is. 
Currently that is:
- preinstalled on all end-user Desktop GNU/Linux distributions 
- needs to be installed on MS Windows (note that Novell improves MS
Windows support, so it's good and getting better and better)
- needs to be installed on MacOS X and runs with the X server thing they
provide (only)

I repeat: It is NOT cross platform as in works-immediately-everywhere :)

Hope that helps.

cheers,
  Danny

 
 
 On 3/3/06, Danny Milosavljevic [EMAIL PROTECTED] wrote:
  Hi,
 
  Am Montag, den 27.02.2006, 20:08 +0100 schrieb Marc Santhoff:
   Hi,
  
   is anoyone aware of a library or a (set of) componet(s) for pitchforking
   around some shapes, rectangles, elipses and the like and for creating
   connectors between this shapes?
  
   Of course it should be easily usable with fpc and lazarus. I'm searching
   for the basic things making up a graphical editor.
 
  diacanvas, wrapped for pascal with
  http://developer.berlios.de/projects/gtk2q/ . Last time I tried (a month
  or two ago) the compiler still had a problem with inter-package unit
  checksums (diacanvasq uses gtk2q, but when _it_ tries to use the gtk2q
  units it brags about checksum failure, so you could not use diacanvasq,
  only gtk2q directly) ... I kind of got demotivated/sidetracked, thus.
  Feel free to try again now.
 
  Now if you need a canvas to work with non-gtk stuff then the above would
  be a bad choice :)
 
  I don't know any VCL/FCLish canvas thingie.
 
  cheers,
Danny
 
 
  _
   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
 

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


[lazarus] Report Generator

2006-03-17 Thread Sergio X
Hi list:
I'm new in Lazarus. Is great. There are some components to make databasereports, like reportman, Cristal Reportsor someone like this?
Thank's 


Re: [lazarus] Wiki

2006-03-17 Thread Darius Blaszijk

On 3/15/06, Darius Blaszijk [EMAIL PROTECTED] wrote:

I'm not shure, but I guess that the contents will not be changing so much
anymore for the widgets. Only once in a while some components get done. 
So
you need to change text and style of the cell, hardly difficult to 
maintain

I think.


Well, to start with, the current contents are completely wrong. I just
put anything to start with. They need to be changed to the real
values.

Also, I am not talking about the work of adding new widgets, but
rather the work of adding the ones that exist now and also of the work
of changing the style. Let's say we decide that another yellow is
better. The work to change all cells is huge. I think there is a
better way to do that table.
It's not huge, just a replace text by another text, which can be done in any 
texteditor.


If it's not too much trouble you can adjust the stylesheet, but the work 
for

maintaining will be more or less the same, so why bother changing.


Why it will be the same? With a style you only change on one place and
it affects all cells of that style. Without it you need to manually
edit all of them.
What is the difference between the current class=whatever you need to 
add per cell or the setting of the color which was done previously? I really 
don't see any difference (unless you center your text or do any other 
stuff).
Like said, I don't oppose but don't see why bother when the number of 
characters needed to setup the table is still the same, nothing changed IMO.



I think we could have 4 styles:

* Green #88ff88 - Working
* Yellow #88 - Partially Implemented (Is there a shorter word for
that?). I added this because In Progress indicated that someone is
working on it, but there are some widgets that are partially
implemented and no one is working on it.
* Red #ff - Not Implemented
* Blue #ff - In Progress

Those are background colors and I think that the style should also set
the contents of the cell to be centralized.

thanks a lot,
--
Felipe Monteiro de Carvalho

_
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] Wiki

2006-03-17 Thread Felipe Monteiro de Carvalho
On 3/17/06, Darius Blaszijk [EMAIL PROTECTED] wrote:
 Like said, I don't oppose but don't see why bother when the number of
 characters needed to setup the table is still the same, nothing changed IMO.

There is also the code to centralize each cell.

IMHO the current version looks much cleaner then adding code for each cell.

--
Felipe Monteiro de Carvalho

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


Re: [lazarus] Wiki

2006-03-17 Thread Vincent Snijders

Darius Blaszijk wrote:

On 3/15/06, Darius Blaszijk [EMAIL PROTECTED] wrote:

I'm not shure, but I guess that the contents will not be changing so 
much
anymore for the widgets. Only once in a while some components get 
done. So
you need to change text and style of the cell, hardly difficult to 
maintain

I think.



Well, to start with, the current contents are completely wrong. I just
put anything to start with. They need to be changed to the real
values.

Also, I am not talking about the work of adding new widgets, but
rather the work of adding the ones that exist now and also of the work
of changing the style. Let's say we decide that another yellow is
better. The work to change all cells is huge. I think there is a
better way to do that table.


It's not huge, just a replace text by another text, which can be done in 
any texteditor.


If it's not too much trouble you can adjust the stylesheet, but the 
work for

maintaining will be more or less the same, so why bother changing.



Why it will be the same? With a style you only change on one place and
it affects all cells of that style. Without it you need to manually
edit all of them.


What is the difference between the current class=whatever you need 
to add per cell or the setting of the color which was done previously? I 
really don't see any difference (unless you center your text or do any 
other stuff).
Like said, I don't oppose but don't see why bother when the number of 
characters needed to setup the table is still the same, nothing changed 
IMO.


Centering the text and adding a padding was easier now.

Vincent

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


Re: [lazarus] Report Generator

2006-03-17 Thread Graeme Geldenhuys
There is LazReport.  I also heard there are talks about getting
ReportMan to compile under Free Pascal.  The other option is to
generate XML or HTML files.  You can also use RTF files as templates
and launch something like OpenOffice to view the populate RTF file.

Regards,
  - Graeme -


On 17/03/06, Sergio X [EMAIL PROTECTED] wrote:
 Hi list:
 I'm new in Lazarus. Is great. There are some components to make database
 reports, like reportman, Cristal Reports or someone like this?
 Thank's


--
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] Qt graphics patch

2006-03-17 Thread Mattias Gaertner
On Thu, 16 Mar 2006 21:25:42 -0300
Felipe Monteiro de Carvalho [EMAIL PROTECTED] wrote:

 Hello,
 
 The attached patch adds initial support for:
 
 * TBitmap
 * TComboBox
 
 I also attempted to add support for custom drawn components that descend 
 from TCustomControl, but it isn't complete yet.
 
 Also the bindings were updated to version 1.0.10

Applied. Thanks.

Mattias

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


Re: [lazarus] [patch] doceditor

2006-03-17 Thread Mattias Gaertner
On Thu, 16 Mar 2006 16:24:12 +0200
Graeme Geldenhuys [EMAIL PROTECTED] wrote:

 Hi,
 
 I attached a patch for the doceditor.  It must be applied from the
 /Lazarus directory.
 
 Changes:
 1)  Fixed the Close button's Anchor properties in the About Form.
 When you resized the form, the button resized as well.
 2)  Resized the about form, so that the text regarding the copyright
 fits into the window without clipping.
 3)  Changed the Project Options of the lazde.lpi so that session
 information is stored in the .lps file and not the .lpi file.
 4)  Added a Custom Compile option -FUunits, which places all
 compiled units (.ppu, .o, etc) file into a units directory, instead
 of in the same directory as the source.  Note a units directory
 needs to be added to the /doceditor directory.  I couldn't get svn to
 generate a patch for that!

Thanks. Applied.
I removed the custom option and set the output directory.

 
 If it is a problem having all the changes in a single .patch file, I
 can post them as seperate files if needed.


Mattias

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


Re: [lazarus] uninstalling a package

2006-03-17 Thread Mattias Gaertner
On Wed, 15 Mar 2006 21:19:17 +0200
Graeme Geldenhuys [EMAIL PROTECTED] wrote:

 On 3/15/06, Mattias Gaertner [EMAIL PROTECTED] wrote:
  Can you give more details, how to reproduce the last paragraph?
 
 I think I managed to figure this out.  Maybe my previous email was a
 bit vague.  I was referring to the list of packages you see in the
 Installed Packages  screen in the Available packages listbox
 (Components = Configure Installed Packages).
 
 See, I had a runtime only package with the name tiOPF2.lpk which I
 then copied and renamed to tiOPF.lpk (and use the version info set to
 2).  I used tiOPF2.lpk in one of my projects.  I then changed to use
 the tiOPF.lpk package, but the tiOPF2 package was still available in
 the Installed Packages - Available Packages screen and in the New
 Requirements combobox.
 
 I later found out, that if I deleted the unwanted .lpk file, that it
 automatically disappears from the Available Packages list.   I just
 thought there was some uninstall option or something - didn't think a
 simple delete would do the trick. :-)

The 'available packages' list shows all known packages (i.e. package links).
Not only the open, installed, used.
The IDE removes the links only when the file vanishes from disk or a package
with the same name and version is opened.
I'm still not sure, how to reproduce the bug. 

 
   Opening the old package in Lazarus and selecting the More... button
   shows the Uninstall option, but it is greyed out.
 
  Is it installed?
 
 It was a runtime only package, with no components, so I guess the
 Uninstall option wasn't needed, hence the reason it was greyed out. 

If it is installed, it should be possible to uninstall it. The only
exceptions are the the IDE autocreated packages lcl, synedit, ideintf.


 The packages was used to group file to be used in another project, not
 to extend Lazarus, or add component to the palette.

That's a pretty normal use of a package.


Mattias

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


Re: [lazarus] patch fo tLabel

2006-03-17 Thread Mattias Gaertner
On Tue, 14 Mar 2006 18:21:32 +0100
darekm [EMAIL PROTECTED] wrote:

 tLabel should care about WordWrap property
 
 attached patch repair it

Thanks. Applied.

Mattias

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