Re: [lazarus] New bitmap components dialogs

2007-12-12 Thread wile64
Le 12/12/07, Dominique Louis [EMAIL PROTECTED] a écrit :

 Tres jolie.


 Dominique.


In french great Thanks,

End std palette...

-- 
Laurent.

My Components: http://wiki.lazarus.freepascal.org/Wile64
French Forum : http://lazforum-fr.tuxfamily.org/index.php
attachment: tfinddialog.pngattachment: tfontdialog.pngattachment: treplacedialog.pngattachment: tselectdirectorydialog.png

Re: [lazarus] New bitmap components dialogs

2007-12-12 Thread Paul Ishenin

wile64 пишет:




thanks, commited in r13293

btw, how you want to select which TDataSource to use?

Best regards,
Paul Ishenin.

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


Re: [lazarus] vote for bdd related component icon

2007-12-12 Thread wile64
If I count

*3 votes for tdatasource.png
**4 votes for tdatasource1.png
**6 votes for tdatasource2.png*

I propose a test with discs

-- 
Laurent.

My Components: http://wiki.lazarus.freepascal.org/Wile64
French Forum : http://lazforum-fr.tuxfamily.org/index.php


[lazarus] Making GTK Thread Safe

2007-12-12 Thread Razvan Adrian Bogdan
I've read something interesting in the GTK FAQ, it should be possible
to make GTK apps thread safe if they are setup properly, assuming
there are many multithreaded apps out there, i think this is really
useful, instead of relying on synchronize or simulating Messages Queue
with StringList, one could use CriticalSections with Controls and it
would be really useful if LCL was as thread safe as possible at least
the low level API part such as GTK, of course a full ThreadSafe LCL
would be even better but that would probably require too much work.

http://www.gtk.org/faq/#AEN482

Razvan

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


Re: [lazarus] vote for bdd related component icon

2007-12-12 Thread Razvan Adrian Bogdan
On Dec 11, 2007 2:45 PM, Graeme Geldenhuys [EMAIL PROTECTED] wrote:
 I agree with John's explanation, which is why I vote for
 tdatasource.png.  Trusted and known icon.

Yes, the cylinder (Drum like) icon is good for DB but for Dataset it
should be different and since Delphi has the Arrows and Grid icon, we
should have a similar one i think ...

Razvan

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


Re: [lazarus] Making GTK Thread Safe

2007-12-12 Thread Marc Weustink

Razvan Adrian Bogdan wrote:

I've read something interesting in the GTK FAQ, it should be possible
to make GTK apps thread safe if they are setup properly, assuming
there are many multithreaded apps out there, i think this is really
useful, instead of relying on synchronize or simulating Messages Queue
with StringList, one could use CriticalSections with Controls and it
would be really useful if LCL was as thread safe as possible at least
the low level API part such as GTK, of course a full ThreadSafe LCL
would be even better but that would probably require too much work.


The LCL won't be threadsafe, the overhead isn't worth the gain.

Marc


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


Re: [lazarus] vote for bdd related component icon

2007-12-12 Thread Wanderlan Santos dos Anjos
Me too. The traditional tdatasource.png

On Dec 12, 2007 7:06 AM, Razvan Adrian Bogdan [EMAIL PROTECTED]
wrote:

 On Dec 11, 2007 2:45 PM, Graeme Geldenhuys [EMAIL PROTECTED]
 wrote:
  I agree with John's explanation, which is why I vote for
  tdatasource.png.  Trusted and known icon.

 should have a similar one i think ...

 Razvan


Wanderlan


Re: [lazarus] MySQL Queries using Lazarus

2007-12-12 Thread Joost van der Sluis
Op dinsdag 11-12-2007 om 15:54 uur [tijdzone -0800], schreef el
stamatakos:
 Hi All,
  I have an application that connects to a MySQl database. I have found the 
 only way to get Lazrus to work without giving me an error Cannot access 
 Active DataSet is to do a Clear,Add, Open Close, like below
 
 MainForm.SQLQuery1.SQL.Clear;
 MainForm.SQLQuery1.SQL.Add('SELECT revID from rev WHERE 
 revName='+#39+CBProcessRev.Text+#39);

If you want to save some code, you could replace the lines above with:

Mainform.SQLQuery1.SQL.Text := 'SELECT revID fro..';

Joost


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


Re: [lazarus] Making GTK Thread Safe

2007-12-12 Thread Marc Weustink

Razvan Adrian Bogdan wrote:

On Dec 12, 2007 12:13 PM, Marc Weustink [EMAIL PROTECTED] wrote:

The LCL won't be threadsafe, the overhead isn't worth the gain.


Do you think it's an overhead to use the internal locking mechanism from GTK ?


Not only overhead in gtk widgetset, also in LCL, and aslo in all other 
widgetsets.



I tend to think it's a very light mechanism that you don't even feel
in singlethreaded applications, having a threadsafe LCL means one can
freely code without any headaches from synchronization making the code
look nicer and dramatically cutting developing time, 


If you start to think your design first it won't cut much.


but i do think
it's a lot of code. I tend to think the LCLs overhead comes from using
classes too much in the lower level API abstraction part.


In all my years of delphi threadded app development I never needed 
threadded updates of my gui.



Marc

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


Re: [lazarus] vote for bdd related component icon

2007-12-12 Thread John

wile64 wrote:

If I count

*3 votes for tdatasource.png
**4 votes for tdatasource1.png
**6 votes for tdatasource2.png*

I propose a test with discs

--
Laurent.

My Components: http://wiki.lazarus.freepascal.org/Wile64
French Forum : http://lazforum-fr.tuxfamily.org/index.php 
I don't mind which you use as a dataset base, but the database / dataset 
/ datasource relationship really needs to be maintained.  If you use the 
disks as a database, perhaps you could have a section of the disks 
coloured ( for example ) red to indicate a dataset, ie a selection of 
the database. (No arrows).  You could add the text to show specific 
dataset types, as is done currently.  You then have the same thing with 
the arrows (but not the text) to show a datasource.  Does that make 
sense ?  I can try to draw it if you like, but I am no graphic designer. 

To use one of the suggested icons as a dataset and another as a 
datasource would not keep the relationship at all - they would look like 
alternative ways of performing the same function


cheers,
John Sunderland.

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


Re: [lazarus] MySQL Queries using Lazarus

2007-12-12 Thread John

ik wrote:

One small note, you have an SQL injection at your code. I recommend
you to use parameters as how to add the values, but prior to that, you
should check to see if there are invalid chars, and trim them. That
way, you can avoid a lot of problems.

Ido
  
Perhaps you should explain what is so terrible about a SQL injection 
?  I have heard of this before, but not the reason.  I do this regularly 
and it seems to work fine! 

I am hesitant to recommend parameters in this situation currently.  It 
depends on whether you form everything at run time, in which they are 
probably OK, or try to set it up in Lazarus at design time.  I have had 
problems with parameters set up at design time.  (I am still trying to 
work out exactly what the issue is, or I would have posted something 
about it, but basically they seem to loose their type specifications.  
Of course, I might simply be doing something wrong !).  If Lefti is just 
writing his first few queries, what he is doing is probably a good way 
to get the hang of it.


cheers,
John Sunderland

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


Re: [lazarus] MySQL Queries using Lazarus

2007-12-12 Thread Joost van der Sluis
Op woensdag 12-12-2007 om 22:51 uur [tijdzone +1100], schreef John:
 ik wrote:
  One small note, you have an SQL injection at your code. I recommend
  you to use parameters as how to add the values, but prior to that, you
  should check to see if there are invalid chars, and trim them. That
  way, you can avoid a lot of problems.
 
  Ido

 Perhaps you should explain what is so terrible about a SQL injection 
 ?  I have heard of this before, but not the reason.  I do this regularly 
 and it seems to work fine! 

Suppose the query is like this: (from some mails earlier)

MainForm.SQLQuery1.SQL.Add('SELECT revID from rev WHERE 
revName='+#39+CBProcessRev.Text+#39);


Oh, yes it works. Until...

A user types  '; drop table rev; in CBProcessRev.

Well, that will still work. But only once. ;)

Joost

(btw: this won't work with all TSQLConnections, because some don't
accept a semicolon)



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


Re: [lazarus] Making GTK Thread Safe

2007-12-12 Thread Giuliano Colla

Marc Weustink ha scritto:

Razvan Adrian Bogdan wrote:

On Dec 12, 2007 12:13 PM, Marc Weustink [EMAIL PROTECTED] wrote:

The LCL won't be threadsafe, the overhead isn't worth the gain.


Do you think it's an overhead to use the internal locking mechanism 
from GTK ?


Not only overhead in gtk widgetset, also in LCL, and aslo in all other 
widgetsets.



I tend to think it's a very light mechanism that you don't even feel
in singlethreaded applications, having a threadsafe LCL means one can
freely code without any headaches from synchronization making the code
look nicer and dramatically cutting developing time, 


If you start to think your design first it won't cut much.



You may think as long as you want, but if the main loop is Idle, the 
synchronize method will just suspend your thread for a time which can be 
unacceptable. Therefore you must create a number of kludges to overcome 
the problem. This takes time, and makes the code unclean and harder to 
maintain.



but i do think
it's a lot of code. I tend to think the LCLs overhead comes from using
classes too much in the lower level API abstraction part.


In all my years of delphi threadded app development I never needed 
threadded updates of my gui.




This doesn't make you really qualified to discuss the topic doesn't it? ;-)

If your thread performs a side task which takes data from your main 
thread, and then processes them in parallel, then of course you don't 
need to deal with GUI, other than for error messages, which can be 
handled quite easily. But if your threads do receive data which must be 
fed to the main thread, and which must trigger visual events, then you 
become aware of the strong limitations of current implementation.


Giuliano

--
Giuliano Colla

Whenever people agree with me, I always feel I must be wrong (O. Wilde)

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


[lazarus] SqlDB component madness

2007-12-12 Thread Graeme Geldenhuys
Hi,

Please bare with me Lets get one thing out of the way. I never use
DB Connection components on Forms and never use DB-aware components.
I'm a OPF guy, so using the database components on a day-to-day basis
is not something I am familiar with.

So that said, I thought I would play with the SqlDB components today
because I want to complete the SqlDB persistence layer for tiOPF.

The ingredients I used for today are:
  TIBConnection, TSQLTransaction, TSQLQuery, TDataSource and TDBGrid.

I got everything to work and data to be displayed in the TDBGrid, but
here is where the 'madness' part comes in.  The _very strange_ way I
had to connect the above components.

Step 1:
==
TIBConnection   -   TSQLTransaction  via  'Database' property. No problem here.

Step 2:
==
TIBConnection  -  TSQLTransaction  via 'Transaction' property.
Why???  Why must you link components in both directions?

Step 3:
==
TSQLTransaction   -  TSQLQuery via 'Transaction' property. No problems here.

Step 4:
==
TIBConnection   -  TSQLQuery via 'Database' property. Why???  Can't
it figure it out from the TSQLTransaction it's hooked up to already
(step 3)?  What happens if the Transaction component is hooked up to
DB1 and then I specify DB2 in the Database property?

Step 5a:
==
TSQLQuery   -   TDatasource via the 'Dataset' property.  No problems here.

Step 5b: (optional)
==
TSQLQuery  -  TDatasource via the 'DataSource' property.  It can be
done, but wasn't needed to get my example project to work. Not sure
what's the rules about this one.

Step 6:
==
TDBGrid   -  TDatasource via the 'DataSource' property.  No problems here.



So if you haven't figured it out, my issues are with steps 2, 4  5b.
I really can't see why they are needed in the first place. Linking
components in both directions are simply redundant.  Has nobody
thought this as strange?

It's like dropping a PopupMenu on a Form and then setting the
following (which isn't needed by the way).   Form.PopupMenu :=
PopupMenu. PopupMenu.Control := Form

I worked with Delphi 7 using BDE and DOA (Direct Oracle Access) and
never had to set links between database components in both directions.



Below is the code generated in the .lfm file if the above wasn't clear.

---[  Copy  ]
  object IBConnection1: TIBConnection
Connected = True
Streamedconnected = True
DatabaseName = 'm2'
Password = 'masterkey'
Transaction = SQLTransaction1
UserName = 'sysdba'
HostName = '192.168.0.1'
Dialect = 3
left = 40
top = 8
  end
  object SQLTransaction1: TSQLTransaction
Active = True
Database = IBConnection1
left = 78
top = 8
  end
  object SQLQuery1: TSQLQuery
Active = True
Database = IBConnection1
Transaction = SQLTransaction1
SQL.Strings = (
  'select * from Users'
)
Params = 
UpdateMode = upWhereKeyOnly
UsePrimaryKeyAsKey = True
ParseSQL = True
left = 118
top = 8
  end
  object Datasource1: TDatasource
DataSet = SQLQuery1
left = 78
top = 48
  end
---[  End  ]



Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

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


[lazarus] Upgrading Lazarus

2007-12-12 Thread svaa

Hello:

I have downloaded the las version 
Lazarus-0.9.24-fpc-2.2.0-20071114-win32.exe, and I have tried to 
installed over the old version 0.9.22, and I get errors, as always when 
I try to upgrade the version. Usually I give up, I delete the directory 
and reinstall from scratch, but this time I would like to learn what I 
am doing wrong.


I have launched lazarus.exe, not startlazarus.exe, I have build lazarus 
from the menu checking clean and build all, and I get the following error:


C:\lazarus\lcl\interfaces\win32\Win32Def.pp(1,1) Fatal: Can't find unit 
CommCtrl


I get the same error in a w2000 SP4 nad XP sp2.

Santiago
[EMAIL PROTECTED]

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


Re: [lazarus] SqlDB component madness

2007-12-12 Thread Graeme Geldenhuys
On 12/12/2007, Swen Heinig [EMAIL PROTECTED] wrote:

 if you do step1 then step2 is automatically done (no additional work for
 you). There is the same situation for step4 and step3 (if you connect to
 the database the transaction is automatically set).


To make sure I'm not going nuts I tried it again. I redid Step 1 in a
new form. I selected the IBConnection1 in the Database property of
TSQLTransaction.  Then clicked on IBConnection1 and the link from the
TIBConnection to TSQLTransaction (Transaction property) is not setup
automatically.

Here is the code generated in the .lfm file.

  object IBConnection1: TIBConnection
left = 73
top = 17
  end
  object SQLTransaction1: TSQLTransaction
Database = IBConnection1
left = 125
top = 20
  end


I have to follow all steps mentioned in my first email otherwise I
keep getting error messages when I try and set the database components
active.

I got a Lazarus svn update this morning. I'm using r13293.


Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

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


Re: [lazarus] SqlDB component madness

2007-12-12 Thread Swen Heinig
Hello Graeme,

if you do step1 then step2 is automatically done (no additional work for
you). There is the same situation for step4 and step3 (if you connect to
the database the transaction is automatically set). Step5b: You can
connect the SQLQuery to a second Datasource. If you connect the
components in the right order you will not get surprises.

Regards,
Swen


Graeme Geldenhuys schrieb:
 Hi,

 Please bare with me Lets get one thing out of the way. I never use
 DB Connection components on Forms and never use DB-aware components.
 I'm a OPF guy, so using the database components on a day-to-day basis
 is not something I am familiar with.

 So that said, I thought I would play with the SqlDB components today
 because I want to complete the SqlDB persistence layer for tiOPF.

 The ingredients I used for today are:
   TIBConnection, TSQLTransaction, TSQLQuery, TDataSource and TDBGrid.

 I got everything to work and data to be displayed in the TDBGrid, but
 here is where the 'madness' part comes in.  The _very strange_ way I
 had to connect the above components.

 Step 1:
 ==
 TIBConnection   -   TSQLTransaction  via  'Database' property. No problem 
 here.

 Step 2:
 ==
 TIBConnection  -  TSQLTransaction  via 'Transaction' property.
 Why???  Why must you link components in both directions?

 Step 3:
 ==
 TSQLTransaction   -  TSQLQuery via 'Transaction' property. No problems here.

 Step 4:
 ==
 TIBConnection   -  TSQLQuery via 'Database' property. Why???  Can't
 it figure it out from the TSQLTransaction it's hooked up to already
 (step 3)?  What happens if the Transaction component is hooked up to
 DB1 and then I specify DB2 in the Database property?

 Step 5a:
 ==
 TSQLQuery   -   TDatasource via the 'Dataset' property.  No problems here.

 Step 5b: (optional)
 ==
 TSQLQuery  -  TDatasource via the 'DataSource' property.  It can be
 done, but wasn't needed to get my example project to work. Not sure
 what's the rules about this one.

 Step 6:
 ==
 TDBGrid   -  TDatasource via the 'DataSource' property.  No problems here.



 So if you haven't figured it out, my issues are with steps 2, 4  5b.
 I really can't see why they are needed in the first place. Linking
 components in both directions are simply redundant.  Has nobody
 thought this as strange?

 It's like dropping a PopupMenu on a Form and then setting the
 following (which isn't needed by the way).   Form.PopupMenu :=
 PopupMenu. PopupMenu.Control := Form

 I worked with Delphi 7 using BDE and DOA (Direct Oracle Access) and
 never had to set links between database components in both directions.



 Below is the code generated in the .lfm file if the above wasn't clear.

 ---[  Copy  ]
   object IBConnection1: TIBConnection
 Connected = True
 Streamedconnected = True
 DatabaseName = 'm2'
 Password = 'masterkey'
 Transaction = SQLTransaction1
 UserName = 'sysdba'
 HostName = '192.168.0.1'
 Dialect = 3
 left = 40
 top = 8
   end
   object SQLTransaction1: TSQLTransaction
 Active = True
 Database = IBConnection1
 left = 78
 top = 8
   end
   object SQLQuery1: TSQLQuery
 Active = True
 Database = IBConnection1
 Transaction = SQLTransaction1
 SQL.Strings = (
   'select * from Users'
 )
 Params = 
 UpdateMode = upWhereKeyOnly
 UsePrimaryKeyAsKey = True
 ParseSQL = True
 left = 118
 top = 8
   end
   object Datasource1: TDatasource
 DataSet = SQLQuery1
 left = 78
 top = 48
   end
 ---[  End  ]



 Regards,
   - Graeme -


 ___
 fpGUI - a cross-platform Free Pascal GUI toolkit
 http://opensoft.homeip.net/fpgui/

 _
  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 not cross compiling

2007-12-12 Thread Vincent Snijders

Sam Liddicott schreef:

Please could a wise chap help me see why lazarus is calling ppc386 even
when I select to compile for powerpc.
The search paths are powerpc but the wrong compiler is called.



What does Environment - Environment Options - Files - Compiler Path say?

The compiler name should be ppcppc or (as I prefer) fpc.

Vincent

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


Re: [lazarus] SqlDB component madness

2007-12-12 Thread Swen Heinig
Sorry, there was a misunderstanding from my side. If you do step2 then
step1 is automatically done (thats the correct way).

Swen


Graeme Geldenhuys schrieb:
 On 12/12/2007, Swen Heinig [EMAIL PROTECTED] wrote:
   
 if you do step1 then step2 is automatically done (no additional work for
 you). There is the same situation for step4 and step3 (if you connect to
 the database the transaction is automatically set).
 


 To make sure I'm not going nuts I tried it again. I redid Step 1 in a
 new form. I selected the IBConnection1 in the Database property of
 TSQLTransaction.  Then clicked on IBConnection1 and the link from the
 TIBConnection to TSQLTransaction (Transaction property) is not setup
 automatically.

 Here is the code generated in the .lfm file.

   object IBConnection1: TIBConnection
 left = 73
 top = 17
   end
   object SQLTransaction1: TSQLTransaction
 Database = IBConnection1
 left = 125
 top = 20
   end


 I have to follow all steps mentioned in my first email otherwise I
 keep getting error messages when I try and set the database components
 active.

 I got a Lazarus svn update this morning. I'm using r13293.


 Regards,
   - Graeme -


 ___
 fpGUI - a cross-platform Free Pascal GUI toolkit
 http://opensoft.homeip.net/fpgui/

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


   


Re: [lazarus] SqlDB component madness

2007-12-12 Thread Joost van der Sluis
Op woensdag 12-12-2007 om 15:11 uur [tijdzone +0200], schreef Graeme
Geldenhuys:
 
 Step 1:
 ==
 TIBConnection   -   TSQLTransaction  via  'Database' property. No problem 
 here.
 
 Step 2:
 ==
 TIBConnection  -  TSQLTransaction  via 'Transaction' property.
 Why???  Why must you link components in both directions?

You don't need to do this. It is used when the TIBConnection tries to
execute some sql-statements itself. If has to know which transaction it
should use. You have to see this as the 'default transaction'. If you do
TIBConnection.ExecuteDirect, this transaction is used. This transaction
is also used when you use ApplyUpdates.

 Step 3:
 ==
 TSQLTransaction   -  TSQLQuery via 'Transaction' property. No problems here.
 
 Step 4:
 ==
 TIBConnection   -  TSQLQuery via 'Database' property. Why???  Can't
 it figure it out from the TSQLTransaction it's hooked up to already
 (step 3)?  What happens if the Transaction component is hooked up to
 DB1 and then I specify DB2 in the Database property?

Hm.. I never thought about that, really. It could be usefull, though.
For example Oracle supports transactions which are working on several
groups of databases Not that this is supported by sqldb...

Michael, would it be an idea to remove this link?

 Step 5a:
 ==
 TSQLQuery   -   TDatasource via the 'Dataset' property.  No problems here.
 
 Step 5b: (optional)
 ==
 TSQLQuery  -  TDatasource via the 'DataSource' property.  It can be
 done, but wasn't needed to get my example project to work. Not sure
 what's the rules about this one.

I've been mistaken about this one more then once. Also my collegues had
problems with this.
iirc it's renamed to something else in recent versions. What it does is
handling the master-detail relationships. 

Joost

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


Re: [lazarus] Proposed About dialog patch

2007-12-12 Thread Graeme Geldenhuys
On 10/12/2007, Mattias Gaertner [EMAIL PROTECTED] wrote:
  Yes I agree on that (and I agreed the first time too). It is only
  *how* it is done. Thats why I proposed to add a popup.

 I removed the easter egg.


Okay Marc, I hope I got it right this time round. ;-)
I created a PopupMenu in the About dialog. No hidden easter eggs.
Simply right click anywhere on the Form.


Patch is in Mantis:
  http://www.freepascal.org/mantis/view.php?id=10405



Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

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


[lazarus] DBMemo read only, ever! It not receve data input!

2007-12-12 Thread Osvaldo TC Filho
Lazarus 0.9.25 svn 13278M
DB: Firebird
Components: UIB + FBDataset and TMenDataset

DBMemo do not accept any entry. Is it wrong read only (Property read
only is false)? 

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


Re: [lazarus] SqlDB component madness

2007-12-12 Thread Graeme Geldenhuys
On 12/12/2007, Joost van der Sluis [EMAIL PROTECTED] wrote:

  Step 2:
 You don't need to do this. It is used when the TIBConnection tries to
 execute some sql-statements itself. If has to know which transaction it
 should use. You have to see this as the 'default transaction'. If you do
 TIBConnection.ExecuteDirect, this transaction is used. This transaction
 is also used when you use ApplyUpdates.


snip

  Step 5b: (optional)
  ==
  TSQLQuery  -  TDatasource via the 'DataSource' property.  It can be
  done, but wasn't needed to get my example project to work. Not sure
  what's the rules about this one.

 I've been mistaken about this one more then once. Also my collegues had
 problems with this.
 iirc it's renamed to something else in recent versions. What it does is
 handling the master-detail relationships.


I have to beg to differ on both counts!  They are both required, see below.

I could send you my project if it might help.


As for Step 5. Well in my simple example I have a query: Select * from users.
No master-detail relationship there! Yet if I try to set the
TSQLQuery.Active = True I get a Database not assigned! error.
Assign the Database property to IBConnection1 and try Active = True again.

This time I get the following error:  Transaction of connection not
set.  Now I go to the IBConnection1 and set the Transaction (doubly
link madness) and no I'm not trying to execute anything directly via
the IBConnection.  Go back to SQLQuery and set Active = True.  Now
everything works and I get results in the DBGrid.

So bottom line - all the steps from my first email *are* required to
get results in a DBGrid.



Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

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


Re: Lazarus not cross compiling

2007-12-12 Thread Sam Liddicott
* Vincent Snijders wrote, On 12/12/07 13:53:
 Sam Liddicott schreef:
 Please could a wise chap help me see why lazarus is calling ppc386 even
 when I select to compile for powerpc.
 The search paths are powerpc but the wrong compiler is called.


 What does Environment - Environment Options - Files - Compiler Path
 say?

 The compiler name should be ppcppc or (as I prefer) fpc.
Thats what I was looking for.

Thanks

Sa,

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


Re: Lazarus not cross compiling

2007-12-12 Thread Sam Liddicott
* Vincent Snijders wrote, On 12/12/07 13:53:
 Sam Liddicott schreef:
 Please could a wise chap help me see why lazarus is calling ppc386 even
 when I select to compile for powerpc.
 The search paths are powerpc but the wrong compiler is called.


 What does Environment - Environment Options - Files - Compiler Path
 say?

 The compiler name should be ppcppc or (as I prefer) fpc.
That's what I was looking for.

Thanks

Sam

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


Re: [lazarus] SqlDB component madness

2007-12-12 Thread Michael Van Canneyt


On Wed, 12 Dec 2007, Joost van der Sluis wrote:

 Op woensdag 12-12-2007 om 15:11 uur [tijdzone +0200], schreef Graeme
 Geldenhuys:
  
  Step 1:
  ==
  TIBConnection   -   TSQLTransaction  via  'Database' property. No problem 
  here.
  
  Step 2:
  ==
  TIBConnection  -  TSQLTransaction  via 'Transaction' property.
  Why???  Why must you link components in both directions?
 
 You don't need to do this. It is used when the TIBConnection tries to
 execute some sql-statements itself. If has to know which transaction it
 should use. You have to see this as the 'default transaction'. If you do
 TIBConnection.ExecuteDirect, this transaction is used. This transaction
 is also used when you use ApplyUpdates.

1. It should be set to the first transaction that is hooked up to it.
   That's what IBX does, and it makes sense. So you don't need to set it.

2. ApplyUpdates should use the transaction of TSQLQuery ?

 
  Step 3:
  ==
  TSQLTransaction   -  TSQLQuery via 'Transaction' property. No problems 
  here.
  
  Step 4:
  ==
  TIBConnection   -  TSQLQuery via 'Database' property. Why???  Can't
  it figure it out from the TSQLTransaction it's hooked up to already
  (step 3)?  What happens if the Transaction component is hooked up to
  DB1 and then I specify DB2 in the Database property?
 
 Hm.. I never thought about that, really. It could be usefull, though.
 For example Oracle supports transactions which are working on several
 groups of databases Not that this is supported by sqldb...
 
 Michael, would it be an idea to remove this link?

No, because Firebird and Oracle support cross-database transactions, and you
must point out the correct database. 

But, setting TSQLQuery.Transaction should set Database if it is not yet set,
and vice versa, setting TSQLQuery.Database should set TRansaction to 
Database.Defaulttransaction.

This is on my TODO list before 2.2.2, because I consider this a bug.

 
  Step 5a:
  ==
  TSQLQuery   -   TDatasource via the 'Dataset' property.  No problems here.
  
  Step 5b: (optional)
  ==
  TSQLQuery  -  TDatasource via the 'DataSource' property.  It can be
  done, but wasn't needed to get my example project to work. Not sure
  what's the rules about this one.
 
 I've been mistaken about this one more then once. Also my collegues had
 problems with this.
 iirc it's renamed to something else in recent versions. What it does is
 handling the master-detail relationships. 

It is not renamed, and it should not be. In Delphi it is also called DataSource.

As Joost says, it is needed to handle Master-Detail relations:

Query1:
   Select ID, * from Invoice 
DS1.Dataset=Query1;

Query2:
  Select * from InvoiceDetails Where InvoiceID=:ID;
Query2.DataSource:=DS1;

As the user scrolls through Query1, Query2 is updated automatically with the 
new ID value.

Michael.

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


[lazarus] What do you use for Reporting?

2007-12-12 Thread Lee Jenkins


LazReport looks to have been a fairly recent addition.  I was wondering what 
most people did for reporting from Lazarus.  I was thinking of:


1. Stick to text based reports - write a decent abstraction layer for 
formatting, etc.


2. Use PowerPDF to write all reports to standard pdf format.


A lot of hand coding both ways, but seems flexible enough.

Any input or suggestions?

--
Warm Regards,

Lee

If I don't see you around here, I'll see you around, hear?

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


RE: [lazarus] What do you use for Reporting?

2007-12-12 Thread Hess, Philip J
What I do: Output all reports to RTF and view with external viewer (any
word processor on computer). See this tool for more information:

http://wiki.lazarus.freepascal.org/XDev_Toolkit

With RTF you can have almost unlimited control over the formatting.

Note that on OS X with the latest Carbon widgetset, anything output via
the Printer object can be printed, previewed or saved to PDF via the OS
X Printer dialog. Too bad this isn't available on other systems.

Thanks.

-Phil


-Original Message-
From: Lee Jenkins [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 12, 2007 10:17 AM
To: Lazarus Mailing List
Subject: [lazarus] What do you use for Reporting?


LazReport looks to have been a fairly recent addition.  I was wondering
what 
most people did for reporting from Lazarus.  I was thinking of:

1. Stick to text based reports - write a decent abstraction layer for 
formatting, etc.

2. Use PowerPDF to write all reports to standard pdf format.


A lot of hand coding both ways, but seems flexible enough.

Any input or suggestions?

-- 
Warm Regards,

Lee

If I don't see you around here, I'll see you around, hear?

_
 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] SqlDB component madness

2007-12-12 Thread Michael Van Canneyt


On Wed, 12 Dec 2007, Graeme Geldenhuys wrote:

 On 12/12/2007, Joost van der Sluis [EMAIL PROTECTED] wrote:
 
   Step 2:
  You don't need to do this. It is used when the TIBConnection tries to
  execute some sql-statements itself. If has to know which transaction it
  should use. You have to see this as the 'default transaction'. If you do
  TIBConnection.ExecuteDirect, this transaction is used. This transaction
  is also used when you use ApplyUpdates.
 
 
 snip
 
   Step 5b: (optional)
   ==
   TSQLQuery  -  TDatasource via the 'DataSource' property.  It can be
   done, but wasn't needed to get my example project to work. Not sure
   what's the rules about this one.
 
  I've been mistaken about this one more then once. Also my collegues had
  problems with this.
  iirc it's renamed to something else in recent versions. What it does is
  handling the master-detail relationships.
 
 
 I have to beg to differ on both counts!  They are both required, see below.
 
 I could send you my project if it might help.
 
 
 As for Step 5. Well in my simple example I have a query: Select * from 
 users.
 No master-detail relationship there! Yet if I try to set the
 TSQLQuery.Active = True I get a Database not assigned! error.
 Assign the Database property to IBConnection1 and try Active = True again.
 
 This time I get the following error:  Transaction of connection not
 set.  Now I go to the IBConnection1 and set the Transaction (doubly
 link madness) and no I'm not trying to execute anything directly via
 the IBConnection.  Go back to SQLQuery and set Active = True.  Now
 everything works and I get results in the DBGrid.
 
 So bottom line - all the steps from my first email *are* required to
 get results in a DBGrid.

In that case you represented step 5 wrongly: There you need 
DataSource.Dataset - TSQLQuery.

In short, assume the following components:

DB : TSQLConnection descendent.
TR : TSQLTransaction;
Q : TSQLQuery;
DS : TDataSource;
G : TDBGrid;

Then these are the steps:

1. TR.Database - DB
2. DB.DefaultTransaction - TR // Should be automatic in future.
3. Q.Transaction - TR
4. Q.Database-DB // Should be automatic in future.
5. DS.Dataset-Q;
6. G.DataSource-DS;

If all works as I want it, this should be reduced to 4 steps for the default 
cases,
and steps 1 and 2 can be reversed if so desired, and steps 3 and 4 also.

Michael.

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


Re: Lazarus not cross compiling

2007-12-12 Thread Vincent Snijders

Sam Liddicott schreef:

* Vincent Snijders wrote, On 12/12/07 13:53:

Sam Liddicott schreef:

Please could a wise chap help me see why lazarus is calling ppc386 even
when I select to compile for powerpc.
The search paths are powerpc but the wrong compiler is called.


What does Environment - Environment Options - Files - Compiler Path
say?

The compiler name should be ppcppc or (as I prefer) fpc.

That's what I was looking for.

Thanks



FYI, this information is also in the last paragraph of 
http://wiki.lazarus.freepascal.org/index.php?title=Unit_not_found_-_How_to_find_unitscurid=2724diff=25651oldid=25512#Case_3.3:_The_wrong_compiler_is_being_used


Vincent

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


Re: [lazarus] vote for bdd related component icon

2007-12-12 Thread wile64
No comment ;-)

-- 
Laurent.

My Components: http://wiki.lazarus.freepascal.org/Wile64
French Forum : http://lazforum-fr.tuxfamily.org/index.php
attachment: tdatasource.pngattachment: tdbcalendar.pngattachment: tdbcheckbox.pngattachment: tdbcombobox.pngattachment: tdbedit.pngattachment: tdbgroupbox.pngattachment: tdblistbox.pngattachment: tdbmemo.png

Re: [lazarus] MySQL Queries using Lazarus

2007-12-12 Thread ik
On Dec 12, 2007 2:39 PM, John [EMAIL PROTECTED] wrote:
 Joost van der Sluis wrote:
  Op woensdag 12-12-2007 om 22:51 uur [tijdzone +1100], schreef John:
 
  ik wrote:
 
  One small note, you have an SQL injection at your code. I recommend
  you to use parameters as how to add the values, but prior to that, you
  should check to see if there are invalid chars, and trim them. That
  way, you can avoid a lot of problems.
 
  Ido
 
 
  Perhaps you should explain what is so terrible about a SQL injection
  ?  I have heard of this before, but not the reason.  I do this regularly
  and it seems to work fine!
 
 
  Suppose the query is like this: (from some mails earlier)
 
  MainForm.SQLQuery1.SQL.Add('SELECT revID from rev WHERE 
  revName='+#39+CBProcessRev.Text+#39);
 
 
  Oh, yes it works. Until...
 
  A user types  '; drop table rev; in CBProcessRev.
 
  Well, that will still work. But only once. ;)
 
  Joost
 
  (btw: this won't work with all TSQLConnections, because some don't
  accept a semicolon)
 
 
 So the issue is accepting the text straight from the user input, not the
 fact that the query text is constructed rather than using a parameter
 ?  When I say I do it all the time, it is far more likely to be
 something like 'select * from sometable where ref = ' +
 IntToStr(AnIntegerValue), or some otherwise well-validated expression.

Make sure first of all to have only the valid chars, then escape all
potentially exploitable chars (such as ' /* -- ; and so on).
The thing with Injection (regardless of SQL) is that I can use any
type of content I wish to make in order to make sure that I can
effect/gain things that I can't any other way.
I usually create a filter function such as follows:

function filterChars (const Value : string; chars : TCharset) : string;
var
 i : integer;
begin
   Result := '';
   for i := 1 to length (Value) do
 if (Value[i] in chars ) then
  Result := Result + Value[i];
 end;

I just rewrite it from my head... It will remove any chars that are
not part of the chars parameter, making it clean from un needed
chars. then I'll escape any string chars by converting ' into \' or ''
(depands on the database). The thing with parameters (anonymous or
named) is that the database itself makes the escaping for you.


 Don't get me wrong, I actually prefer to use parameters in such a
 circumstance if I can get them to work, especially if the sql is
 executed repeatedly with different criteria.

I recommand you to read my guide for secure programming:
http://wiki.freepascal.org/Secure_programming
Or in a newer version:
http://ik.homelinux.org/index.rhtml/guides/secure_programming


 cheers,
 John Sunderland



Ido
-- 
http://ik.homelinux.org/

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


Re: [lazarus] Proposed About dialog patch

2007-12-12 Thread Marc Weustink

Graeme Geldenhuys wrote:

On 10/12/2007, Mattias Gaertner [EMAIL PROTECTED] wrote:

Yes I agree on that (and I agreed the first time too). It is only
*how* it is done. Thats why I proposed to add a popup.

I removed the easter egg.



Okay Marc, I hope I got it right this time round. ;-)
I created a PopupMenu in the About dialog. No hidden easter eggs.
Simply right click anywhere on the Form.


Patch is in Mantis:
  http://www.freepascal.org/mantis/view.php?id=10405


:)

Marc

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


Re: [lazarus] What do you use for Reporting?

2007-12-12 Thread Andrey Gusev

* Lee Jenkins [EMAIL PROTECTED] [Wed, 12 Dec 2007 10:17:12 -0500]:


LazReport looks to have been a fairly recent addition.  I was 

wondering

what
most people did for reporting from Lazarus.  I was thinking of:

1. Stick to text based reports - write a decent abstraction layer for
formatting, etc.

2. Use PowerPDF to write all reports to standard pdf format.


A lot of hand coding both ways, but seems flexible enough.


I'm currently port big office application, with many FreeReport's forms, 
from Delphi to Lazarus.
I do start to develop LazReport-OpenOffice exporter, but meanwhile it 
is nothing to publish.


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


Re: Lazarus not cross compiling

2007-12-12 Thread Sam Liddicott
* Vincent Snijders wrote, On 12/12/07 15:37:
 Sam Liddicott schreef:
 * Vincent Snijders wrote, On 12/12/07 13:53:
 Sam Liddicott schreef:
 Please could a wise chap help me see why lazarus is calling ppc386
 even
 when I select to compile for powerpc.
 The search paths are powerpc but the wrong compiler is called.

 What does Environment - Environment Options - Files - Compiler Path
 say?

 The compiler name should be ppcppc or (as I prefer) fpc.
 That's what I was looking for.

 Thanks


 FYI, this information is also in the last paragraph of
 http://wiki.lazarus.freepascal.org/index.php?title=Unit_not_found_-_How_to_find_unitscurid=2724diff=25651oldid=25512#Case_3.3:_The_wrong_compiler_is_being_used

Thanks for adding that.

I wrote that wiki section this morning and was going to add your answer
tonight when I got home.

I reckon lazarus ought to use fpc by default?

And now I have been able to discover the final spell I need for the
cross compiler postinst, which will be some ifdef in fpc.cfg to add the
bintools prefix depending on the selected cpu/os; so if all goes well
we'll have simplified automated building of cross compiler debs.

I'll then re-work THAT so that the debian/* files are built as part of
make-dist (and the same for the spec file) to really simplify package
building. RPM guys will just need to do: rpm -tb fpc-tar.gz or something.

Sam

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


Re: [lazarus] Making GTK Thread Safe

2007-12-12 Thread Graeme Geldenhuys
On 12/12/2007, Giuliano Colla [EMAIL PROTECTED] wrote:
 If your thread performs a side task which takes data from your main
 thread, and then processes them in parallel, then of course you don't
 need to deal with GUI, other than for error messages, which can be
 handled quite easily. But if your threads do receive data which must be
 fed to the main thread, and which must trigger visual events, then you
 become aware of the strong limitations of current implementation.

I'm no Threads expert, but have been studying code that uses threads
heavily. A few such examples are the Borland Multi-Threading
competition [1] that was held a few years back. There all the entries
were GUI apps and the threads managed to update the GUI just fine (via
Synchronized methods I believe).  So is it really a issue, or am I not
understanding the underlying problem?


[1] - I can supply the URL if anybody is interested.


Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

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


Re: [lazarus] SqlDB component madness

2007-12-12 Thread Graeme Geldenhuys
On 12/12/2007, Joost van der Sluis [EMAIL PROTECTED] wrote:

 Both counts? 5b Is optional? You said that yourself.

Sorry, I got Step 4 and 5 mixed up.

 That's because you don't have any indexes pre-defined. So it tries to
 fetch the indexes from the database. At that point the TIBConnection
 needs a transaction... Set TSQLQuery.ParseSQL:=false; Then you don't

So in addition to my Select statement, it executes another auto
generated query trying to look for a Index.  That's interesting.

 need step 2 anymore. For your OPF you have to set it to false anyways,
 since it's useless in your case.

Thanks for the tip.


Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

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


Re: [lazarus] SqlDB component madness

2007-12-12 Thread Graeme Geldenhuys
On 12/12/2007, Michael Van Canneyt [EMAIL PROTECTED] wrote:

 If all works as I want it, this should be reduced to 4 steps for the default 
 cases,


That is what I expected and what I was used to in Delphi.  I gather
the change you are talking about would work from code as well, and not
just some Lazarus Object Inspector magic?


PS:
Would anybody mind if I put this new found knowledge in a fpdoc sqldb
file?  It would be nice having some help as a start, compared to
nothing as it stands at the moment.  It can always be improved on or
completed at a later date by other contributors.  I remember just a
few days ago there were other developers also complaining about not
having any help reference for the sqldb units. My contributions would
at least be a start.


Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

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


Re: [lazarus] SqlDB component madness

2007-12-12 Thread Michael Van Canneyt


On Wed, 12 Dec 2007, Graeme Geldenhuys wrote:

 On 12/12/2007, Michael Van Canneyt [EMAIL PROTECTED] wrote:
 
  If all works as I want it, this should be reduced to 4 steps for the 
  default cases,
 
 
 That is what I expected and what I was used to in Delphi.  I gather
 the change you are talking about would work from code as well, and not
 just some Lazarus Object Inspector magic?

Yes, of course it would work in code as well.
I'll see about doing this tonight.

 PS:
 Would anybody mind if I put this new found knowledge in a fpdoc sqldb
 file?  It would be nice having some help as a start, compared to
 nothing as it stands at the moment.  It can always be improved on or
 completed at a later date by other contributors.  I remember just a
 few days ago there were other developers also complaining about not
 having any help reference for the sqldb units. My contributions would
 at least be a start.

Please do.

Michael.

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


[lazarus] r 13300

2007-12-12 Thread Ger Remmers
In this last revision Lazarus doesn't clean the objectinspector window and 
the messages window anymore.

See attachment
-- 
Ger
attachment: ObjectInspector.jpg

Re: [lazarus] r 13300

2007-12-12 Thread Vincent Snijders

Ger Remmers schreef:
In this last revision Lazarus doesn't clean the objectinspector window and 
the messages window anymore.


See also:
http://www.freepascal.org/mantis/view.php?id=10406

Vincent

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


Re: [lazarus] What do you use for Reporting?

2007-12-12 Thread Mattias Gaertner
On Wed, 12 Dec 2007 10:29:33 -0500
Hess, Philip J [EMAIL PROTECTED] wrote:

 What I do: Output all reports to RTF and view with external viewer
 (any word processor on computer). See this tool for more information:
 
 http://wiki.lazarus.freepascal.org/XDev_Toolkit
 
 With RTF you can have almost unlimited control over the formatting.
 
 Note that on OS X with the latest Carbon widgetset, anything output
 via the Printer object can be printed, previewed or saved to PDF via
 the OS X Printer dialog. Too bad this isn't available on other
 systems.

There are free PDF printers for at least linux and windows. AFAIK the
windows pdf printers have some problems on windows terminal servers,
and the linux ones have static output filenames.


Mattias

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


Re: [lazarus] Making GTK Thread Safe

2007-12-12 Thread Graeme Geldenhuys
On 12/12/2007, Razvan Adrian Bogdan [EMAIL PROTECTED] wrote:
 The synchronize method is simple but inefficient, it pauses your
 thread until the main thread has time to execute your code and could
 take some time until it does, i personally also dislike the fact that

Ah okay I see what you mean.  If the thread doesn't need to
communicate with the main GUI thread, it will run perfectly. As soon
as it has to talk to the main GUI thread it has to use Synchronize,
which might be delayed by a very busy GUI thread.

So what if the worker thread posts a custom message to say the windows
message queue.  Surely that wouldn't cause the thread to be suspended.
 The GUI control then simply needs to know about the custom message,
to process it correctly.  Could this work, well on Windows at least?


Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

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


Re: [lazarus] Making GTK Thread Safe

2007-12-12 Thread Razvan Adrian Bogdan
On Dec 12, 2007 9:34 PM, Graeme Geldenhuys [EMAIL PROTECTED] wrote:
 So what if the worker thread posts a custom message to say the windows
 message queue.  Surely that wouldn't cause the thread to be suspended.
  The GUI control then simply needs to know about the custom message,
 to process it correctly.  Could this work, well on Windows at least?

Using messages works on windows, but GTK is the most thread unsafe of
all widgetsets, when i tried to port an app that worked fine on
windows to GTK1/2 it was quite unstable, even now with a StringList
based messages queue there are times when the app simply crashes with
strange gtk resize warning but this is probably a GTK stability issue.
Being able to do GUI calls in secondary threads is nice to have.

Razvan

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


Re: [lazarus] Making GTK Thread Safe

2007-12-12 Thread Razvan Adrian Bogdan
The synchronize method is simple but inefficient, it pauses your
thread until the main thread has time to execute your code and could
take some time until it does, i personally also dislike the fact that
one cannot call any procedure/function with any number of parameters
with synchronize.
I think mark proposed once the solution of using a List (StringList or
something else) in a synchronised manner with CriticalSections
protecting access to the list and this way creating a message system
similar to the OS one but this implementation is also not always
comfortable but it isn't blocking as synchronize, the problem is not
with the windows widgetset which is message based and quite thread
safe and one can easily use CriticalSections with Controls, Borland
started to make the VCL threadsafe but they didn't complete this task,
maybe LCL would be more popular if it was threadsafe, i do realise
it's a lot of work but it might be worth it.

Razvan

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


Re: [lazarus] SqlDB component madness

2007-12-12 Thread Michael Van Canneyt


On Wed, 12 Dec 2007, Michael Van Canneyt wrote:

 
 
 On Wed, 12 Dec 2007, Graeme Geldenhuys wrote:
 
  On 12/12/2007, Michael Van Canneyt [EMAIL PROTECTED] wrote:
  
   If all works as I want it, this should be reduced to 4 steps for the 
   default cases,
  
  
  That is what I expected and what I was used to in Delphi.  I gather
  the change you are talking about would work from code as well, and not
  just some Lazarus Object Inspector magic?
 
 Yes, of course it would work in code as well.
 I'll see about doing this tonight.

Done and committed. Sent test program to Joost.

Michael.

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


Re: [lazarus] r 13300

2007-12-12 Thread Vincent Snijders

Ger Remmers schreef:

On Wednesday 12 December 2007, Vincent Snijders wrote:

See also:
http://www.freepascal.org/mantis/view.php?id=10406

Vincent

There it's reported for gtk2, I recompiled Lazarus for gtk and the same thing 
happens


One of the notes says it is for gtk1 too.

Vincent

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


Re: [lazarus] Communication between main thread and worker thread

2007-12-12 Thread Razvan Adrian Bogdan
On Dec 7, 2007 9:57 PM, Antonio Sanguigni [EMAIL PROTECTED] wrote:
 Hi all,

 usually under windows my worker thread send a message to main thread with
 postmessage function to communicate simple data, such as integer to update
 progress percentage of worker thread status.

 With Lazarus and with cross-platform windows/Linux development, how is the
 way to go ?

You could use a List or SringList and a CriticalSection to queue
messages and extract them in the main form, it should work on all
platforms.

Razvan

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


Re: [lazarus] Identifier not found pango_layout_get_font_description

2007-12-12 Thread Damien Gerard


On Dec 12, 2007, at 9:07 PM, Osvaldo TC Filho wrote:


/home/opt/pascal/lazarus/lcl/interfaces/gtk2/gtk2widgetset.inc(624,48)
Error: Identifier not found pango_layout_get_font_description

==
{$if defined(VER2_0) or defined(VER2_2_0)} need VER2_2_1
==
function
pango_layout_get_font_description
(layout:PPangoLayout):PPangoFontDescription; cdecl; external pangolib;
{$ifend}

in gtkextra.pp line 116

Linux GTK2 subversion



I already had this error before and was resolved with a clean  
installation/recompilation.

It seems there were remaining files which were no longer required.


--
Damien Gerard
[EMAIL PROTECTED]

People who used magic without knowing what they were doing usually  
came to a sticky end. All over the entire room, sometimes.

-- (Terry Pratchett, Moving Pictures)



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


Re: [lazarus] Making GTK Thread Safe

2007-12-12 Thread Micha Nelissen
Giuliano Colla wrote:
 However making Lazarus LCL thread safe can be a lot of work, but would
 be an enormous bonus which would enable to use it in all fields where a
 real efficient thread support is needed and currently you have no RAD
 tools.

Multi-thread safe LCL would also mean locking, and that means slowdown
also when you don't need it. 'real efficient' is therefore a *very*
*Very* simplistic view of the situation.

Besides, the GUI thread is meant to be mostly idle; so that it can
respond to user's action quickly. You have to synchronize your
background tasks anyway if you run them, and want to stop them; so
multi-thread safety doesn't gain much on this point.

My personal opinion it's only nice for QuickSort vs. Bubble Sort demoes.

Micha

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


Re: [lazarus] Making GTK Thread Safe

2007-12-12 Thread Antonio Sanguigni

  So what if the worker thread posts a custom message to say the windows
  message queue.  Surely that wouldn't cause the thread to be suspended.
   The GUI control then simply needs to know about the custom message,
  to process it correctly.  Could this work, well on Windows at least?

 Using messages works on windows, but GTK is the most thread unsafe of
 all widgetsets, when i tried to port an app that worked fine on
 windows to GTK1/2 it was quite unstable, even now with a StringList
 based messages queue there are times when the app simply crashes with
 strange gtk resize warning but this is probably a GTK stability issue.
 Being able to do GUI calls in secondary threads is nice to have.


I must confess I don't know too much of GTK1/2 but, for example if fpGUI is
a framework from scratch indipendent from GTK, simply sending asynchronous
messages to the main thread should work well ? It can elaborate the messages
when the main loop will intercept them. In Windows it should work well; with
Linux or other operating system I have no idea but I suppose yes.

-- 
Antonio Sanguigni alias slapshot
--
GioveLUG (Linux User Group) - http://www.giovelug.org
Edupup (Educational distro) - http://www.edupup.org


[lazarus] Splash Screen on Linux

2007-12-12 Thread el stamatakos

Hi All,
 I am trying to use a splash screen before my main application starts. I use 
the following. Does anyone see anything wrong with the below since it does not 
seem to bring up the Splash Screen. Thanks

Lefti
--unit 
Splash--
unit Splash;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, ExtCtrls,
  StdCtrls;

type

  { TSplashForm }

  TSplashForm = class(TForm)
Image1: TImage;
Label1: TLabel;
Label2: TLabel;
procedure FormCreate(Sender: TObject);
  private
{ private declarations }
  public
{ public declarations }
  end; 

var
  SplashForm: TSplashForm;

implementation

{ TSplashForm }

procedure TSplashForm.FormCreate(Sender: TObject);
begin
  sleep(2);
end;

initialization
  {$I splash.lrs}

end.   

--unit 
Splash--

--Main 
project-
program project1;

{$mode objfpc}{$H+}

uses
  {$IFDEF UNIX}{$IFDEF UseCThreads}
  cthreads,
  {$ENDIF}{$ENDIF}
  Interfaces, // this includes the LCL widgetset
  Forms
  { you can add units after this }, SQLDBLaz, ProcessDesChild, Unit1, 
SharedVarsU, SharedLibsU, Splash;

begin
SplashForm:=TSplashForm.Create(Application);
SplashForm.Show;
SplashForm.Paint;
SplashForm.Update;
application.ProcessMessages;
application.Initialize;
//Delay(2000);
  Application.Initialize;
  Application.CreateForm(TMainForm, MainForm);
  SplashForm.Hide;
  SplashForm.Close;
  SplashForm.Release;
  SplashForm.Free;
  Application.Run;
end.

--Main 
project-


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


Re: [lazarus] Splash Screen on Linux

2007-12-12 Thread Mattias Gaertner
On Wed, 12 Dec 2007 15:17:18 -0800
el stamatakos [EMAIL PROTECTED] wrote:

 
 Hi All,
  I am trying to use a splash screen before my main application
 starts. I use the following. Does anyone see anything wrong with the
 below since it does not seem to bring up the Splash Screen. Thanks

A few things.

 
 Lefti
 --unit
 Splash--
 unit Splash;
 
 {$mode objfpc}{$H+}
 
 interface
 
 uses
   Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs,
 ExtCtrls, StdCtrls;
 
 type
 
   { TSplashForm }
 
   TSplashForm = class(TForm)
 Image1: TImage;
 Label1: TLabel;
 Label2: TLabel;
 procedure FormCreate(Sender: TObject);
   private
 { private declarations }
   public
 { public declarations }
   end; 
 
 var
   SplashForm: TSplashForm;
 
 implementation
 
 { TSplashForm }
 
 procedure TSplashForm.FormCreate(Sender: TObject);
 begin
   sleep(2);

remove this sleep.

 end;
 
 initialization
   {$I splash.lrs}
 
 end.   
 
 --unit
 Splash--
 
 --Main
 project-
 program project1;
 
 {$mode objfpc}{$H+}
 
 uses
   {$IFDEF UNIX}{$IFDEF UseCThreads}
   cthreads,
   {$ENDIF}{$ENDIF}
   Interfaces, // this includes the LCL widgetset
   Forms
   { you can add units after this }, SQLDBLaz, ProcessDesChild, Unit1, 
 SharedVarsU, SharedLibsU, Splash;
 
 begin

move the application.Initialize to here.

 SplashForm:=TSplashForm.Create(Application);

replace the owner with nil
  :=TSplashForm.Create(nil);

 SplashForm.Show;
 SplashForm.Paint;
 SplashForm.Update;

remove the paint and the update.

 application.ProcessMessages;
 application.Initialize;

remove the application.Initialize

 //Delay(2000);
   Application.Initialize;

remove the application.Initialize


   Application.CreateForm(TMainForm, MainForm);
   SplashForm.Hide;
   SplashForm.Close;
   SplashForm.Release;
   SplashForm.Free;

Just Free.

   Application.Run;
 end.


Mattias

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


Re: [lazarus] cross compile deb status and next problem

2007-12-12 Thread Mattias Gaertner
On Wed, 12 Dec 2007 22:40:25 +
Sam Liddicott [EMAIL PROTECTED] wrote:

 This message contains a progress report, and some more questions:
 
 Progress
 ==
 
 Thanks to Vincent, using fpc as the compiler, and using this spell in 
 /etc/fpc.cfg (which will be added to the default fpc package)
 
 echo '#include /usr/lib/fpc/2.3.1/fpc-cross.cfg'  /etc/fpc.cfg

Please replace the version number with $fpcversion.

 
 and then the file /usr/lib/fpc/2.3.1/fpc-cross.cfg can have 1
 #include per cross compiler e.g.
 
 #include /usr/lib/fpc/2.3.1/fpc.powerpc-linux.cfg
 
 these will be easy to add and remove with postinst and postrm for 
 package managers.
 
 A typical file might be:
 
 
 $ cat /usr/lib/fpc/2.3.1/fpc.powerpc-linux.cfg
 
 # Detect powerpc-linux compiles
 #IF $fpc-target = powerpc-linux
  -XPpowerpc-linux-gnu-
 #WRITE binutils prefix powerpc-linux-gnu-
 #END
 
 
 The actual -XP entry will depend on what the binutils prefix was when 
 the cross compile package was actually built.
 
 THAT much works; so merely installing a cross-compiler deb will let 
 lazarus just pick it up and run

Nice. Just like the existing fpc_crosswin32 package, but finally for
more platforms. :)

 
 Problems
 ==
 
 However the next problems: rebuilding lazarus (lcl etc) is done by a 
 makefile, e.g.:
 
 /usr/share/lazarus/lcl/  /usr/bin/make clean all -w
 CPU_TARGET=powerpc
 
 fpc is not called by the makefle, so /etc/fpc.cfg is not read, and of 
 course this needs adding:
  BINUTILSPREFIX=powerpc-linux-gnu-
 
 or whatever the prefix actually needs to be; but thats too long
 winded; we already solved this problem by using fpc.
 
 So... I guess I need to find out why /usr/bin/ppcrossppc is being
 used directly and not fpc...
 
 And why lazarus insists on making clean and making
 in /usr/share/lazarus even though I'm not root and don't have write
 access, but that can come later...

Probably because /usr/share/lazarus is set in the environment options as
lazarus directory and you told the IDE to rebuild the LCL.
The LCL can still only be built via the Makefile and this is not very
flexible. Eventually when the LCL is changed to a normal lazarus package
it will be possible to build the LCL, even if the LCL was installed as
root.

 
 And then (finally, please let it be finally) where cprt21.o is or
 comes from for powerpc. Maybe I missed it in the cross-deb?


Mattias

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


RE: [lazarus] Splash Screen on Linux

2007-12-12 Thread el stamatakos

Hi ,
 I still seem to have problems. It still dissapears to fast to see. If I debug 
and put a stop and step through then it does show, but when I run it in normal 
mode it is just too fast. Any recommendations. Thanks

Lefti

 Date: Thu, 13 Dec 2007 00:31:03 +0100
 From: [EMAIL PROTECTED]
 To: lazarus@miraclec.com
 Subject: Re: [lazarus] Splash Screen on Linux
 
 On Wed, 12 Dec 2007 15:17:18 -0800
 el stamatakos  wrote:
 
 
 Hi All,
  I am trying to use a splash screen before my main application
 starts. I use the following. Does anyone see anything wrong with the
 below since it does not seem to bring up the Splash Screen. Thanks
 
 A few things.
 
  
 Lefti
 --unit
 Splash--
 unit Splash;
 
 {$mode objfpc}{$H+}
 
 interface
 
 uses
   Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs,
 ExtCtrls, StdCtrls;
 
 type
 
   { TSplashForm }
 
   TSplashForm = class(TForm)
 Image1: TImage;
 Label1: TLabel;
 Label2: TLabel;
 procedure FormCreate(Sender: TObject);
   private
 { private declarations }
   public
 { public declarations }
   end; 
 
 var
   SplashForm: TSplashForm;
 
 implementation
 
 { TSplashForm }
 
 procedure TSplashForm.FormCreate(Sender: TObject);
 begin
   sleep(2);
 
 remove this sleep.
 
 end;
 
 initialization
   {$I splash.lrs}
 
 end.   
 
 --unit
 Splash--
 
 --Main
 project-
 program project1;
 
 {$mode objfpc}{$H+}
 
 uses
   {$IFDEF UNIX}{$IFDEF UseCThreads}
   cthreads,
   {$ENDIF}{$ENDIF}
   Interfaces, // this includes the LCL widgetset
   Forms
   { you can add units after this }, SQLDBLaz, ProcessDesChild, Unit1, 
 SharedVarsU, SharedLibsU, Splash;
 
 begin
 
 move the application.Initialize to here.
 
 SplashForm:=TSplashForm.Create(Application);
 
 replace the owner with nil
   :=TSplashForm.Create(nil);
 
 SplashForm.Show;
 SplashForm.Paint;
 SplashForm.Update;
 
 remove the paint and the update.
 
 application.ProcessMessages;
 application.Initialize;
 
 remove the application.Initialize
 
 //Delay(2000);
   Application.Initialize;
 
 remove the application.Initialize
 
 
   Application.CreateForm(TMainForm, MainForm);
   SplashForm.Hide;
   SplashForm.Close;
   SplashForm.Release;
   SplashForm.Free;
 
 Just Free.
 
   Application.Run;
 end.
 
 
 Mattias
 
 _
  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] Making GTK Thread Safe

2007-12-12 Thread Giuliano Colla

Graeme Geldenhuys ha scritto:

On 12/12/2007, Razvan Adrian Bogdan [EMAIL PROTECTED] wrote:
  

The synchronize method is simple but inefficient, it pauses your
thread until the main thread has time to execute your code and could
take some time until it does, i personally also dislike the fact that



Ah okay I see what you mean.  If the thread doesn't need to
communicate with the main GUI thread, it will run perfectly. As soon
as it has to talk to the main GUI thread it has to use Synchronize,
which might be delayed by a very busy GUI thread.

  
Well, on Kylix it was much worse than that. It could be delayed ad 
libitum by an Idle GUI thread.
Delphi relied on Windows buggy behavior of sending frequent useless 
messages around to wake up the main thread frequently.
But an honest to God OS, which doesn't send messages when it has nothing 
to say, defeats a design based on bugs.
Of course we may overcome that, by creating your own queue of events 
from the thread, and try to process them with an OnIdle event handler, 
and wake up periodically the main thread with a timer event.
To discover that if your timer event doesn't change something visual, 
the smart thing decides that there's nothing important to do, and stays 
Idle, so that the OnIdle handler is never called. My kludge has been to 
have the Timer update a Label in a hidden corner of the screen, with a 
sequence of - \ | / - . This wakes up the main thread, which then goes 
Idle, triggers the OnIdle event, and the queue can be processed. You may 
see that this is far from satisfactory.
Up to now I've not yet tested Lazarus with a real demanding threaded 
app, but from what I've read about the OnIdle events from Felipe and 
others, I'm afraid that the result won't be much different.

So what if the worker thread posts a custom message to say the windows
message queue.  Surely that wouldn't cause the thread to be suspended.
 The GUI control then simply needs to know about the custom message,
to process it correctly.  Could this work, well on Windows at least?


  
See above. One should use a different design. It's useless to attempt to 
make single graphic components thread safe. It enormously increases the 
overhead, and the number of possible bugs. What if a widget handled by 
thread A is partially covered by a widget handled by thread B, and both 
reside on a window handled by thread C? Just think to the amount of 
communication between different threads in order to sort out how to 
redraw in the proper order.
The screen is a shared resource,  so it must be granted exclusive 
access. If one thinks of one main thread which besides doing its job 
receives messages from all the worker threads, creates a clean queue of 
what needs to be done (sorting out what's visible and what not, what 
must be drawn and what not, etc.), and passes that to a graphic thread 
which is the only one which has access to the display, then you have a 
real multithread GUI, which could fill a void in what's currently available.

It could be a challenging project, don't you think?
It just requires a not too large GUI system already existing (such as 
fpGui, not Lazarus which is too big to play with) and some enthusiasm 
(and also a lot of time, but for my company it could be important, so 
some resources could be found).


Regards,

Giuliano

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


Re: [lazarus] New bitmap :-)

2007-12-12 Thread Paul Ishenin

wile64 пишет:

More

--
Laurent.



Thanks, ipc images commited in r13306.

About db images. They are good, but I will not commit until you tell me 
that they are last.


Best regards,
Paul Ishenin.

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


Re: [lazarus] Making GTK Thread Safe

2007-12-12 Thread Giuliano Colla

Micha Nelissen ha scritto:

Giuliano Colla wrote:
  

However making Lazarus LCL thread safe can be a lot of work, but would
be an enormous bonus which would enable to use it in all fields where a
real efficient thread support is needed and currently you have no RAD
tools.



Multi-thread safe LCL would also mean locking, and that means slowdown
also when you don't need it. 'real efficient' is therefore a *very*
*Very* simplistic view of the situation.

  
Locking is the easy hacking way. Is basically the reverse of what it's 
done now with the blocking mechanism of synchronize. You don't block the 
main thread, but rather the working thread.
Making LCL thread safe mean to separate the logical handling of what has 
to be done, from the physical handling of writing to the screen. If it's 
well implemented it can be faster than now even for applications which 
don't need multithreading.
If you think, any web browser is multithreaded, thread safe, and fills 
up your screen faster than Lazarus.

Besides, the GUI thread is meant to be mostly idle; so that it can
respond to user's action quickly. You have to synchronize your
background tasks anyway if you run them, and want to stop them; so
multi-thread safety doesn't gain much on this point.

  
The reaction to *user* action is quick (mouse and keyboard), the 
reaction to events coming from outside is far from satisfactory.

My personal opinion it's only nice for QuickSort vs. Bubble Sort demoes.

  
Ever thought of applications which receive data from a number of 
external sources and should display them and react accordingly? They 
outnumber the applications where a user just sits there and plays with 
mouse. And they're commercial application which need a good solid 
software, and a pleasant look. I'm talking of application where the 
input devices are a combination of network connection plus barcode 
readers, badge readers, electronic scales, access controls, etc. etc. 
You find them in POS, in hotels, in company stores, in cash dispensers, 
in taxi companies, in airports, wherever. The multiple sources require 
multithreading, and fast response to external events, combined with fast 
update of display, and with human interaction.
There's no RAD worth mentioning today to provide the GUI for all those 
applications.


Giuliano

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


Re: [lazarus] SqlDB component madness

2007-12-12 Thread Graeme Geldenhuys
On 13/12/2007, John [EMAIL PROTECTED] wrote:
 I did put some stuff in the wiki:
 http://wiki.freepascal.org/SQLdb_Package.  Perhaps that doesn't count.
 Certainly it could be improved.

I'll have a look there thanks, but I was actually referring to the
class documentation created by fpdoc. So when I press F1 in Lazarus
I'll find some help on a class or method.


Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

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


Re: [lazarus] vote for bdd related component icon

2007-12-12 Thread Bee

I propose these icons. Just trying to help, again. :-D

-Bee-

has Bee.ography at:
http://beeography.wordpress.com
inline: tsqlquery.pnginline: tsqltransaction.pnginline: todbc.png

Re: [lazarus] Making GTK Thread Safe

2007-12-12 Thread Graeme Geldenhuys
On 13/12/2007, Antonio Sanguigni [EMAIL PROTECTED] wrote:

 I must confess I don't know too much of GTK1/2 but, for example if fpGUI is
 a framework from scratch indipendent from GTK, simply sending asynchronous
 messages to the main thread should work well ? It can elaborate the messages


This is exactly why I asked about using messages. :)  fpGUI has it's
own message system implemented (something like Windows), but for all
supported platforms.  I haven't tested threading with fpGUI yet, but
it's on the top of my todo list.


Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

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


Re: [lazarus] vote for bdd related component icon

2007-12-12 Thread Bee

I propose these icons. Just trying to help, again. :-D


Again.

-Bee-

has Bee.ography at:
http://beeography.wordpress.com

inline: thtmlhelpdatabase.pnginline: thtmlbrowserhelpviewer.png

Re: [lazarus] vote for bdd related component icon

2007-12-12 Thread Bee

I propose these icons. Just trying to help, again. :-D


Sorry... todbc should be todbcconnection.

-Bee-

has Bee.ography at:
http://beeography.wordpress.com

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


Re: [lazarus] Lazarus and FPC packages for PCLinuxOS 2007...

2007-12-12 Thread Graeme Geldenhuys
On 13/12/2007, S.Anıl Yılmaz [EMAIL PROTECTED] wrote:
  PCLinuxOS is a KDE based desktop distro derived from Mandriva and for now,
 is at the top spot at Distrowatch.com


And I was just about to ask What is PCLinuxOS? as I have heard the
name fly by in a few daily news posts. :)

Good to here FPC and Lazarus are getting a bit more attention in the
Linux distro's.  Why must distro's always be 90% C programming based!

Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

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


Re: [lazarus] Making GTK Thread Safe

2007-12-12 Thread Graeme Geldenhuys
On 13/12/2007, Giuliano Colla [EMAIL PROTECTED] wrote:
 Delphi relied on Windows buggy behavior of sending frequent useless
 messages around to wake up the main thread frequently.

That does sound weird.

 Idle, so that the OnIdle handler is never called. My kludge has been to
 have the Timer update a Label in a hidden corner of the screen, with a

So if the corner of the screen is hidden, how does that look?  What's
there, a black hole. ;-) I'm just teasing!

 must be drawn and what not, etc.), and passes that to a graphic thread
 which is the only one which has access to the display, then you have a
 real multithread GUI, which could fill a void in what's currently available.
 It could be a challenging project, don't you think?

Challenging to say the least, but sounds interesting!


Regards,
  - Graeme -


___
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

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


Re: [lazarus] vote for bdd related component icon

2007-12-12 Thread Bee

I propose these icons. Just trying to help, again. :-D


More. Actually, these are originally from Laurent's images. I'm just 
recompose them for other components images. ;)


-Bee-

has Bee.ography at:
http://beeography.wordpress.com

inline: tprocess.pnginline: tprintdialog.pnginline: tprintersetupdialog.pnginline: tpagesetupdialog.png

Re: [lazarus] Making GTK Thread Safe

2007-12-12 Thread Martin Schreiber
On Thursday 13 December 2007 01.28, Giuliano Colla wrote:
[...]
 The screen is a shared resource,  so it must be granted exclusive
 access. If one thinks of one main thread which besides doing its job
 receives messages from all the worker threads, creates a clean queue of
 what needs to be done (sorting out what's visible and what not, what
 must be drawn and what not, etc.), and passes that to a graphic thread
 which is the only one which has access to the display, then you have a
 real multithread GUI, which could fill a void in what's currently
 available. It could be a challenging project, don't you think?
 It just requires a not too large GUI system already existing (such as
 fpGui, not Lazarus which is too big to play with) and some enthusiasm
 (and also a lot of time, but for my company it could be important, so
 some resources could be found).

Don't forget MSEide+MSEgui:
http://sourceforge.net/projects/mseide-msegui
MSEgui has several possibilities to synchronize worker threads with the main 
GUI thread.

First there is application.lock/unlok which works on a mutex. The main 
eventloop acquires the mutex on start of a new round of the main eventloop 
and releases it after it gets idle.

Secondly there is application.synchronize which runs a callback  in a 
try/finally block with application.lock/unlock.

Thirdly there is application.postevent in order to send messages to MSEgui 
components. The posted events are feed into the main event queue and are 
delivered to the component in context of the main thread. 
application.postevent is thread safe and does not block.
tmsecomponent.postcomponentevent and asyncevent can be used for convenience, 
tmseform tmsedatamodule have onevent and onasyncevent where the messages can 
be handled in context of the main thread.

Fourthly there is FPC synchronize with the problem that checksynchronize is 
called once in onidle of then main event loop. One can call 
application.wakeupguithread to enable processing but there is a race 
condition.

Worth to mention is teventthread with its own message queue.
The graphic subsystem has its own locking mechanism so it is possible to draw 
onto off screen canvas (pixmap or printer) from worker threads.

Martin

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


Re: [lazarus] Lazarus and FPC packages for PCLinuxOS 2007...

2007-12-12 Thread Bee

Good to here FPC and Lazarus are getting a bit more attention in the
Linux distro's.  Why must distro's always be 90% C programming based!


I think fpc still can't unseat gcc position for console or system 
programming on Linux, at least in the short run. But, I believe Lazarus 
will be getting more and more attentions on Linux GUI programming, if we 
can keep the development active. Yes, there are some IDEs on Linux, but 
AFAIK there's no really IDE as good as Lazarus with complete RTL and 
class/library which enable developers focus on the development process 
instead of the compiling and deployment process. :-P wince platform 
support is also a strong point that make FPC, especially Lazarus, 
getting more and more attentions. Congrats! ;)


-Bee-

has Bee.ography at:
http://beeography.wordpress.com

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


Re: [lazarus] vote for bdd related component icon

2007-12-12 Thread wile64
2007/12/13, Bee [EMAIL PROTECTED]:

 I propose these icons. Just trying to help, again. :-D

 -Bee-

 has Bee.ography at:
 http://beeography.wordpress.com


tsql... Are not in the standard palette, it must have the same style ?

Thanks
-- 
Laurent.

My Components: http://wiki.lazarus.freepascal.org/Wile64
French Forum : http://lazforum-fr.tuxfamily.org/index.php


Re: [lazarus] vote for bdd related component icon

2007-12-12 Thread Bee
And please you use separate thread next time. Your messages are not 
related to vote for bdd.


Ahhh... I apologize for my stupid mistake. :( I'm too enthusiastic about 
this icon things. :-D


-Bee-

has Bee.ography at:
http://beeography.wordpress.com

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