[lazarus] 'Find in Files enhancements

2006-03-16 Thread Graeme Geldenhuys
Hi,

I am thinking of enhancing the Find in File search and add a new
option under Include sub directories in the lines of Ignore hidden
directories.

The reason for this is, I often search the Lazarus and FPC directories
for certain text inside a file, and then it starts searching inside
the .svn folder as well (which make the search much slower).

The only thing I am not sure how te handle, is on the Windows
platform.  Do we treat dot  directories on Windows as hidden, or
should we query the directory attributes?  Can you actually create a
directory on Windows with a dot in the front?

Regards,
  - Graeme -

_
 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-16 Thread Vincent Snijders

Graeme Geldenhuys wrote:

Hi,

I am thinking of enhancing the Find in File search and add a new
option under Include sub directories in the lines of Ignore hidden
directories.



Good idea.



The reason for this is, I often search the Lazarus and FPC directories
for certain text inside a file, and then it starts searching inside
the .svn folder as well (which make the search much slower).


I didn't notice this problem, as long as you didn't actually search into 
those files, but skip them because of the file mask.




The only thing I am not sure how te handle, is on the Windows
platform.  Do we treat dot  directories on Windows as hidden, or
should we query the directory attributes?  


I think you should query the attribute.


Can you actually create a
directory on Windows with a dot in the front?


Yes, you can create such directories, look at the (hidden) .svn 
directory :-).


Vincent

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


Re: [lazarus] No thread support error

2006-03-16 Thread Graeme Geldenhuys
Thanks!

G.


On 3/16/06, Vincent Snijders [EMAIL PROTECTED] wrote:
 Graeme Geldenhuys wrote:
 program Browser;
 
 {$mode objfpc}{$H+}
 
 uses
  {$IFDEF UNIX}{$IFDEF UseCThreads}
 
 The is part of the Lazarus Application template for the lpr file..
 
 Packages requiring threading can add -dUseCThreads to their Usages options, 
 so that
 the cthreads unit will be added on unix.
 
 
 
  What about applications?  Do I need to specify the -dUseCThreads
  option for applications as well, or does Lazarus automatically add it
  in somewhere?

 If you create your own threads and you don't put the unit that creates
 the threads in a package, then you should add the CTHreads unit yourself
 on *nix. If you used this template you can do this by adding
 -dUseCThreads to the custom compiler options.

 Vincent.

 _
  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] [patch] docs - ActionList

2006-03-16 Thread Graeme Geldenhuys
Hi,

Attached is a patch for the docs regarding the actnlist.xml file.  If
fixes a few spelling mistakes and better grammar.  The patch needs to
be applied from the /Lazarus directory.

Regards,
  - Graeme -
Index: docs/xml/lcl/actnlist.xml
===
--- docs/xml/lcl/actnlist.xml	(revision 8940)
+++ docs/xml/lcl/actnlist.xml	(working copy)
@@ -733,9 +733,9 @@
 shortA generic class for all Action components/short
 descrTCustomAction is a generic class for all components that represent actions that can be be set on the user interface for buttons and other controls. TCustomAction is the ancestor for TAction. If you want to define your own action class, you should use this class to derive it from.
 
-TActionList, TAction, TActionLink and TContainedAction are used to centralize the implementation of user commands, and can then be linked to the apropriete button, menu or another component. This an Object-Oriented programming strategy to reuse the code, as oposed to the Event-Oriented approach of writing an OnClick event for each component.
+TActionList, TAction, TActionLink and TContainedAction are used to centralize the implementation of user commands, and can then be linked to the appropriate button, menu or another component. This is an Object-Oriented programming strategy to reuse code, as opposed to the Event-Oriented approach of writing an OnClick event for each component.
 
-You can set an action for a component using the Component Inspector./descr
+You can assign a action to a component by using the Object Inspector./descr
 seealso
   link id=TAction/
 /seealso


[lazarus] TDateTimePicker

2006-03-16 Thread Andreas Berger
I can't seem to find an equivelant to Delphi's TDateTimePicker in 
Lazarus. Is there anything similar? A dropdown list that opens the calandar?


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


[lazarus] another newbie ? on DB

2006-03-16 Thread johnf
Hi,

Thanks all for the recent help.  I am now able to retreive data without any 
trouble (so far).  And using a dataset allows the data aware controls to 
display data but I can't save the edit fields (even if I tab off the 
control).  Everything I've read suggest that I need to set the 
'datasource1.edit:=True' and the 'readonly' property to false for controls - 
to allow editing and saving (Update table).  But when I attempt to save a 
record I get no error message but I also have no record changes.  My postgres 
log has a rollback as the last statement.  But I also don't see an update 
statement.  So I guess I'm missing a step (of course I could be missing the 
entire concept).

In a save button click I have the following code:
 datasource1.dataset.UpdateRecord;
 datasource1.dataset.Post;

What am I doing wrong? 

thanks in advance

John

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


Re: [lazarus] TDateTimePicker

2006-03-16 Thread Michael Van Canneyt


On Thu, 16 Mar 2006, Andreas Berger wrote:

 I can't seem to find an equivelant to Delphi's TDateTimePicker in Lazarus. Is
 there anything similar? A dropdown list that opens the calandar?

Ehm?!

What about TDateEdit on the 'Misc' tab ?

Michael.

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


Re: [lazarus] [patch] docs - ActionList

2006-03-16 Thread Vincent Snijders

Graeme Geldenhuys wrote:

Hi,

Attached is a patch for the docs regarding the actnlist.xml file.  If
fixes a few spelling mistakes and better grammar.  The patch needs to
be applied from the /Lazarus directory.



Thanks. Applied.

Vincent.

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


Re: [lazarus] TPageControl

2006-03-16 Thread m2

Lepidosteus a écrit :
If you find no clean way of doing it, using OnChange to set back the 
page the user should watch should be okay.

I know it's not a clean way, but it at least it's working.


Thanks but I cannot use this. Two of the pages of the TPageControl
are dialog boxes that are initialized when opening a page [*], so the
program would re-initialize a dialog box while it is showing the
progress of a running task (this is even worst than that, some global
variables are also re-initialized).

[*] A snapshot of Primo - compiled with Delphi 5 under Win98 - can be
seen at http://www.ellipsa.net/primo/index.html )

Yesterday, I had a glance on the Lazarus source and I don't understand
why setting AllowChange to false doesn't lock the TPageControl. It
inherits from TCustomNoteBook and TCustomNoteBook.CanChangePageIndex
calls OnChanging (when assigned, of course). Maybe a mouse click on a
tab is such that CanChangePageIndex is never called (?)

mm

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


[lazarus] [patch] doceditor

2006-03-16 Thread Graeme Geldenhuys
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!


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

Regards,
  - Graeme -
Index: doceditor/frmabout.lfm
===
--- doceditor/frmabout.lfm	(revision 8940)
+++ doceditor/frmabout.lfm	(working copy)
@@ -1,302 +1,59 @@
 object AboutForm: TAboutForm
+  ActiveControl = Button1
   BorderStyle = bsDialog
   Caption = 'About this application'
   ClientHeight = 299
-  ClientWidth = 400
+  ClientWidth = 529
   PixelsPerInch = 90
   Position = poMainFormCenter
-  HorzScrollBar.Page = 399
+  HorzScrollBar.Page = 528
   VertScrollBar.Page = 298
   Left = 333
   Height = 299
   Top = 149
-  Width = 400
+  Width = 529
   object LThisApplication: TLabel
-BorderSpacing.OnChange = nil
 Caption = 'Lazarus Documentation Editor'
 Color = clNone
+ParentColor = False
 Left = 16
-Height = 12
+Height = 17
 Top = 8
-Width = 167
+Width = 220
   end
   object LCopyRight1: TLabel
-BorderSpacing.OnChange = nil
 Caption = 'This application is (c) by  Michael Van Canneyt and the Lazarus team'
 Color = clNone
+ParentColor = False
 Left = 16
-Height = 12
+Height = 17
 Top = 48
-Width = 393
+Width = 503
   end
   object LCopyRight2: TLabel
-BorderSpacing.OnChange = nil
 Caption = 'It is released under the terms of the  GENERAL PUBLIC LICENSE:'
 Color = clNone
+ParentColor = False
 Left = 16
-Height = 12
+Height = 17
 Top = 64
-Width = 368
+Width = 491
   end
   object Button1: TButton
-Anchors = [akTop, akLeft, akRight, akBottom]
-BorderSpacing.OnChange = nil
+Anchors = [akRight, akBottom]
+BorderSpacing.InnerBorder = 2
 Cancel = True
 Caption = 'Close'
 Default = True
 ModalResult = 1
 TabOrder = 0
-Left = 312
+Left = 423
 Height = 24
 Top = 264
-Width = 75
+Width = 90
   end
   object MCopyRight: TMemo
 Anchors = [akTop, akLeft, akRight, akBottom]
-BorderSpacing.OnChange = nil
-Lines.Strings = (
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-  
-)
 ReadOnly = True
 ScrollBars = ssBoth
 TabOrder = 1
@@ -304,6 +61,6 @@
 Left = 16
 Height = 175
 Top = 80
-Width = 368
+Width = 497
   end
 end
Index: doceditor/frmabout.lrs

Re: [lazarus] Version Information: your comments please

2006-03-16 Thread Marc Weustink

Jouke Rensma wrote:
I've sent the mail below earlier but apparantly it did not make it. 
Maybe due to the attachements? I now zipped them into one (smaller) file.

---
Hi all,
After some strugling, re-doing and starting from scratch again, I 
managed to

get the version information hooked into the compile process. With several
things still to do (see below), now I would like to know:
- Am I on the right track?
- Have I hooked in on the right places?
- Where did I go wrong, and where not?



I had a quick look at the code and it looked OK. However IMO the 
W32VersionInfo unit doesn't belong there.
I don't see a problem with having a TVersionInfo class generating a .rc 
file for every platform. Then in some pre/post build step some .rc 
compiler can per platform:

 * compile a .res to be linked in or put it in an exe
   direclty (win32)
 * generate/edit a Info.plist and/or setup resource in the
   project.app dir (OSX)
 * maybe do something (some other platform)

Marc

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


Re: [lazarus] Making an installer

2006-03-16 Thread Tony Maro
bobby wrote:
 I want to include an exe, a html file, and two pictures into my
 exe-file done in Lazarus.
 The question is: if I include those 4 files into resources, and link
 them into my exe-file, how can I save them back to HDD from already
 linked executable?
 To make the clear picture, all of you know what NSIS installer or Inno
 setup does, how can I make the same thing?
 I simply want that my exe create/save other files (that are in
 resources, linked into running exe) at the runtime.

Instead, load the extractor into a TMemoryStream, attach streams of the
resources to the end of it, then add pointers to the end of that to the
start location of each resource.   Have the main extractor read itself
into a filestream, get the pointers for each individual resource, and
extract them back out.

Pretty simple actually, and appending to the end of the main file
doesn't break the executable.

-Tony

_
 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-16 Thread Alexandre Leclerc
On 3/16/06, johnf [EMAIL PROTECTED] wrote:
 Hi,

 Thanks all for the recent help.  I am now able to retreive data without any
 trouble (so far).  And using a dataset allows the data aware controls to
 display data but I can't save the edit fields (even if I tab off the
 control).  Everything I've read suggest that I need to set the
 'datasource1.edit:=True' and the 'readonly' property to false for controls -
 to allow editing and saving (Update table).  But when I attempt to save a
 record I get no error message but I also have no record changes.  My postgres
 log has a rollback as the last statement.  But I also don't see an update
 statement.  So I guess I'm missing a step (of course I could be missing the
 entire concept).

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.

I can't help any more because I never used that thechnique and data
aware controls when working in SQL. (Maybe I should have.)

Regards.

--
Alexandre Leclerc

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


Re: [lazarus] Wiki

2006-03-16 Thread Felipe Monteiro de Carvalho
On 3/16/06, Vincent Snijders [EMAIL PROTECTED] wrote:
 I have added a td.working style to the css file.

 td.working {
 background-color:#88ff88;
 }

I think we can also have:

* td.partial #88 - for Partially Implemented
* td.not #ff - Not Implemented
* td.progress #ff - In Progress

Can you also make them centralize the text?

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

2006-03-16 Thread Vincent Snijders

Felipe Monteiro de Carvalho wrote:

On 3/16/06, Vincent Snijders [EMAIL PROTECTED] wrote:

I think we can also have:

* td.partial #88 - for Partially Implemented
* td.not #ff - Not Implemented
* td.progress #ff - In Progress

Can you also make them centralize the text?



Done.

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-16 Thread Joost van der Sluis
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?
 
   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' );
   showmessage( SQLQuery.SQL.Text );
   SQLQuery.Open;
   
   I also tested this statement a one line setting this to .text property.
   
   Panagiotis
   
   _
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 

Re: [lazarus] 'Find in Files enhancements

2006-03-16 Thread Alexandre Leclerc
On 3/16/06, Graeme Geldenhuys [EMAIL PROTECTED] wrote:
 should we query the directory attributes?  Can you actually create a
 directory on Windows with a dot in the front?

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. :)

--
Alexandre Leclerc

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


Re: [lazarus] Wiki

2006-03-16 Thread Felipe Monteiro de Carvalho
On 3/16/06, Vincent Snijders [EMAIL PROTECTED] wrote:
 Done.

ummm ... the styles don't seam to be working 

please check: 
http://wiki.lazarus.freepascal.org/index.php/Road_To_1.0#Widgetset_dependent_components

thanks,

Felipe

_
 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-16 Thread Joost van der Sluis
 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.

This has to be developed further, it should also be possible that the
programmer provides the an update, delete statement and such. But that
is not implemented yet.

-- 
Met vriendelijke groeten,

  Joost van der Sluis
  CNOC Informatiesystemen en Netwerken
  http://www.cnoc.nl

_
 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-16 Thread johnf
On Thursday 16 March 2006 13:33, Michael Van Canneyt wrote:
 On Thu, 16 Mar 2006, johnf wrote:
  Hi,
 
  Thanks all for the recent help.  I am now able to retreive data without
  any trouble (so far).  And using a dataset allows the data aware controls
  to display data but I can't save the edit fields (even if I tab off the
  control).  Everything I've read suggest that I need to set the
  'datasource1.edit:=True' and the 'readonly' property to false for
  controls - to allow editing and saving (Update table).

 This should be done automatically ?

   But when I attempt to save a
  record I get no error message but I also have no record changes.  My
  postgres log has a rollback as the last statement.  But I also don't see
  an update statement.  So I guess I'm missing a step (of course I could
  be missing the entire concept).
 
  In a save button click I have the following code:
   datasource1.dataset.UpdateRecord;
   datasource1.dataset.Post;

 1. Normally, a simple Post should be enough.
 2. You should commit the transaction when you're completely done.

 Michael.
If I attempt a commit as in:
sqlquery1.sql.text:='commit';
sqlquery1.execsql;
I get a exception : (I para-phase) can't update because dataset is active.
If I 
dataset.close;
then
commit
I get no error message but no update.

So to recap
 datasource1.dataset.UpdateRecord;
  datasource1.dataset.Post;
  datasource1.DataSet.close;
  sqlquery1.sql.Clear;
  sqlquery1.SQL.Text:='commit';
  sqlquery1.ExecSQL
 
 sqlquery1.Close;   

does not work.

BTW have no experience using any recent Delphi.  All that I'm learning is 
through the school of hard knocks (reading articles from google).  But when I 
get this working I will post to the wiki.

John 

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


[lazarus] Because I can't get SQLDB working

2006-03-16 Thread johnf
Hi,
I'm now attempting to get zeoslib working.  After many attempts (lots of 
errors due to sqlite) I got it to compile.  But now I can't get it to install 
as a package.  The first thing is Lazarus can not support dynamic packages.  
Then it starts compiling/rebuilding lazarus  it fails with:
Identifer not found ExtractOptionsFromDPR
opens DelphiProjectLaz.pas
 // TODO: get all compiler options from .lpr
  Result:=ExtractOptionsFromDPR(LPRCode,Project1);
  if ResultmrOk then exit;

I have .13 beta.

John

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


Re: [lazarus] before I go to far with this

2006-03-16 Thread johnf
On Thursday 16 March 2006 14:07, Joost van der Sluis wrote:
 On Wed, 2006-03-15 at 08:13 -0500, Alexandre Leclerc wrote:
  On 3/15/06, Joost van der Sluis [EMAIL PROTECTED] wrote:
   A varchar can hold 2000 characters in sqldb. Postgres supports up to
   8192 characters in a varchar. If you really need 8192 characters, it's
   easy to update sqldb, just set this value on top of db.pp.
 
  I though that there were absolutely no limits in length with a varchar
  that has no limit specifier.
 
  The varchar type is the ideal field for a memo. It take only the
  required length and the overhead is not big. There are also no known
  speed issues on the DB side when working with this type - I asked
  postgres people for that since in many DB there is a speed issue when
  using that kind of fields.

 You are right, I confused PostgreSQL with another DBMS.

 But the limit for a string in sqldb is really there.

 I've changed PQConnection so that a text field is also interpreted as a
 varchar. But I don't agree that you can use this or a varchar like a
 BLOB-field. It's true that they are unlimited, (up to 1 GB) but the
 problem is that they are handled like a normal field. Thus if you do a
 request for a record, the field is send in that request.

 Normally, a BLOB-field is not send with the record, but only if you
 specially ask for the data in the blob.

 SQLDB always buffers all the records. Thus if you have a unlimited
 varchar, sqldb will allocate approximate 2000 (the max) bytes for this
 field for every record. Keep that in mind while you're designing your
 database.

So I can not use a varchar c(8000).  If the limit is 2000 bytes then I can 
only have 1000 chars.  Is that correct?
John

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


Re: [lazarus] Because I can't get SQLDB working

2006-03-16 Thread Joost van der Sluis
 I'm now attempting to get zeoslib working.  After many attempts (lots of 
 errors due to sqlite) I got it to compile.  But now I can't get it to install 
 as a package.  The first thing is Lazarus can not support dynamic packages.  
 Then it starts compiling/rebuilding lazarus  it fails with:
 Identifer not found ExtractOptionsFromDPR
 opens DelphiProjectLaz.pas
  // TODO: get all compiler options from .lpr
   Result:=ExtractOptionsFromDPR(LPRCode,Project1);
   if ResultmrOk then exit;

ATM ZEOS doesn't work very well with Lazarus. This is more a ZEOS issue,
then an fpc-issue. (except for fpc-bug 4510)

And although the problems are easily fixable, they seems to be to hard
for the ZEOS team.

-- 
Met vriendelijke groeten,

  Joost van der Sluis
  CNOC Informatiesystemen en Netwerken
  http://www.cnoc.nl

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


Re: [lazarus] cut and paste on the IDE

2006-03-16 Thread Felipe Monteiro de Carvalho
On 3/16/06, johnf [EMAIL PROTECTED] wrote:
 Hi,
 SUSE 10.0.  It appears that I can not paste anything into the IDE from other
 apps.  i.e. I try to cut and paste a bit of code from the wiki and nothing
 happens.  I also tried to use the menu commands and also nothing occurred.
 My guess it has something to do with me using KDE vs Gnome

It is known that cut-and-paste only work with gtk based app and not
with qt based ones.

You can try to use a helper app to make cut and paste work, like first
paste on gedit and then copy from gedit to lazarus.

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] cut and paste on the IDE

2006-03-16 Thread johnf
On Thursday 16 March 2006 15:44, Felipe Monteiro de Carvalho wrote:
 On 3/16/06, johnf [EMAIL PROTECTED] wrote:
  Hi,
  SUSE 10.0.  It appears that I can not paste anything into the IDE from
  other apps.  i.e. I try to cut and paste a bit of code from the wiki and
  nothing happens.  I also tried to use the menu commands and also nothing
  occurred. My guess it has something to do with me using KDE vs Gnome

 It is known that cut-and-paste only work with gtk based app and not
 with qt based ones.

 You can try to use a helper app to make cut and paste work, like first
 paste on gedit and then copy from gedit to lazarus.

 thanks,
 --
 Felipe Monteiro de Carvalho
That's funny I did try to use an helper app.  But of course I chose the wrong 
one (kate).  

Thanks for the help.
John

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


Re: [lazarus] cut and paste on the IDE

2006-03-16 Thread Felipe Monteiro de Carvalho
On 3/16/06, johnf [EMAIL PROTECTED] wrote:
 That's funny I did try to use an helper app.  But of course I chose the wrong
 one (kate).

Also, cut-and-paste should work with Firefox because it's gtk based.
You are probably using konqueror or another qt based browser

--
Felipe Monteiro de Carvalho

_
 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-16 Thread johnf
On Thursday 16 March 2006 15:30, Joost van der Sluis wrote:
  So to recap
   datasource1.dataset.UpdateRecord;
datasource1.dataset.Post;
datasource1.DataSet.close;
sqlquery1.sql.Clear;
sqlquery1.SQL.Text:='commit';
sqlquery1.ExecSQL
 
   sqlquery1.Close;
 
  does not work.
 
  BTW have no experience using any recent Delphi.  All that I'm learning is
  through the school of hard knocks (reading articles from google).  But
  when I get this working I will post to the wiki.

 The transaction is committed by the command transaction.commit

 For an example, see the fpc-code: fcl/db/sqldb/examples/fedittable.pp

Now I'm getting somewhere.  I getting an error about 'FWR' is not a column. 
The string is the primary key data (pkid = custno data in custno = 'FWR').  
So how do I set the primary key. Or rather where do I set it.  I think I read 
somewhere that I need to set a primary key. 

BTW the file was very helpful. 
to recap (for other newbie's):
use sqlquery to retreive the data
use dataset to post
use sqlquery to applyupdates
use SQLTranaction to commit the data.
 
John 

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


Re: [lazarus] analog meter component wanted

2006-03-16 Thread Marc Santhoff
Am Donnerstag, den 16.03.2006, 16:18 -0700 schrieb L505:

 Hmm I think KOL project (for win32 only) there is one by Thaddy de Koning, 
 maybe
 you could get some ideas from it and convert it to non KOL linux/win32 cross
 platform.
 
 http://members.chello.nl/t.koning8/kol_indicator.jpg
 http://members.chello.nl/t.koning8/kol_gauge.jpg
 http://members.chello.nl/t.koning8/ledladder.jpg

Looks pretty cool.

 Might not be what you are looking for since it is part of KOL and you'd have 
 to
 just get ideas from the code, KOL does work with FPC but of course is not
 related to lazarus so much.

At least I'll read the sources attentively...

I still don't know if I have enough time and motivation for writing such
a component myself (in relation to the benefit of using it).

Thank you,
Marc


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


[lazarus] Qt graphics patch

2006-03-16 Thread Felipe Monteiro de Carvalho

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

thanks,

Felipe


qtgraphics.dif.bz2
Description: application/bzip


Re: [lazarus] another newbie ? on DB

2006-03-16 Thread johnf
On Thursday 16 March 2006 13:48, Joost van der Sluis wrote:
   In a save button click I have the following code:
datasource1.dataset.UpdateRecord;
datasource1.dataset.Post;
 
  1. Normally, a simple Post should be enough.
  2. You should commit the transaction when you're completely done.

 What I also miss is Dataset.Applyupdates
 And offcourse transaction.commit

I don't understand the purpose of the datasource.dataset.  I have been reading 
the examples files from FPC.  In the files they do not use the 
datasource.dataset anywhere.  Does this mean that I'm not suppose to use the 
datasets?  Are the datasets something from Lazarus?  The only information I 
have has to do with stuff I have read from the web (mostly delphi stuff) and 
what little information is available from the wiki.  Could someone explain?  
How does the sqlquery1 know about the changes?  I thought the dataset 
understood the changes?

John

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


Re: [lazarus] Changing SynEdit

2006-03-16 Thread L505

   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.

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


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