[lazarus] Revision 9001 error

2006-03-22 Thread Panagiotis Sidiropoulos
SVN UPDATing Lazarus to revision 9001 and trying to compile it again, I
get error message:
---
/usr/share/lazarus/lcl/translations.pas(199,7) Error: Identifier not
found "SetUnitResourceStrings"
---

This is in translations.pas, at ine 199:
{$else ver2_0}
  SetUnitResourceStrings(ResUnitName,@Translate,po);
{$endif ver2_0}

Defining ver2_0, then following code is executed getting
compilation/linking carried out succesfuly but can't be sure on
funtionality:
---
{$ifdef ver2_0}
  for TableID:=0 to ResourceStringTableCount - 1 do begin
TableCount := ResourceStringCount(TableID);

// check if this table belongs to the ResUnitName
if TableCount=0 then continue;
s:=GetResourceStringName(TableID,0);
if CompareText(ResUnitName
+'.',LeftStr(s,length(ResUnitName)+1))<>0
then continue;

// translate all resource strings of the unit
for StringID := 0 to TableCount - 1 do begin
  DefValue:=GetResourceStringDefaultValue(TableID,StringID);
  // get UTF8 string
  s :=
po.Translate(GetResourceStringName(TableID,StringID),DefValue);

  if Length(s) > 0 then begin
// convert UTF8 to current local
s:=UTF8ToSystemCharSet(s);
SetResourceStringValue(TableID,StringID,s);
  end;
end;
  end;
{$else ver2_0}
---

Can someone please confirm this?

Regards, Panagiotis
(Linux, Knoppix, Lazarus revision 9001, FPC revision 3017)

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


Re: [lazarus] patch for documentation

2006-03-22 Thread Vincent Snijders

Vincent Snijders wrote:


Thanks. I applied the patch.

 From now on, the examples will be placed in a subdirectory with the 
name of the unit that the examples belong to. So you TCustomCheckbox 
example ended up in the docs/xml/lcl/stdctrls directory.




The files on lazarus-ccr are updated, look for example on:
http://lazarus-ccr.sourceforge.net/docs/lcl/stdctrls/tcustomcheckbox.allowgrayed.html

Michael, is there some way to let the published properties automatically 
use the description and examples of the public or protected properties?


Look at: 
http://lazarus-ccr.sourceforge.net/docs/lcl/stdctrls/tcheckbox.allowgrayed.html


This is exactly the same thing except it is now published. But it misses 
the example and the short description and description is different. IMHO 
it would be better if they share this information, otherwise you have to 
 carefully copy / paste things from TCustom to T.


Vincent.

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


Re: [lazarus] Using TDataset from another form

2006-03-22 Thread Diwakoe
thank you I'll try it.

On 3/22/06, Michael Van Canneyt <[EMAIL PROTECTED]> wrote:
>
> You need to do this in code. It doesn't work yet in designtime.
>
> In the 'OnShow' event of the form, connect the datasource to
> the dataset.
>

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


Re: [lazarus] Highlighters -> SQL

2006-03-22 Thread L505
> > I meant, maybe in the Lazarus 'New' dialog an item should appear 'New SQL
> > script file'. It should create a new, empty SQL file. If the SQL
> > highlighter is included, then I could write/edit my SQL scripts in Lazarus
> > itself.
>
> We don't need the new dialog to create empty files:
> Just type Ctrl+o and choose for example 'new.sql'.
> The correct highlighter is automatically selected.
>
>

*hidden IDE trick* - just like in Delphi 5 when I discovered you could double
click on clColor in the object inspector, and it would pop open a color
selection dialog. Really should have been a triple dot button like in Lazarus.

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


Re: [lazarus] Highlighters -> SQL

2006-03-22 Thread Horacio Jamilis
Thanks

- Original Message - 

> > But the highlighter is not the component TSynSqlSyn that is on the
lazarus
> > component pallete?
>
> Ah, I see. Sorry.
> I will add it.
>
> Mattias

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


Re: [lazarus] Highlighters -> SQL

2006-03-22 Thread Mattias Gaertner
On Thu, 23 Mar 2006 00:42:54 +0100 (Romance Standard Time)
Michael Van Canneyt <[EMAIL PROTECTED]> wrote:

> 
> 
> On Wed, 22 Mar 2006, Mattias Gaertner wrote:
> 
> > On Wed, 22 Mar 2006 23:49:03 +0100 (Romance Standard Time)
> > Michael Van Canneyt <[EMAIL PROTECTED]> wrote:
> >
> > >
> > >
> > > On Wed, 22 Mar 2006, Horacio Jamilis wrote:
> > >
> > > > Why lazarus does not include a highlighter for SQL?
> > > > It could be usefull to have it and I guess synedit should have it
> > > > already, but in the code editor popup menu, it offers many options
> > > > (like PHP or HTML) but not SQL...
> > > >
> > > > Just a question.
> > >
> > > I would like to see SQL included, this would be very useful for me as
> > > well.
> > >
> > > A new file type 'SQL script' could also be included, maybe ?
> >
> > What do you mean with 'file type'?
> > What file extension should do what?
> 
> I meant, maybe in the Lazarus 'New' dialog an item should appear 'New SQL
> script file'. It should create a new, empty SQL file. If the SQL
> highlighter is included, then I could write/edit my SQL scripts in Lazarus
> itself.

We don't need the new dialog to create empty files:
Just type Ctrl+o and choose for example 'new.sql'.
The correct highlighter is automatically selected. 


Mattias

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


Re: [lazarus] Highlighters -> SQL

2006-03-22 Thread Michael Van Canneyt


On Wed, 22 Mar 2006, Mattias Gaertner wrote:

> On Wed, 22 Mar 2006 23:49:03 +0100 (Romance Standard Time)
> Michael Van Canneyt <[EMAIL PROTECTED]> wrote:
>
> >
> >
> > On Wed, 22 Mar 2006, Horacio Jamilis wrote:
> >
> > > Why lazarus does not include a highlighter for SQL?
> > > It could be usefull to have it and I guess synedit should have it
> > > already, but in the code editor popup menu, it offers many options (like
> > > PHP or HTML) but not SQL...
> > >
> > > Just a question.
> >
> > I would like to see SQL included, this would be very useful for me as
> > well.
> >
> > A new file type 'SQL script' could also be included, maybe ?
>
> What do you mean with 'file type'?
> What file extension should do what?

I meant, maybe in the Lazarus 'New' dialog an item should appear 'New SQL 
script file'.
It should create a new, empty SQL file. If the SQL highlighter is included, then
I could write/edit my SQL scripts in Lazarus itself.

Michael.

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


Re: [lazarus] Supplement to Bug Issue 1861: Esc Key does not cancel drag (Patch)

2006-03-22 Thread Mattias Gaertner
On Wed, 22 Mar 2006 13:35:16 -0800 (PST)
Daniel Dugan <[EMAIL PROTECTED]> wrote:

> Patch for  dragdrop.inc as it neglects to check Drop parameter. [Pressing
> the ESC key during a drag sends a DragDone(false)]
>
>   Index: dragdock.inc
> ===
> --- dragdock.inc (revision 8981)
> +++ dragdock.inc (working copy)
> @@ -325,7 +325,7 @@
>TargetPos := DragObject.DragPos;
>  
>  // last DragOver message (make sure, there is at least one)
> -Accepted:=(ActiveDrag <> dopNone) and SendDragOver(dmDragLeave);
> +Accepted:=(ActiveDrag <> dopNone) and SendDragOver(dmDragLeave) and
> Drop;
>  
>  // erase global variables (dragging stopped)
>  DragControl := nil;

Thanks. Applied.

Mattias

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


Re: [lazarus] Highlighters -> SQL

2006-03-22 Thread Horacio Jamilis
I think that opening .sql files should select automatically the sql
highlighter.

- Original Message - 
From: "Mattias Gaertner" <[EMAIL PROTECTED]>
To: 
Sent: Wednesday, March 22, 2006 7:53 PM
Subject: Re: [lazarus] Highlighters -> SQL


> On Wed, 22 Mar 2006 23:49:03 +0100 (Romance Standard Time)
> Michael Van Canneyt <[EMAIL PROTECTED]> wrote:
>
> >
> >
> > On Wed, 22 Mar 2006, Horacio Jamilis wrote:
> >
> > > Why lazarus does not include a highlighter for SQL?
> > > It could be usefull to have it and I guess synedit should have it
> > > already, but in the code editor popup menu, it offers many options
(like
> > > PHP or HTML) but not SQL...
> > >
> > > Just a question.
> >
> > I would like to see SQL included, this would be very useful for me as
> > well.
> >
> > A new file type 'SQL script' could also be included, maybe ?
>
> What do you mean with 'file type'?
> What file extension should do what?
>
>
> > Mattias, is this possible ? Till now all my wizards created
> > regular pascal files.
>
>
> Mattias
>

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


Re: [lazarus] Highlighters -> SQL

2006-03-22 Thread Mattias Gaertner
On Wed, 22 Mar 2006 19:58:45 -0300
"Horacio Jamilis" <[EMAIL PROTECTED]> wrote:

> But the highlighter is not the component TSynSqlSyn that is on the lazarus
> component pallete?

Ah, I see. Sorry.
I will add it.

Mattias


> 
> - Original Message - 
> From: "Mattias Gaertner" <[EMAIL PROTECTED]>
> To: 
> Sent: Wednesday, March 22, 2006 7:39 PM
> Subject: Re: [lazarus] Highlighters -> SQL
> 
> 
> > On Wed, 22 Mar 2006 19:34:22 -0300
> > "Horacio Jamilis" <[EMAIL PROTECTED]> wrote:
> >
> > > Why lazarus does not include a highlighter for SQL?
> > > It could be usefull to have it and I guess synedit should have it
> already,
> > > but in the code editor popup menu, it offers many options (like PHP or
> > > HTML) but not SQL...
> > >
> > > Just a question.
> >
> > It has not been ported.
> > If you want to give it a try, and got questions, don't hesitate to ask
> here.
> >
> > 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

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


Re: [lazarus] Highlighters -> SQL

2006-03-22 Thread Horacio Jamilis
But the highlighter is not the component TSynSqlSyn that is on the lazarus
component pallete?

- Original Message - 
From: "Mattias Gaertner" <[EMAIL PROTECTED]>
To: 
Sent: Wednesday, March 22, 2006 7:39 PM
Subject: Re: [lazarus] Highlighters -> SQL


> On Wed, 22 Mar 2006 19:34:22 -0300
> "Horacio Jamilis" <[EMAIL PROTECTED]> wrote:
>
> > Why lazarus does not include a highlighter for SQL?
> > It could be usefull to have it and I guess synedit should have it
already,
> > but in the code editor popup menu, it offers many options (like PHP or
> > HTML) but not SQL...
> >
> > Just a question.
>
> It has not been ported.
> If you want to give it a try, and got questions, don't hesitate to ask
here.
>
> 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] Highlighters -> SQL

2006-03-22 Thread Mattias Gaertner
On Wed, 22 Mar 2006 23:49:03 +0100 (Romance Standard Time)
Michael Van Canneyt <[EMAIL PROTECTED]> wrote:

> 
> 
> On Wed, 22 Mar 2006, Horacio Jamilis wrote:
> 
> > Why lazarus does not include a highlighter for SQL?
> > It could be usefull to have it and I guess synedit should have it
> > already, but in the code editor popup menu, it offers many options (like
> > PHP or HTML) but not SQL...
> >
> > Just a question.
> 
> I would like to see SQL included, this would be very useful for me as
> well.
> 
> A new file type 'SQL script' could also be included, maybe ?

What do you mean with 'file type'?
What file extension should do what?

 
> Mattias, is this possible ? Till now all my wizards created
> regular pascal files.


Mattias

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


Re: [lazarus] Highlighters -> SQL

2006-03-22 Thread Michael Van Canneyt


On Wed, 22 Mar 2006, Horacio Jamilis wrote:

> Why lazarus does not include a highlighter for SQL?
> It could be usefull to have it and I guess synedit should have it already, 
> but in the code editor popup menu, it offers many options (like PHP or HTML) 
> but not SQL...
>
> Just a question.

I would like to see SQL included, this would be very useful for me as well.

A new file type 'SQL script' could also be included, maybe ?

Mattias, is this possible ? Till now all my wizards created
regular pascal files.

Michael.


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


Re: [lazarus] Highlighters -> SQL

2006-03-22 Thread Mattias Gaertner
On Wed, 22 Mar 2006 19:34:22 -0300
"Horacio Jamilis" <[EMAIL PROTECTED]> wrote:

> Why lazarus does not include a highlighter for SQL?
> It could be usefull to have it and I guess synedit should have it already,
> but in the code editor popup menu, it offers many options (like PHP or
> HTML) but not SQL...
> 
> Just a question.

It has not been ported.
If you want to give it a try, and got questions, don't hesitate to ask here.

Mattias

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


[lazarus] Highlighters -> SQL

2006-03-22 Thread Horacio Jamilis



Why lazarus does not include a highlighter for 
SQL?
It could be usefull to have it and I guess synedit 
should have it already, but in the code editor popup menu, it offers many 
options (like PHP or HTML) but not SQL...
 
Just a question.
 
Horacio Jamilis
[EMAIL PROTECTED]


Re: [lazarus] Sharing a project between Delphi 5+ and Lazarus

2006-03-22 Thread Andreas Berger
Please don't get me wrong. I really believe in Lazarus and think it has 
a great future. The main problem is that at work I am constantly under 
pressure to produce and the development environment with Delphi is 
faster. Debugging is the main problem.


I am developing all projects (3 at the moment) hoping that the finished 
versions will be lazarus executables. But during development and 
debugging I use Delphi and then convert to lazaraus.




Graeme and Alexsander, you are warned, if you believe Andreas, then 
your projects are to fail. :-)


Don't believe Tony Maro and A.J. Venter, their commercial applications 
are only used  on linux.


Of course if you want to develop for other platforms than windows, 
then Delphi is not ready yet.


Conclusion: If you want to use Lazarus commercially, say your 
application is for Linux, then project has a bigger chance of 
succeeding with Lazarus.




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


Re: [lazarus] patch to tComboBox

2006-03-22 Thread darekM




Mattias Gaertner napisał(a):

  On Wed, 22 Mar 2006 22:59:40 +0100
darekM <[EMAIL PROTECTED]> wrote:

  
  
Mattias Gaertner napisa?(a):


  On Wed, 22 Mar 2006 22:26:32 +0100
darekm <[EMAIL PROTECTED]> wrote:

  
  
  
Mattias Gaertner wrote:




  On Wed, 22 Mar 2006 21:40:31 +0100
darekm <[EMAIL PROTECTED]> wrote:

  
  
  
Hi
 please throw up  last patch,
 this works better


  
  It seems, you disabled using the widgetset TStrings in InitializeWnd.
Where is it assigned now?

  
  

On CreateComboBox You assign from fItems to Widgets list
for what reverse in Initialize


  
  Ok. Then the 
'NewStrings.Assign(FItems);'
is unneccessary in TCustomComboBox.InitializeWnd.
But you deleted the 'FItems:= NewStrings;' as well, didn't you?
  
  

Then I don't understand, how it should work, we have 2 tStrings (for 
component and internal in widgets) or one.

I assume there are two, if one patch should be changed.

  
  
There are two types and only one at a time.
Without a Handle TComboBox uses a TStringList.
When a handle is created, the widgetset creates a special TGtkListStringList
and the TStringList is freed.
When the handle is destroyed, a TStringList is created and the
TGtkListStringList is destroyed.

  

Now I see, I prepare new patch

  
Mattias

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


  






Re: [lazarus] patch to tComboBox

2006-03-22 Thread Mattias Gaertner
On Wed, 22 Mar 2006 22:59:40 +0100
darekM <[EMAIL PROTECTED]> wrote:

> Mattias Gaertner napisa?(a):
> > On Wed, 22 Mar 2006 22:26:32 +0100
> > darekm <[EMAIL PROTECTED]> wrote:
> >
> >   
> >> Mattias Gaertner wrote:
> >>
> >> 
> >>> On Wed, 22 Mar 2006 21:40:31 +0100
> >>> darekm <[EMAIL PROTECTED]> wrote:
> >>>
> >>>   
>  Hi
>   please throw up  last patch,
>   this works better
>  
> >>> It seems, you disabled using the widgetset TStrings in InitializeWnd.
> >>> Where is it assigned now?
> >>>
> >>>   
> >> On CreateComboBox You assign from fItems to Widgets list
> >> for what reverse in Initialize
> >> 
> >
> > Ok. Then the 
> > 'NewStrings.Assign(FItems);'
> > is unneccessary in TCustomComboBox.InitializeWnd.
> > But you deleted the 'FItems:= NewStrings;' as well, didn't you?
> >   
> Then I don't understand, how it should work, we have 2 tStrings (for 
> component and internal in widgets) or one.
> 
> I assume there are two, if one patch should be changed.

There are two types and only one at a time.
Without a Handle TComboBox uses a TStringList.
When a handle is created, the widgetset creates a special TGtkListStringList
and the TStringList is freed.
When the handle is destroyed, a TStringList is created and the
TGtkListStringList is destroyed.


Mattias

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


Re: [lazarus] patch to tComboBox

2006-03-22 Thread darekM




Mattias Gaertner napisał(a):

  On Wed, 22 Mar 2006 22:26:32 +0100
darekm <[EMAIL PROTECTED]> wrote:

  
  
Mattias Gaertner wrote:



  On Wed, 22 Mar 2006 21:40:31 +0100
darekm <[EMAIL PROTECTED]> wrote:

  
  
Hi
 please throw up  last patch,
 this works better

  
  It seems, you disabled using the widgetset TStrings in InitializeWnd.
Where is it assigned now?

  

On CreateComboBox You assign from fItems to Widgets list
for what reverse in Initialize

  
  
Ok. Then the 
'NewStrings.Assign(FItems);'
is unneccessary in TCustomComboBox.InitializeWnd.
But you deleted the 'FItems:= NewStrings;' as well, didn't you?
  

Then I don't understand, how it should work, we have 2 tStrings (for
component and internal in widgets) or one.

I assume there are two, if one patch should be changed.
Darek






Re: [lazarus] patch to tComboBox

2006-03-22 Thread Vincent Snijders

Mattias Gaertner wrote:

On Wed, 22 Mar 2006 22:26:32 +0100
darekm <[EMAIL PROTECTED]> wrote:



Mattias Gaertner wrote:



On Wed, 22 Mar 2006 21:40:31 +0100
darekm <[EMAIL PROTECTED]> wrote:



Hi
please throw up  last patch,
this works better


It seems, you disabled using the widgetset TStrings in InitializeWnd.
Where is it assigned now?



On CreateComboBox You assign from fItems to Widgets list
for what reverse in Initialize


Do you mean like in TWin32WSCustomComboBox.CreateHandle?

The win32 widgetset doesn't copy the items, but depends on the LCL doing 
this in IntializeWnd.





Ok. Then the 
'NewStrings.Assign(FItems);'

is unneccessary in TCustomComboBox.InitializeWnd.
But you deleted the 'FItems:= NewStrings;' as well, didn't you?


Vincent.

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


Re: [lazarus] patch to tComboBox

2006-03-22 Thread Mattias Gaertner
On Wed, 22 Mar 2006 22:26:32 +0100
darekm <[EMAIL PROTECTED]> wrote:

> Mattias Gaertner wrote:
> 
> >On Wed, 22 Mar 2006 21:40:31 +0100
> >darekm <[EMAIL PROTECTED]> wrote:
> >
> >>Hi
> >>  please throw up  last patch,
> >>  this works better
> >
> >It seems, you disabled using the widgetset TStrings in InitializeWnd.
> >Where is it assigned now?
> >
> On CreateComboBox You assign from fItems to Widgets list
> for what reverse in Initialize

Ok. Then the 
'NewStrings.Assign(FItems);'
is unneccessary in TCustomComboBox.InitializeWnd.
But you deleted the 'FItems:= NewStrings;' as well, didn't you?


Mattias
 

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


[lazarus] Supplement to Bug Issue 1861: Esc Key does not cancel drag (Patch)

2006-03-22 Thread Daniel Dugan
Patch for  dragdrop.inc as it neglects to check Drop parameter. [Pressing the ESC key during a drag sends a DragDone(false)]     Index: dragdock.inc===--- dragdock.inc (revision 8981)+++ dragdock.inc (working copy)@@ -325,7 +325,7 @@   TargetPos := DragObject.DragPos;  // last DragOver message (make sure, there is at least one)-    Accepted:=(ActiveDrag <> dopNone) and SendDragOver(dmDragLeave);+    Accepted:=(ActiveDrag <> dopNone) and SendDragOver(dmDragLeave) and Drop;  // erase global variables (dragging stopped) DragControl := nil;
		Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.

Re: [lazarus] TPopupMenu / TMenuItem width / height properties

2006-03-22 Thread Alexander Todorov
On 3/22/06, darekm <[EMAIL PROTECTED]> wrote:
> Alexander Todorov wrote:
>
> >Hi,
> >I need to get width and height of a popup menu or its items. For Gtk
> >something like
> >gdk_window_get_size (menu_item->window, &width, &height);
> >will do the trick I guess. For win32 there are some API functions I suppose.
> >
> >
> >
> You have to add new property to WinControl (or other component)
> in every specific OS function LCL call function from WidgetSet via
>
> TWSCustomComboBoxClass(WidgetSetClass).SetItemIndex(Self, FItemIndex);
>
>
> there are 3 implementation of SetItemIndex for Gtk, Gtk2, Win32
> they are call in case of use WidgetSetClass
> Darek

Thanks for the example. I will give it a try.

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


Re: [lazarus] patch to tComboBox

2006-03-22 Thread darekm

Mattias Gaertner wrote:


On Wed, 22 Mar 2006 21:40:31 +0100
darekm <[EMAIL PROTECTED]> wrote:

 


Hi
 please throw up  last patch,
 this works better
   



It seems, you disabled using the widgetset TStrings in InitializeWnd. Where
is it assigned now?


 


On CreateComboBox You assign from fItems to Widgets list
for what reverse in Initialize
Darek


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] patch to tComboBox

2006-03-22 Thread Mattias Gaertner
On Wed, 22 Mar 2006 21:40:31 +0100
darekm <[EMAIL PROTECTED]> wrote:

> Hi
>   please throw up  last patch,
>   this works better

It seems, you disabled using the widgetset TStrings in InitializeWnd. Where
is it assigned now?


Mattias

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


Re: [lazarus] TPopupMenu / TMenuItem width / height properties

2006-03-22 Thread darekm

Alexander Todorov wrote:


Hi,
I need to get width and height of a popup menu or its items. For Gtk
something like
gdk_window_get_size (menu_item->window, &width, &height);
will do the trick I guess. For win32 there are some API functions I suppose.

 


You have to add new property to WinControl (or other component)
in every specific OS function LCL call function from WidgetSet via
  
TWSCustomComboBoxClass(WidgetSetClass).SetItemIndex(Self, FItemIndex);



there are 3 implementation of SetItemIndex for Gtk, Gtk2, Win32
they are call in case of use WidgetSetClass


Example:

{Component}
procedure TCustomComboBox.SetReadOnly(const AValue: Boolean);
begin
 if FReadOnly=AValue then exit;
 if FStyle in [csSimple, csDropDown, csDropDownList] then exit;
 FReadOnly:=AValue;
 if HandleAllocated then
   TWSCustomComboBoxClass(WidgetSetClass).SetReadOnly(Self, AValue);
end;

{base WidgetSet}

procedure TWSCustomComboBox.SetReadOnly(const ACustomComboBox: 
TCustomComboBox;

 NewReadOnly: boolean);
begin
end;

{GTK WidgetSet}

procedure TGtkWSCustomComboBox.SetReadOnly(const ACustomComboBox: 
TCustomComboBox;

 NewReadOnly: boolean);
var
 Widget: PGtkWidget;
begin
 Widget:=PGtkCombo(ACustomComboBox.Handle)^.entry;
 if GtkWidgetIsA(Widget,{$ifdef 
GTK1}GTK_ENTRY_TYPE{$else}GTK_TYPE_ENTRY{$endif}) then

   gtk_entry_set_editable(PGtkEntry(Widget), not ACustomComboBox.ReadOnly);
end;


{Win32 WidgetSet}

procedure TWin32WSCustomEdit.SetReadOnly(const ACustomEdit: TCustomEdit; 
NewReadOnly: boolean);

begin
 Windows.SendMessage(ACustomEdit.Handle, EM_SETREADONLY, 
Windows.WPARAM(NewReadOnly), 0);

end;



Darek


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


[lazarus] patch to tComboBox

2006-03-22 Thread darekm

Hi
 please throw up  last patch,
 this works better


Darek
Index: interfaces/gtk/gtkproc.inc
===
--- interfaces/gtk/gtkproc.inc  (wersja 8985)
+++ interfaces/gtk/gtkproc.inc  (kopia robocza)
@@ -995,7 +995,7 @@
   if not ComboBox.HandleAllocated then
 RaiseGDBException('');
   ComboWidget:=PGtkCombo(ComboBox.Handle);
-  
ComboStrings:=TStrings(gtk_object_get_data(PGtkObject(ComboWidget),'LCLList'));
+  
ComboStrings:=TStrings(gtk_object_get_data(PGtkObject(ComboWidget),GtkListItemLCLListTag));
   CurText:=GetComboBoxText(ComboWidget);
   Result:=ComboStrings.IndexOf(CurText);
 end;
@@ -1014,7 +1014,7 @@
   LockOnChange(PGtkObject(ComboWidget),+1);
   gtk_list_select_item(PGtkList(ComboWidget^.list),Index);
   if Index>=0 then begin
-
ComboStrings:=TStrings(gtk_object_get_data(PGtkObject(ComboWidget),'LCLList'));
+
ComboStrings:=TStrings(gtk_object_get_data(PGtkObject(ComboWidget),GtkListItemLCLListTag));
 if Index < ComboStrings.Count
 then SetComboBoxText(ComboWidget, PChar(ComboStrings[Index]))
 else SetComboBoxText(ComboWidget, '#error#');
@@ -2375,7 +2375,9 @@
 
   if (not EventStopped) {and (not BeforeEvent)} and CanSendChar
   then begin
+   {$IFDEF EventTrace}
 EventTrace('char', data);
+{$ENDIF}
 
 KeyPressesChar:=#0;
 if Event^.Length = 1 then begin
@@ -3448,7 +3450,11 @@
 begin
   if Target=nil then DebugLn('[DeliverMessage] Target = nil');
   {$IFDEF VerboseDeliverMessage}
-  if TLMessage(AMessage).Msg<>LM_MOUSEMOVE then
+  if  (TLMessage(AMessage).Msg <>LM_MOUSEMOVE)
+and (TLMessage(AMessage).Msg <>LM_PAINT)
+and (TLMessage(AMessage).Msg <>LM_KEYDOWN)
+and (TLMessage(AMessage).Msg <>LM_KEYUP)
+and (TLMessage(AMessage).Msg <  CN_KEYDOWN ) then
 DebugLn('DeliverMessage ',DbgS(Target),
 ' ',TComponent(Target).Name,':',TObject(Target).ClassName,
 ' Message=',GetMessageName(TLMessage(AMessage).Msg));
Index: interfaces/gtk/gtklistsl.inc
===
--- interfaces/gtk/gtklistsl.inc(wersja 8985)
+++ interfaces/gtk/gtklistsl.inc(kopia robocza)
@@ -19,9 +19,6 @@
  *
 }
 
-const
-  GtkListItemGtkListTag = 'GtkList';
-  GtkListItemLCLListTag = 'LCLList';
 
 {*}
 {  Default compare functions  }
@@ -394,6 +391,9 @@
 var
   ChildWidget: Pointer;
 begin
+  {$IFDEF EventTrace}
+   Debugln('connect itemCallback');
+  {$ENDIF}
   gtk_object_set_data(PGtkObject(AItem), GtkListItemLCLListTag, nil);
   gtk_object_set_data(PGtkObject(AItem), GtkListItemGtkListTag, nil);
   {$ifdef GTK2}
@@ -624,7 +624,7 @@
   {$IFDEF CheckGtkList}
   ConsistencyCheck;
   {$ENDIF}
-//DebugLn('[TGtkListStringList.Assign] END ',Source.Classname);
+  //DebugLn('[TGtkListStringList.Assign] END ',Source.Classname);
 end;
 
 {--
Index: interfaces/gtk/gtkwsstdctrls.pp
===
--- interfaces/gtk/gtkwsstdctrls.pp (wersja 8985)
+++ interfaces/gtk/gtkwsstdctrls.pp (kopia robocza)
@@ -76,6 +76,7 @@
 class function  GetSelLength(const ACustomComboBox: TCustomComboBox): 
integer; override;
 class function  GetItemIndex(const ACustomComboBox: TCustomComboBox): 
integer; override;
 class function  GetMaxLength(const ACustomComboBox: TCustomComboBox): 
integer; override;
+class function  GetText(const AWinControl: TWinControl; var AText: 
String): Boolean; override;
 
 class procedure SetArrowKeysTraverseList(const ACustomComboBox: 
TCustomComboBox; 
   NewTraverseList: boolean); override;
@@ -617,10 +618,20 @@
   end;
 end;
 
+function TGtkWSCustomComboBox.GetText(const AWinControl: TWinControl; var 
AText: String): Boolean;
+begin
+//  DebugLn('TGtkWSCustomComboBox.Gettext ',DbgSName(ACustomComboBox),' 
',GetWidgetDebugReport(PGtkWidget(ACustomComboBox.Handle)));
+
+  Atext:=GetComboBoxText(PGtkCombo(AWinControl.handle));
+  result:=true;
+end;
+
 function TGtkWSCustomComboBox.GetItemIndex(
   const ACustomComboBox: TCustomComboBox): integer;
+var
+  CurText : string;
 begin
-  //DebugLn('TGtkWSCustomComboBox.GetItemIndex ',DbgSName(ACustomComboBox),' 
',DebugGtkWidgets.GetInfo(Pointer(ACustomComboBox.Handle),true));
+  //DebugLn('TGtkWSCustomComboBox.GetItemIndex ',DbgSName(ACustomComboBox),' 
',GetWidgetDebugReport(PGtkWidget(ACustomComboBox.Handle)));
   Result:=GetComboBoxItemIndex(ACustomComboBox);
 end;
 
@@ -711,7 +722,7 @@
   const ACustomComboBox: TCustomComboBox): TStrings;
 begin
   Result := TStrings(gtk_object_get_data(PGtkObject(ACustomComboBox.Handle),
- 'LCLList'));
+ GtkListItemLCLListTag));
 en

Re: [lazarus] TSynAnySyn ready for Synedit in Lazarus

2006-03-22 Thread Mattias Gaertner
On Tue, 21 Mar 2006 15:05:21 -0700
L505 <[EMAIL PROTECTED]> wrote:

> I converted SynAnySyn for use with Lazarus. SynAnySyn is like SynUniSyn,
> but simpler language config files.
> 
> UniSyn was also not working with Case insensitive languages, while AnySyn
> appears to work from brief testing I did.

Thanks. Added and registered in the IDE.

Mattias

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


Re: [lazarus] Question about extending Configure Installed Package dlg

2006-03-22 Thread Mattias Gaertner
On Mon, 20 Mar 2006 13:54:30 +0100
Tomas Gregorovic <[EMAIL PROTECTED]> wrote:

> Hi,
> I'm trying to improve the Configure Installed Package dialog by viewing 
> some info about packages like author, description and in future register 
> components list.
> 
> The problem is that this info is shown only for installed packages and 
> doesn't work for the others.
> So it is possible to get this info for non-installed packages? And how?
> 
> I have following code, the full code is attached:
> 
> FSelectedPkg: TLazPackage;
> 
> procedure TInstallPkgSetDialog.UpdatePackageInfo(List: TListBox);
> var
>   PkgName: String;
>   PkgID: TLazPackageID;
> begin
>   if List = nil then Exit;
>   PkgName := '';
>   if List.ItemIndex >= 0 then
> PkgName := List.Items[List.ItemIndex];
> 
>   if PkgName = '' then Exit;
>   if Assigned(FSelectedPkg) then
> if PkgName = FSelectedPkg.IDAsString then Exit;
>
>   PkgInfoMemo.Clear;
>   PkgID := TLazPackageID.Create;
>   try
> PkgID.StringToID(PkgName);
> FSelectedPkg := PackageGraph.FindPackageWithID(PkgID);
> 
> if FSelectedPkg <> nil then
> begin
>   with PkgInfoMemo.Lines do
>   begin
> Add(lisPckOptsAuthor + ': ' + FSelectedPkg.Author);
> Add(lisPckOptsDescriptionAbstract + ': ' + 
> FSelectedPkg.Description);
>   end;
> end;
>   finally
> PkgId.Free;
>   end;
> end;

Thanks. Applied.

I fixed the gtk TListBox.ItemIndex with MutliSelect and added reading the
.lpk files for not loaded packages.

Mattias

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


[lazarus] patch for tComboBox

2006-03-22 Thread darekm

Resolved:

why selecting a combobox on editor options and pressing Escape
raises an exception?

repair memory leak in tComboBox 



Darek




Index: interfaces/gtk/gtkproc.inc
===
--- interfaces/gtk/gtkproc.inc  (wersja 8985)
+++ interfaces/gtk/gtkproc.inc  (kopia robocza)
@@ -995,7 +995,7 @@
   if not ComboBox.HandleAllocated then
 RaiseGDBException('');
   ComboWidget:=PGtkCombo(ComboBox.Handle);
-  
ComboStrings:=TStrings(gtk_object_get_data(PGtkObject(ComboWidget),'LCLList'));
+  
ComboStrings:=TStrings(gtk_object_get_data(PGtkObject(ComboWidget),GtkListItemLCLListTag));
   CurText:=GetComboBoxText(ComboWidget);
   Result:=ComboStrings.IndexOf(CurText);
 end;
@@ -1014,7 +1014,7 @@
   LockOnChange(PGtkObject(ComboWidget),+1);
   gtk_list_select_item(PGtkList(ComboWidget^.list),Index);
   if Index>=0 then begin
-
ComboStrings:=TStrings(gtk_object_get_data(PGtkObject(ComboWidget),'LCLList'));
+
ComboStrings:=TStrings(gtk_object_get_data(PGtkObject(ComboWidget),GtkListItemLCLListTag));
 if Index < ComboStrings.Count
 then SetComboBoxText(ComboWidget, PChar(ComboStrings[Index]))
 else SetComboBoxText(ComboWidget, '#error#');
@@ -2375,7 +2375,9 @@
 
   if (not EventStopped) {and (not BeforeEvent)} and CanSendChar
   then begin
+   {$IFDEF EventTrace}
 EventTrace('char', data);
+{$ENDIF}
 
 KeyPressesChar:=#0;
 if Event^.Length = 1 then begin
@@ -3448,7 +3450,11 @@
 begin
   if Target=nil then DebugLn('[DeliverMessage] Target = nil');
   {$IFDEF VerboseDeliverMessage}
-  if TLMessage(AMessage).Msg<>LM_MOUSEMOVE then
+  if  (TLMessage(AMessage).Msg <>LM_MOUSEMOVE)
+and (TLMessage(AMessage).Msg <>LM_PAINT)
+and (TLMessage(AMessage).Msg <>LM_KEYDOWN)
+and (TLMessage(AMessage).Msg <>LM_KEYUP)
+and (TLMessage(AMessage).Msg <  CN_KEYDOWN ) then
 DebugLn('DeliverMessage ',DbgS(Target),
 ' ',TComponent(Target).Name,':',TObject(Target).ClassName,
 ' Message=',GetMessageName(TLMessage(AMessage).Msg));
Index: interfaces/gtk/gtklistsl.inc
===
--- interfaces/gtk/gtklistsl.inc(wersja 8985)
+++ interfaces/gtk/gtklistsl.inc(kopia robocza)
@@ -19,9 +19,6 @@
  *
 }
 
-const
-  GtkListItemGtkListTag = 'GtkList';
-  GtkListItemLCLListTag = 'LCLList';
 
 {*}
 {  Default compare functions  }
@@ -394,6 +391,9 @@
 var
   ChildWidget: Pointer;
 begin
+  {$IFDEF EventTrace}
+   Debugln('connect itemCallback');
+  {$ENDIF}
   gtk_object_set_data(PGtkObject(AItem), GtkListItemLCLListTag, nil);
   gtk_object_set_data(PGtkObject(AItem), GtkListItemGtkListTag, nil);
   {$ifdef GTK2}
@@ -624,7 +624,7 @@
   {$IFDEF CheckGtkList}
   ConsistencyCheck;
   {$ENDIF}
-//DebugLn('[TGtkListStringList.Assign] END ',Source.Classname);
+  //DebugLn('[TGtkListStringList.Assign] END ',Source.Classname);
 end;
 
 {--
Index: interfaces/gtk/gtkwsstdctrls.pp
===
--- interfaces/gtk/gtkwsstdctrls.pp (wersja 8985)
+++ interfaces/gtk/gtkwsstdctrls.pp (kopia robocza)
@@ -76,6 +76,7 @@
 class function  GetSelLength(const ACustomComboBox: TCustomComboBox): 
integer; override;
 class function  GetItemIndex(const ACustomComboBox: TCustomComboBox): 
integer; override;
 class function  GetMaxLength(const ACustomComboBox: TCustomComboBox): 
integer; override;
+class function  GetText(const AWinControl: TWinControl; var AText: 
String): Boolean; override;
 
 class procedure SetArrowKeysTraverseList(const ACustomComboBox: 
TCustomComboBox; 
   NewTraverseList: boolean); override;
@@ -429,6 +430,7 @@
   Widget: PGtkWidget;// pointer to gtk-widget
   Handle: HWND;
 begin
+
   Handle := ACustomListBox.Handle;
   case ACustomListBox.fCompStyle of
 csCListBox:
@@ -617,10 +619,25 @@
   end;
 end;
 
+function TGtkWSCustomComboBox.GetText(const AWinControl: TWinControl; var 
AText: String): Boolean;
+begin
+//  DebugLn('TGtkWSCustomComboBox.Gettext ',DbgSName(ACustomComboBox),' 
',GetWidgetDebugReport(PGtkWidget(ACustomComboBox.Handle)));
+
+  Atext:=GetComboBoxText(PGtkCombo(AWinControl.handle));
+  result:=true;
+end;
+
 function TGtkWSCustomComboBox.GetItemIndex(
   const ACustomComboBox: TCustomComboBox): integer;
+var
+  CurText : string;
 begin
-  //DebugLn('TGtkWSCustomComboBox.GetItemIndex ',DbgSName(ACustomComboBox),' 
',DebugGtkWidgets.GetInfo(Pointer(ACustomComboBox.Handle),true));
+  DebugLn('TGtkWSCustomComboBox.GetItemIndex ',DbgSName(ACustomComboBox),' 
',GetWidgetDebugReport(PGtkWidget(ACustomComboBox.Handle)));
+//  GetText(ACustomComboBox,CurText);
+//  if (ACustomComboBox.fItemIndex>=0) 

Re: [lazarus] Sharing a project between Delphi 5+ and Lazarus

2006-03-22 Thread Mattias Gaertner
On Wed, 22 Mar 2006 20:28:48 +0100
[EMAIL PROTECTED] wrote:

> Mattias Gaertner wrote:
> > On Wed, 22 Mar 2006 20:11:56 +0100
> > [EMAIL PROTECTED] wrote:
> >
> >   
> >> Andreas Berger wrote:
> >> 
> >>> Unfortunatly Lazarus is not yet ready to be used in the comercial 
> >>> world where development time is of essence. There are many things that
> >
> >>> greatly slow down development when it is done via Lazarus. The IDE is 
> >>> not yet as agile as Delphi's, the debugger is practically useless 
> >>> under windows and the linker time is totally unacceptable. For that 
> >>> reason I do all development with Delphi and then port to Lazarus. It 
> >>> is still a lot of work, but less than developing directly with 
> >>> Lazarus. I am sure we will solve all this, but in the mean time . . .
> >:( >>
> >>> I develop using Delphi and then compile the Lazarus program from the 
> >>> command line via a batch file. I have found this faster. I also have 
> >>> my simple dfm2lfm converter that converts all .dfm files in the root 
> >>> directory on down to .lfm file and then calls the lazres program.
> >>>
> >>> Regards
> >>> Andreas
> >>>
> >>>   
> >> I am doing the same. The main difficulty are still unknown properties 
> >> and un-aligned components after lazres execution.
> >> 
> >
> > Can you send an example for un-aligned controls?
> 
> http://www.lazarus.freepascal.org/mantis/view.php?id=942

Thanks.
But I guess, it is not easy to solve. How does Delphi reposition the
TGroupBox childs, when the font changes?

Mattias

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


Re: [lazarus] Sharing a project between Delphi 5+ and Lazarus

2006-03-22 Thread rstar

Mattias Gaertner wrote:

On Wed, 22 Mar 2006 20:11:56 +0100
[EMAIL PROTECTED] wrote:

  

Andreas Berger wrote:

Unfortunatly Lazarus is not yet ready to be used in the comercial 
world where development time is of essence. There are many things that 
greatly slow down development when it is done via Lazarus. The IDE is 
not yet as agile as Delphi's, the debugger is practically useless 
under windows and the linker time is totally unacceptable. For that 
reason I do all development with Delphi and then port to Lazarus. It 
is still a lot of work, but less than developing directly with 
Lazarus. I am sure we will solve all this, but in the mean time . . . :(


I develop using Delphi and then compile the Lazarus program from the 
command line via a batch file. I have found this faster. I also have 
my simple dfm2lfm converter that converts all .dfm files in the root 
directory on down to .lfm file and then calls the lazres program.


Regards
Andreas

  
I am doing the same. The main difficulty are still unknown properties 
and un-aligned components after lazres execution.



Can you send an example for un-aligned controls?

Mattias

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


  


http://www.lazarus.freepascal.org/mantis/view.php?id=942

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


Re: [lazarus] Sharing a project between Delphi 5+ and Lazarus

2006-03-22 Thread Mattias Gaertner
On Wed, 22 Mar 2006 20:11:56 +0100
[EMAIL PROTECTED] wrote:

> Andreas Berger wrote:
> > Unfortunatly Lazarus is not yet ready to be used in the comercial 
> > world where development time is of essence. There are many things that 
> > greatly slow down development when it is done via Lazarus. The IDE is 
> > not yet as agile as Delphi's, the debugger is practically useless 
> > under windows and the linker time is totally unacceptable. For that 
> > reason I do all development with Delphi and then port to Lazarus. It 
> > is still a lot of work, but less than developing directly with 
> > Lazarus. I am sure we will solve all this, but in the mean time . . . :(
> >
> > I develop using Delphi and then compile the Lazarus program from the 
> > command line via a batch file. I have found this faster. I also have 
> > my simple dfm2lfm converter that converts all .dfm files in the root 
> > directory on down to .lfm file and then calls the lazres program.
> >
> > Regards
> > Andreas
> >
> I am doing the same. The main difficulty are still unknown properties 
> and un-aligned components after lazres execution.

Can you send an example for un-aligned controls?

Mattias

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


Re: [lazarus] Sharing a project between Delphi 5+ and Lazarus

2006-03-22 Thread rstar

Andreas Berger wrote:
Unfortunatly Lazarus is not yet ready to be used in the comercial 
world where development time is of essence. There are many things that 
greatly slow down development when it is done via Lazarus. The IDE is 
not yet as agile as Delphi's, the debugger is practically useless 
under windows and the linker time is totally unacceptable. For that 
reason I do all development with Delphi and then port to Lazarus. It 
is still a lot of work, but less than developing directly with 
Lazarus. I am sure we will solve all this, but in the mean time . . . :(


I develop using Delphi and then compile the Lazarus program from the 
command line via a batch file. I have found this faster. I also have 
my simple dfm2lfm converter that converts all .dfm files in the root 
directory on down to .lfm file and then calls the lazres program.


Regards
Andreas

I am doing the same. The main difficulty are still unknown properties 
and un-aligned components after lazres execution.


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


Re: [lazarus] Centering dialog text

2006-03-22 Thread Mattias Gaertner
On Mon, 20 Mar 2006 14:36:11 +0200
"Ere Maijala" <[EMAIL PROTECTED]> wrote:

> On 1/4/06, Mattias Gaertner <[EMAIL PROTECTED]> wrote:
> > On Mon, 05 Dec 2005 14:22:33 +0200
> > Ere Maijala <[EMAIL PROTECTED]> wrote:
> >
> > > Hi,
> > >
> > > it seems to me that the code in promptdialog.inc didn't center the
> > > dialog text as it should. How about the attached patch? Looks quite a
> > > bit better for me, though I've only tested on Windows. As soon as we
> > > get rid of the glyphs in the buttons, the dialogs will be quite ok..
> >
> > You forgot to alter the comments, so I can only guess, what you
> > intended.
> >
> > Maybe you want a space on the right side of the size of the icon on the
> > left?
> >
> >
> 
> Hi,
> 
> I kind of forgot this but now I'm back again with a new patch. What I
> really want is the text to be on the middle of the dialog regardless
> of the glyph. Previously the text was way too much to the right
> because the text offset was only taken into account on the left side
> of the text although the text should have been as far from the right
> border of the dialog.

Thanks. But IMO it looks like a waste of space and I don't know any program,
that centers a left aligned text in its messages. Maybe I'm using the wrong
applications?


Mattias

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


Re: [lazarus] Sharing a project between Delphi 5+ and Lazarus

2006-03-22 Thread rstar

Michael Van Canneyt wrote:

On Wed, 22 Mar 2006 [EMAIL PROTECTED] wrote:

  

CrossFPC seems dead, we haven't heard from Simon Kissel in ages
(at least I haven't).

But I'm reasonably well informed. I helped him to create the
resources support in the compiler.

What do you need to know ?

Michael.

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



  

he wrote that there still problems with the CLX license...



I doubt this problem will be solved in the near future, with the current
state of affairs at Borland.

  

but there
will be a new release in the near future...



Aha, a new release ? This is new intel !

Did you hear this in a private communication ?

  

He told me that.

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


Re: [lazarus] Patch for LCL Menu units

2006-03-22 Thread Mattias Gaertner
On Mon, 20 Mar 2006 11:55:54 +0200
"Graeme Geldenhuys" <[EMAIL PROTECTED]> wrote:

> Hi
> 
> Attached is a patch that implements a few missing functions (Find,
> IsLine) compared to Delphi. Noticed this while porting my Delphi app
> to Lazarus.  The patch needs to be applied from the root Lazarus
> directory.

Thanks. Applied.

Mattias

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


Re: [lazarus] Bug Report 1861: found cause

2006-03-22 Thread Daniel Dugan
Mattias Gaertner <[EMAIL PROTECTED]> wrote: On Wed, 22 Mar 2006 09:13:53 -0800 (PST)Daniel Dugan <[EMAIL PROTECTED]>wrote:> OK. Also need to change TControl.MouseMove:> > {-->  TControl MouseMove> ---> ---}> Procedure TControl.MouseMove(Shift: TShiftState; X, Y: Integer);> var> P: TPoint;> DragObjectDragging : Boolean;> begin> if DragObject <> nil then> DragObjectDragging := true else> DragObjectDragging := false;> if DragObjectDragging then begin> P:=ClientToScreen(Point(X,Y));> DragObject.MouseMove(Shift,P.X,P.Y);> end;> if
 Assigned(FOnMouseMove) then FOnMouseMove(Self, Shift, X,Y);> end; > > This makes DragOver events fire as well.> > Daniel Dugan <[EMAIL PROTECTED]>wrote:> Drat! This successfully ends a drag operation but hoses up Dragover> event handling. Still trying.> > Daniel Dugan <[EMAIL PROTECTED]>wrote: > > Daniel Dugan <[EMAIL PROTECTED]>wrote: I think I've found a> cause for an end drag not working as I reported in issue 1861.> > TControl.MouseUp tests TControl.Dragging, and it is returning false> because the control that generates the mouseup is the target and not the> source. This prevents DragObject.MouseUp from firing when the mouse> button is released. I'm not sure I'm up to finding the fix, but I will> still keep looking as time permits.> > Also, Controls.pp has 2 SetCaptureControl procedures. Apparently, the> on! e !
with only
 the Control:TControl parameter is correct.> > -> Yahoo! Mail> Bring photos to life! New PhotoMail makes sharing a breeze. > ! Try this: > > {-->  TControl MouseUp> -> -} Procedure TControl.MouseUp(Button: TMouseButton; Shift:TShiftState;> X, Y: Integer);> var> P: TPoint;> DragObjectDragging : Boolean;> begin> if DragObject <> nil then> DragObjectDragging := TControl(DragObject.DragTarget).Dragging;> if (Button in [mbLeft,mbRight]) and DragObjectDragging and> (DragObject<>nil) then begin> P:=ClientToScreen(Point(X,Y));> DragObject.MouseUp(Button,Shift,P.X,P.Y);> end;> if Assigned(FOnMouseUp) then FOnMouseUp(Self, Button, Shi!
ft,
 X,Y);> end;Can you create a diff, so we can see the differences?Mattias     Here you go!     Daniel
		Yahoo! Travel 
Find  
great deals to the top 10 hottest destinations!Index: control.inc
===
--- control.inc (revision 8981)
+++ control.inc (working copy)
@@ -2898,8 +2898,12 @@
 Procedure TControl.MouseMove(Shift: TShiftState; X, Y: Integer);
 var
   P: TPoint;
+  DragObjectDragging : Boolean;
 begin
-  if Dragging and (DragObject<>nil) then begin
+  if DragObject <> nil then
+DragObjectDragging := true else
+DragObjectDragging := false;
+  if DragObjectDragging then begin
 P:=ClientToScreen(Point(X,Y));
 DragObject.MouseMove(Shift,P.X,P.Y);
   end;
@@ -2913,8 +2917,12 @@
   X, Y: Integer);
 var
   P: TPoint;
+  DragObjectDragging : Boolean;
 begin
-  if (Button in [mbLeft,mbRight]) and Dragging and (DragObject<>nil) then begin
+  if DragObject <> nil then
+DragObjectDragging := true else
+DragObjectDragging := false;
+if (Button in [mbLeft,mbRight]) and DragObjectDragging then begin
 P:=ClientToScreen(Point(X,Y));
 DragObject.MouseUp(Button,Shift,P.X,P.Y);
   end;


Re: [lazarus] Patch for TBitmap Mask proposal

2006-03-22 Thread Mattias Gaertner
On Mon, 13 Mar 2006 11:09:19 +0100
Tomas Gregorovic <[EMAIL PROTECTED]> wrote:

> Mattias Gaertner napsal(a):
> 
> >On Fri, 10 Mar 2006 14:15:44 +0100
> >Tomas Gregorovic <[EMAIL PROTECTED]> wrote:
> >
> >  
> >
> >>Hi,
> >>finally I have finished my long battle around bitmap masks.
> >>
> >>I have implemented method CreateBitmapMask, which creates mask according
> >
> >>to transparent color. The white pixels stand for opacity and black for 
> >>transperency (I have found out that this is in contrary to Delphi). I 
> >>hope this routine will function under all supported OSes - I have tested
> >
> >>it on win only.
> >>
> >>Next, I had to change btimap and image transparent* properties to behave
> >
> >>like Delphi equivalents.
> >>
> >>The difficult problem was how to keep transparency built  in source of 
> >>bitmaps such as *.xpm. This I have solved by creating new seperate mask 
> >>accessible throught AlphaMaskHandle, which stores alpha channel data 
> >>that were previously stored in MaskHandle object.
> >>
> >>I have attached small test project, which nicely illustrates right mask 
> >>functioning.
> >>
> >>
> >
> >You added an AlphaMaskHandle, but I don't see when we need both
> >MaskHandle and AlphaMaskHandle.
> >Why not use the MaskHandle for the Mask?
> >
> >And btw: Not all widgetsets use separate Handle and MaskHandle.
> >
> >
> >Mattias
> >  
> >
> Sorry, my fault. Now when I have better looked into code I see it.
> Therefore I have moved into using only MaskHandle and added flag 
> FAlphaMasked, which says whether the MaskHandle is source bitmap alpha 
> mask and then the transparent color is not used.

I took a closer look at the patch:
You rewrote TBitmap.InitFPImageReader to not use for the transparentcolor
the left, bottom pixel of the coming stream. Why?
Canvas.Pixels[0,Height-1] does not work under gtk, so
TBitmap.GetTransparentColor does not work this way.
And where do you actually create the alpha mask?


Mattias

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


Re: [lazarus] TXMLPropertyStorage question

2006-03-22 Thread Michael Van Canneyt


On Wed, 22 Mar 2006, Darius Blaszijk wrote:

> - Original Message -
> From: "Micha Nelissen" <[EMAIL PROTECTED]>
> To: 
> Sent: Tuesday, March 21, 2006 9:07 AM
> Subject: Re: [lazarus] TXMLPropertyStorage question
>
>
> > Felipe Monteiro de Carvalho wrote:
> >> "You can easily cope with this I think. Write an onclosequery (or
> >> onclose)
> >> handler for the main form. When the form closes, in the handler loop
> >> through
> >> Screen.Forms and call close on each form (except if it equals Self). This
> >> will trigger onclose in each form which is what you are after. In
> >> onclosequery for the main form dialogs are still functional so you'd be
> >> able
> >> ask the user. "
> >
> > Sounds like a hack from my POV. Where is the backward incompatibility
> > problem to delphi exactly when we fire OnClose when it's supposed to be
> > fired ?
>
> So how would I fire an onclose event when objects are created with no parent
> object (TForm.Create(nil))?

Simply call close ?

Procedure TParentForm.OnCLoseQuery(xyz);

begin
  MyChildForm.Close;
  Application.ProcessMessages; // Allow form to actually close...
end;

That should do the trick. Delphi also doesn't do do this automatically.
I create all actual forms on the fly, and dock them on other forms.
The parent form first closes all forms docked on it, and only then
allows to close itself.

Michael.

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


Re: [lazarus] TXMLPropertyStorage question

2006-03-22 Thread Darius Blaszijk
- Original Message - 
From: "Micha Nelissen" <[EMAIL PROTECTED]>

To: 
Sent: Tuesday, March 21, 2006 9:07 AM
Subject: Re: [lazarus] TXMLPropertyStorage question



Felipe Monteiro de Carvalho wrote:
"You can easily cope with this I think. Write an onclosequery (or 
onclose)
handler for the main form. When the form closes, in the handler loop 
through

Screen.Forms and call close on each form (except if it equals Self). This
will trigger onclose in each form which is what you are after. In
onclosequery for the main form dialogs are still functional so you'd be 
able

ask the user. "


Sounds like a hack from my POV. Where is the backward incompatibility 
problem to delphi exactly when we fire OnClose when it's supposed to be 
fired ?


So how would I fire an onclose event when objects are created with no parent 
object (TForm.Create(nil))?


Darius 


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


Re: [lazarus] fedora 5 missing glib

2006-03-22 Thread Mattias Gaertner
On Tue, 21 Mar 2006 23:49:57 -0800
johnf <[EMAIL PROTECTED]> wrote:

> On Tuesday 21 March 2006 22:57, Vincent Snijders wrote:
> > johnf wrote:
> > > On Tuesday 21 March 2006 03:59, Michael Van Canneyt wrote:
> > >>On Tue, 21 Mar 2006, johnf wrote:
> > >>>I got Lazarus installed and it appears to run but when I attempt to
> > >>>compile a project it errors immediately with "unable to find glib". 
> > >>> When I check the installed packages it shows glib as installed.  How
> > >do >> I tell Lazarus where glib is located?
> > >>
> > >>You must install at least glib-devel, gtk-devel, gdkpixbuf-devel.
> > >>
> > >>I think there is a FAQ about this in the WIKI.
> > >>
> > >>Michael.
> > >
> > > I have it fixed.  I really don't know the cause because in my efforts
> > > to fix the issue I lost the sequence of events.  But in the end I
> > > found "2.0.2/Units" instead of "2.1.1/Units" in the fpc.cfg file.  I
> > > actually thought I had checked the fpc.cfg file but to be honest I was
> > > really checking to see that I did not have other "cfg" files (as per
> > > the FAQ).  Anyway it works.
> >
> > Like Joost did a couple of days ago, I want to stress again the
> > importance of quoting exact (verbatim) error messages.
> >
> > If you had quoted the exact error message, which contains the word
> > 'unit',then we would have know, it is not a problem with a .so file,
> > but with a .ppu file.
> >
> > Vincent.
> I did in fact quote the exact error message.  Unable to locate the glib.  

I can't find the text 'Unable to locate the' neither in the lazarus sources
nor the fpc sources. 
Strange.


> Nothing else was part of the message.  There was no other message
> displayed.


Mattias

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


Re: [lazarus] More info on fedora 5

2006-03-22 Thread Mattias Gaertner
On Wed, 22 Mar 2006 10:50:45 -0500
Alain Michaud <[EMAIL PROTECTED]> wrote:

> > Hi,
> > 
> > OK I decided to start fresh.  I re-installed Fedora 5.  Then I installed
> > FPC  snapshots of 2.1.1 and Lazarus 0.9.13.  After installing (as root)
> > I  discovered that 'fpc.cfg' is missing.  I checked the RPM's (the best
> > I could)  and did not find the file 'fpc.cfg' in the list to install.  I
> > wonder what  else might be missing.  Since what I installed is called a
> > snapshot does that  mean the install routines expected a prior install
> > of 2.0.2?
> > 
> > John
> 
> 
> Hi,
> 
>  I think that instaling the stable (compiled) version 2.0.0 first is
> usefull in order to make sure that everything is there. This is much
> easier: just have to type : "sh install.sh" and BINGO

Use at least 2.0.2 with lazarus.

Mattias


 
> The files that one has to keep an eye in:
> 
> /etc/fpc.cfg:
> 
> check for the lines:
> 
> -Fu/usr/local/lib/fpc/2.0.0/units/$fpctarget
> -Fu/usr/local/lib/fpc/2.0.0/units/$fpctarget/*
> -Fu/usr/local/lib/fpc/2.0.0/units/$fpctarget/rtl
> 
> also
> 
> /usr/local/bin 
> 
> contains all the binaries like fpc, h2pas, etc... Check the date of
> those files and check if there are other files of the same name in other
> folders like /usr/bin/ etc...  remove them!
> 
> also
> 
> /usr/local/bin/ppc386 -> /usl/local/lib/fpc/2.0.0/ppc386
> 
> make sure that this symbolic link points to to proper ppc386
> 
> also remove ANY other pc386 that are in /usr/bin and other places like
> that (be carefull they may be hiden sometimes). The instaler tends to
> put those ppc386 everywhere!
> 
> Finally, when you run lazarus, you should check: /environment/"fpc
> source directory" and press the buton: "Rescan the source directory"
> 
> Cherrs
> 
> Alain
> 
> 
> 
> 
>   
> 
> 
> 
> _
>  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] Bug Report 1861: found cause

2006-03-22 Thread Mattias Gaertner
On Wed, 22 Mar 2006 09:13:53 -0800 (PST)
Daniel Dugan <[EMAIL PROTECTED]> wrote:

> OK. Also need to change TControl.MouseMove:
>
>   {--
>    TControl MouseMove
>   ---
>   ---}
> Procedure TControl.MouseMove(Shift: TShiftState; X, Y: Integer);
> var
>   P: TPoint;
>   DragObjectDragging : Boolean;
> begin
>   if DragObject <> nil then
> DragObjectDragging := true else
> DragObjectDragging := false;
>   if DragObjectDragging then begin
> P:=ClientToScreen(Point(X,Y));
> DragObject.MouseMove(Shift,P.X,P.Y);
>   end;
>   if Assigned(FOnMouseMove) then FOnMouseMove(Self, Shift, X,Y);
> end; 
> 
>   This makes DragOver events fire as well.
>   
> Daniel Dugan <[EMAIL PROTECTED]> wrote:
>   Drat! This successfully ends a drag operation but hoses up Dragover
>   event handling. Still trying.
> 
> Daniel Dugan <[EMAIL PROTECTED]> wrote:   
> 
> Daniel Dugan <[EMAIL PROTECTED]> wrote: I think I've found a
> cause for an end drag not working as I reported in issue 1861.
>
>   TControl.MouseUp tests TControl.Dragging, and it is returning false
>   because the control that generates the mouseup is the target and not the
>   source. This prevents DragObject.MouseUp from firing when the mouse
>   button is released. I'm not sure I'm up to finding the fix, but I will
>   still keep looking as time permits.
>
>   Also, Controls.pp has 2 SetCaptureControl procedures. Apparently, the
>   on! e with only the Control:TControl parameter is correct.
> 
> -
>   Yahoo! Mail
> Bring photos to life! New PhotoMail makes sharing a breeze. 
> !   Try this: 
>
>   {--
>    TControl MouseUp
> -
> -} Procedure TControl.MouseUp(Button: TMouseButton; Shift:TShiftState;
>   X, Y: Integer);
> var
>   P: TPoint;
>   DragObjectDragging : Boolean;
> begin
>   if DragObject <> nil then
>   DragObjectDragging := TControl(DragObject.DragTarget).Dragging;
>   if (Button in [mbLeft,mbRight]) and DragObjectDragging and
>   (DragObject<>nil) then begin
> P:=ClientToScreen(Point(X,Y));
> DragObject.MouseUp(Button,Shift,P.X,P.Y);
>   end;
>   if Assigned(FOnMouseUp) then FOnMouseUp(Self, Button, Shift, X,Y);
> end;


Can you create a diff, so we can see the differences?

Mattias

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


Re: [lazarus] Sharing a project between Delphi 5+ and Lazarus

2006-03-22 Thread Felipe Monteiro de Carvalho
On 3/22/06, Graeme Geldenhuys <[EMAIL PROTECTED]> wrote:
> Why would you want the same project to be edited in Lazarus and
> Delphi.

Because 2 options is better then one =)

And the executables are smaller on Windows.

It does, however, involve some work to make the project compile with
both, specially with visually designed forms.
--
Felipe Monteiro de Carvalho

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


Re: [lazarus] Bug Report 1861: found cause

2006-03-22 Thread Daniel Dugan
OK. Also need to change TControl.MouseMove:     {--  TControl MouseMove  --}Procedure TControl.MouseMove(Shift: TShiftState; X, Y: Integer);var  P: TPoint;  DragObjectDragging : Boolean;begin  if DragObject <> nil then    DragObjectDragging := true else    DragObjectDragging := false;  if DragObjectDragging then begin    P:=ClientToScreen(Point(X,Y));    DragObject.MouseMove(Shift,P.X,P.Y);  end;  if Assigned(FOnMouseMove) then FOnMouseMove(Self, Shift, X,Y);end;   This makes DragOver events fire as well.  Daniel Dugan <[EMAIL PROTECTED]> wrote:  Drat! This successfully ends a drag operation but hoses up Dragover event handling. Still trying.Daniel Dugan <[EMAIL PROTECTED]> wrote:   Daniel Dugan <[EMAIL PROTECTED]> wrote: I think I've found a cause for an end drag not working as I reported in issue 1861.     TControl.MouseUp tests TControl.Dragging, and it is returning false because the control that generates the mouseup is the target and not the source. This prevents DragObject.MouseUp from firing when the mouse button is released. I'm not sure I'm up to finding the fix, but I will still keep looking as time permits.    
 Also, Controls.pp has 2 SetCaptureControl procedures. Apparently, the on! e with only the Control:TControl parameter is correct.  Yahoo! MailBring photos to life! New PhotoMail makes sharing a breeze. !   Try this:      {--  TControl MouseUp--}Procedure TControl.MouseUp(Button: TMouseButton; Shift:TShiftState;  X, Y: Integer);var  P: TPoint;  DragObjectDragging : Boolean;begin  if DragObject <> nil then  DragObjectDragging := TControl(DragObject.DragTarget).Dragging;  if (Button in [mbLeft,mbRight]) and DragObjectDragging and (DragObject<>nil) then
 begin    P:=ClientToScreen(Point(X,Y));    DragObject.MouseUp(Button,Shift,P.X,P.Y);  end;  if Assigned(FOnMouseUp) then FOnMouseUp(Self, Button, Shift, X,Y);end;  Brings words and photos together (easily) withPhotoMail - it's free and works with Yahoo! Mail.  Yahoo! MailUse Photomail to share photos without annoying attachments.
		Yahoo! Mail
Bring photos to life! New PhotoMail  makes sharing a breeze. 


Re: [lazarus] Bug Report 1861: found cause

2006-03-22 Thread Daniel Dugan
Drat! This successfully ends a drag operation but hoses up Dragover event handling. Still trying.Daniel Dugan <[EMAIL PROTECTED]> wrote:  Daniel Dugan <[EMAIL PROTECTED]> wrote: I think I've found a cause for an end drag not working as I reported in issue 1861.     TControl.MouseUp tests TControl.Dragging, and it is returning false because the control that generates the mouseup is the target and not the source. This prevents DragObject.MouseUp from firing when the mouse button is released. I'm not sure I'm up to finding the fix, but I will still keep looking as time permits.     Also, Controls.pp has 2 SetCaptureControl procedures. Apparently, the on!
e with
 only the Control:TControl parameter is correct.  Yahoo! MailBring photos to life! New PhotoMail makes sharing a breeze. !   Try this:      {--  TControl MouseUp--}Procedure TControl.MouseUp(Button: TMouseButton; Shift:TShiftState;  X, Y: Integer);var  P: TPoint;  DragObjectDragging : Boolean;begin  if DragObject <> nil then  DragObjectDragging := TControl(DragObject.DragTarget).Dragging;  if (Button in [mbLeft,mbRight]) and DragObjectDragging and (DragObject<>nil) then begin    P:=ClientToScreen(Point(X,Y));   
 DragObject.MouseUp(Button,Shift,P.X,P.Y);  end;  if Assigned(FOnMouseUp) then FOnMouseUp(Self, Button, Shift, X,Y);end;  Brings words and photos together (easily) withPhotoMail - it's free and works with Yahoo! Mail.
		 Yahoo! Mail 
Use Photomail to share photos without annoying attachments.

Re: [lazarus] patch for documentation

2006-03-22 Thread Vincent Snijders

Graeme Geldenhuys schreef:

Hi,

Attached is a patch for the following:
* adds some documentation to the TCustomCheckbox control.
* added an example file for TCustomCheckbox
* Improves the formatting of the tarrayexample.pas file
* adds some documentation to the TWinControl

PS:
How often does the http://lazarus-ccr.sourceforge.net/docs/lcl/ site
get updated?
I wasn't sure how I can preview how my changes will look.

Graeme.


--
There's no place like 127.0.0.1




Thanks. I applied the patch.

From now on, the examples will be placed in a subdirectory with the name of the 
unit that the examples belong to. So you TCustomCheckbox example ended up in the 
docs/xml/lcl/stdctrls directory.


While moving the examples, I possible have created a bug, because now fpdoc cannot 
find all examples anymore.

An unhandled exception occurred at $080A5A08 :
EInOutError : [example] File not found

I will need to improve fpdocs error message to include the file name.

If that is done and the incorrect filename is found, I will update the 
http://lazarus-ccr.sourceforge.net/docs/lcl/, most likely tonight, if not tomorrow.


Vincent.

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


Re: [lazarus] More info on fedora 5

2006-03-22 Thread Vincent Snijders

johnf schreef:

Hi,

OK I decided to start fresh.  I re-installed Fedora 5.  Then I installed FPC 
snapshots of 2.1.1 and Lazarus 0.9.13.  After installing (as root) I 
discovered that 'fpc.cfg' is missing.  I checked the RPM's (the best I could) 
and did not find the file 'fpc.cfg' in the list to install.  I wonder what 
else might be missing.  Since what I installed is called a snapshot does that 
mean the install routines expected a prior install of 2.0.2?




fpc.cfg is supposed to be created by the post install script.

From the fpc.spec.template:
%post
# Create a version independent config
%{_libdir}/%{name}/%{version}/samplecfg %{_libdir}/%{name}/%{version} > 
/dev/null

I am no rpm wizard, so maybe this line contains an error.

Although it is a snapshot, it can be used on a clean system.

Vincent

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


Re: [lazarus] Sharing a project between Delphi 5+ and Lazarus

2006-03-22 Thread Michael Van Canneyt



On Wed, 22 Mar 2006, Graeme Geldenhuys wrote:



For debugging, we have a Logging class which we use under Win32 and
Linux which gives us detailed information to a file or to a Log
Viewing Screen (all control by parameters passed to the app).  The
logger output runs in a separate thread with a cache, so it doesn't
slow down the application.


As a side note:
this feature is included standard by FPC: dbugintf, modeled on
the GExperts. There are GUI and command-line debug servers.

I use it all the time when debugging CGI apps and so on.

Michael.

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


Re: [lazarus] Sharing a project between Delphi 5+ and Lazarus

2006-03-22 Thread Graeme Geldenhuys
Please note, I am not starting a flame war, just explaining our
experience and what we are doing in our company.

On 22/03/06, Andreas Berger <[EMAIL PROTECTED]> wrote:
> Unfortunatly Lazarus is not yet ready to be used in the comercial world
> where development time is of essence. There are many things that greatly

We are writing a major project with Lazarus at the moment (3rd version
of our flagship product).  The IDE took some getting used to (I also
come from Delphi after 10 years), but after a few weeks when you start
noticing the cool features in Lazarus it is great.  I remember when I
kept on saying - If only Dephi could do this or that, and I had no
control of those in the IDE.

One of the best features is that you have the code to Lazarus, so if
anything bugs you, change it!!  I have made numerous small tweaks to
Lazarus already.

The only thing I can say I really miss is "Visual Form Inheritance".

> agile as Delphi's, the debugger is practically useless under windows and
> the linker time is totally unacceptable. For that reason I do all

For debugging, we have a Logging class which we use under Win32 and
Linux which gives us detailed information to a file or to a Log
Viewing Screen (all control by parameters passed to the app).  The
logger output runs in a separate thread with a cache, so it doesn't
slow down the application.

For detailed traces, you can always use "gdb" with back traces.  It's
a goldmine.

I have only been using Lazarus and Free Pascal for the last 6 months
but have never looked back!

Regards,
 - Graeme -



--
There's no place like 127.0.0.1

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


[lazarus] TPopupMenu / TMenuItem width / height properties

2006-03-22 Thread Alexander Todorov
Hi,
I need to get width and height of a popup menu or its items. For Gtk
something like
gdk_window_get_size (menu_item->window, &width, &height);
will do the trick I guess. For win32 there are some API functions I suppose.

Please tell me where I can start adding new code and test.
What is the difference between WSMenus / GtkWSMenus / Gtk2WSMenus ???
I see all methods there are class functions / procedures. Will adding
new properties break something? Can someone point me to more
comprehensive documentation about LCL?

TIA.

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


Re: [lazarus] More info on fedora 5

2006-03-22 Thread Alain Michaud
> Hi,
> 
> OK I decided to start fresh.  I re-installed Fedora 5.  Then I installed FPC 
> snapshots of 2.1.1 and Lazarus 0.9.13.  After installing (as root) I 
> discovered that 'fpc.cfg' is missing.  I checked the RPM's (the best I could) 
> and did not find the file 'fpc.cfg' in the list to install.  I wonder what 
> else might be missing.  Since what I installed is called a snapshot does that 
> mean the install routines expected a prior install of 2.0.2?
> 
> John


Hi,

 I think that instaling the stable (compiled) version 2.0.0 first is
usefull in order to make sure that everything is there. This is much
easier: just have to type : "sh install.sh" and BINGO

The files that one has to keep an eye in:

/etc/fpc.cfg:

check for the lines:

-Fu/usr/local/lib/fpc/2.0.0/units/$fpctarget
-Fu/usr/local/lib/fpc/2.0.0/units/$fpctarget/*
-Fu/usr/local/lib/fpc/2.0.0/units/$fpctarget/rtl

also

/usr/local/bin 

contains all the binaries like fpc, h2pas, etc... Check the date of
those files and check if there are other files of the same name in other
folders like /usr/bin/ etc...  remove them!

also

/usr/local/bin/ppc386 -> /usl/local/lib/fpc/2.0.0/ppc386

make sure that this symbolic link points to to proper ppc386

also remove ANY other pc386 that are in /usr/bin and other places like
that (be carefull they may be hiden sometimes). The instaler tends to
put those ppc386 everywhere!

Finally, when you run lazarus, you should check: /environment/"fpc
source directory" and press the buton: "Rescan the source directory"

Cherrs

Alain




  



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


[lazarus] More info on fedora 5

2006-03-22 Thread johnf
Hi,

OK I decided to start fresh.  I re-installed Fedora 5.  Then I installed FPC 
snapshots of 2.1.1 and Lazarus 0.9.13.  After installing (as root) I 
discovered that 'fpc.cfg' is missing.  I checked the RPM's (the best I could) 
and did not find the file 'fpc.cfg' in the list to install.  I wonder what 
else might be missing.  Since what I installed is called a snapshot does that 
mean the install routines expected a prior install of 2.0.2?

John

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


Re: [lazarus] Sharing a project between Delphi 5+ and Lazarus

2006-03-22 Thread Alexsander Rosa
My goal IS to use only Lazarus.

But there's a problem: the conversion from Delphi to Lazarus may take
months, and I can't freeze my Delphi project in the meanwhile - it's
deployed in several customers. Right now the project runs on Linux
under Wine - with minor interface glitches. In the last 6 months, I
have been changing the Delphi project in order to get it closer to
Lazarus' features, and added a lot of {$IFDEF}'s. ALL third-party
components were replaced for standard ones - even when it demanded a
lot of coding to accomplish the extra functionalities.

I'm documenting this effort in http://port2laz.blogspot.com (in english).

At the moment, after a dozen failed attempts of conversion, I'm
considering to start a new project on Lazarus from scratch, make the
persistence framework work (it's almost there, the 200+ classes are
already ported and {$IFDEF}'ed) and then add the 50+ forms one by one.
Of course, this would take a lot of time, but at least I can control
which form is changed in the original Delphi project and replicate
(ugh!) the updates in the Lazarus' one.

Regarding Andreas' comments, I agree that the linking time is huge and
that the debug is weak. But... if these are the only problems, it's
good enough to me. :-)

2006/3/22, Graeme Geldenhuys <[EMAIL PROTECTED]>:
> A quick solution, is to only use Lazarus!  :-)
>
> Why would you want the same project to be edited in Lazarus and
> Delphi.  Is this to achieve cross platform apps?  If you are doing a
> port from Win32 to say Linux - If you really need Delphi because of
> some strange reason, or something Delphi specific, that means the port
> will most probably not work under Linux (or worse yet work different).
>
> We just went through that process. We started porting a Delphi app to
> Linux, and later decided to drop Delphi completely and now only do
> development in Lazarus (Win32 and Linux) and it make our live _much_
> easier!
>
> Regards,
>   - Graeme -
>
>
>
> On 21/03/06, Alexsander Rosa <[EMAIL PROTECTED]> wrote:
> > I think it would be nice if we could share a project between the two
> > IDE's, including the forms. Everytime I need to mantain the "original"
> > Delphi project, i know that my "under conversion" Lazarus project is
> > getting more and more obsolete. More over, a lot of
> > properties/components had to be removed just because they are not
> > compatible. I can IFDEF the PAS files, but there's nothing I can do
> > about LFM/DFM files.
> > --
> > Atenciosamente,
> >
> > Alexsander da Rosa
>
>
> --
> There's no place like 127.0.0.1
>
> _
>  To unsubscribe: mail [EMAIL PROTECTED] with
> "unsubscribe" as the Subject
>archives at http://www.lazarus.freepascal.org/mailarchives
>


--
Atenciosamente,

Alexsander da Rosa

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


Re: [lazarus] Sharing a project between Delphi 5+ and Lazarus

2006-03-22 Thread Vincent Snijders


Graeme and Alexsander, you are warned, if you believe Andreas, then your projects 
are to fail. :-)


Don't believe Tony Maro and A.J. Venter, their commercial applications are only used 
 on linux.


Of course if you want to develop for other platforms than windows, then Delphi is 
not ready yet.


Conclusion: If you want to use Lazarus commercially, say your application is for 
Linux, then project has a bigger chance of succeeding with Lazarus.



Vincent

Andreas Berger schreef:
Unfortunatly Lazarus is not yet ready to be used in the comercial world 
where development time is of essence. There are many things that greatly 
slow down development when it is done via Lazarus. The IDE is not yet as 
agile as Delphi's, the debugger is practically useless under windows and 
the linker time is totally unacceptable. For that reason I do all 
development with Delphi and then port to Lazarus. It is still a lot of 
work, but less than developing directly with Lazarus. I am sure we will 
solve all this, but in the mean time . . . :(


I develop using Delphi and then compile the Lazarus program from the 
command line via a batch file. I have found this faster. I also have my 
simple dfm2lfm converter that converts all .dfm files in the root 
directory on down to .lfm file and then calls the lazres program.


Regards
Andreas

Graeme Geldenhuys wrote:


A quick solution, is to only use Lazarus!  :-)

Why would you want the same project to be edited in Lazarus and
Delphi.  Is this to achieve cross platform apps?  If you are doing a
port from Win32 to say Linux - If you really need Delphi because of
some strange reason, or something Delphi specific, that means the port
will most probably not work under Linux (or worse yet work different).

We just went through that process. We started porting a Delphi app to
Linux, and later decided to drop Delphi completely and now only do
development in Lazarus (Win32 and Linux) and it make our live _much_
easier!

Regards,
 - Graeme -



On 21/03/06, Alexsander Rosa <[EMAIL PROTECTED]> wrote:
 


I think it would be nice if we could share a project between the two
IDE's, including the forms. Everytime I need to mantain the "original"
Delphi project, i know that my "under conversion" Lazarus project is
getting more and more obsolete. More over, a lot of
properties/components had to be removed just because they are not
compatible. I can IFDEF the PAS files, but there's nothing I can do
about LFM/DFM files.
--
Atenciosamente,

Alexsander da Rosa
  



--
There's no place like 127.0.0.1

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


 



_
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] Tmemo.lines.count...

2006-03-22 Thread Tiziano - Mekar Srl -

Hi, I use lazarus on WindowsXP Home ed.

I have a tmemo in wich I put some paths selected from my Hard disk. Say
10 lines.
Then I have a button in wich I scan the lines in Tmemo in order to meke
some operations on the list of  paths.

If the width of the memo is large enough to show all the lines withou
word wrapping, I call memo1.lines.count, and get 9, all is ok.

If the width of the memo is NOT large enough to show all the lines and,
let's say 2 of the 10 lines wrap down, I call memo1.lines.count, and get
11, this is not ok.

In Delphi this does not happen. 

Is it a bug or a feature?

Note that I am not concerned about my program, but about the tmemo
implementation on Lazarus.

bye
tiziano

###

This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.
For more information, connect to http://www.f-secure.com/

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


Re: [lazarus] Sharing a project between Delphi 5+ and Lazarus

2006-03-22 Thread Andreas Berger
Unfortunatly Lazarus is not yet ready to be used in the comercial world 
where development time is of essence. There are many things that greatly 
slow down development when it is done via Lazarus. The IDE is not yet as 
agile as Delphi's, the debugger is practically useless under windows and 
the linker time is totally unacceptable. For that reason I do all 
development with Delphi and then port to Lazarus. It is still a lot of 
work, but less than developing directly with Lazarus. I am sure we will 
solve all this, but in the mean time . . . :(


I develop using Delphi and then compile the Lazarus program from the 
command line via a batch file. I have found this faster. I also have my 
simple dfm2lfm converter that converts all .dfm files in the root 
directory on down to .lfm file and then calls the lazres program.


Regards
Andreas

Graeme Geldenhuys wrote:


A quick solution, is to only use Lazarus!  :-)

Why would you want the same project to be edited in Lazarus and
Delphi.  Is this to achieve cross platform apps?  If you are doing a
port from Win32 to say Linux - If you really need Delphi because of
some strange reason, or something Delphi specific, that means the port
will most probably not work under Linux (or worse yet work different).

We just went through that process. We started porting a Delphi app to
Linux, and later decided to drop Delphi completely and now only do
development in Lazarus (Win32 and Linux) and it make our live _much_
easier!

Regards,
 - Graeme -



On 21/03/06, Alexsander Rosa <[EMAIL PROTECTED]> wrote:
 


I think it would be nice if we could share a project between the two
IDE's, including the forms. Everytime I need to mantain the "original"
Delphi project, i know that my "under conversion" Lazarus project is
getting more and more obsolete. More over, a lot of
properties/components had to be removed just because they are not
compatible. I can IFDEF the PAS files, but there's nothing I can do
about LFM/DFM files.
--
Atenciosamente,

Alexsander da Rosa
   




--
There's no place like 127.0.0.1

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


 



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


Re: [lazarus] Lazarus (delphi) documentation

2006-03-22 Thread Uwe Grauer
Uwe Grauer wrote:
> How do the lazarus people use the delphi-docs?
> Delphi documentation comes in windows hlp-files.
> delphi documentation should apply to lazarus as well.
> So how do you read this hlp-files in linux?
> 
> Any help welcome,
>   Uwe
> 
> _
>  To unsubscribe: mail [EMAIL PROTECTED] with
> "unsubscribe" as the Subject
>archives at http://www.lazarus.freepascal.org/mailarchives
> 

As there were no helpful replies on this, i tried searching for a
solution ... and found hlp2rtflx on www.herdsoft.com

You can get it here:
http://www.herdsoft.com/ftp/downloads.html

Uwe

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


[lazarus] How to retrieve locale info?

2006-03-22 Thread Jouke Rensma
Hi all, 

For the VersionInfo thing I'm working on, I need to create a list of 
possible locale infos. I need two lists. For the language a list in the form 
like: 


Arabic, 0401, 1025,
Bulgarian, 0402, 1026
Catalan, 0403, 1027
...
...
(all strings) 

And something like that for the character set: 


7-bit ASCII, , 0,
Japan (Shift - JIS X208), 03A4, 932,
...
...
(all strings) 

Is there such a list available already inside of Lazarus/FPC or can it be 
pulled out of windows somehow? Otherwise what do you think would be the best 
way to create such a list? Just hardcoded? Read it from some file? Any other 
suggestion? 


Thanks!
Jouke 


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


Re: [lazarus] ERROR in LCL: TWinControl.CreateWnd: no parent

2006-03-22 Thread Marc Weustink

Alexander Todorov wrote:

On 3/22/06, Marc Weustink <[EMAIL PROTECTED]> wrote:


Alexander Todorov wrote:


Hello folks,
I get this error
-
ERROR in LCL: TWinControl.CreateWnd: no parent :Tn7XMLDoc

This happens when trying to use TDBGrid.Canvas.TextWidth, when the
grid is not visible.
The object of class Tn7XMLDoc is created before that with Parent TPanel.
Should I investigate this further? Is it really a LCL bug or my fault?


Do I understand it correctly that Tn7XMLDoc is created but not yet
placed on a panel ?
In that case you cannot use all properties. Delphi has similar behaviour.

Marc



At the time the error occurs the Tn7XMLDoc object is created but its
parent is nil.
So I should not use Canvas.TextWidth if Parent = nil ? Is this the
normal behaviour ?


I wouldn't count on a canvas fully available when there is no parent.
And yes, Delphi has this too (if we take that os normal behaviour)

Marc

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


Re: [lazarus] Small Path to "File->Open"

2006-03-22 Thread Vincent Snijders

Vincent Snijders schreef:

Júnior Gonçalves schreef:

I Execute File -> Open..
If I try open an file what not exist (Example: C:\12345.pas), I get 
Exception with Message Error:

Invalid argument index in format "".

Solution:

in Main Unit, Line 2159 -

OpenDialog.Options:=OpenDialog.Options+[ofAllowMultiSelect];

Replace To:

OpenDialog.Options:=OpenDialog.Options+[ofAllowMultiSelect,ofFileMustExist]; 



I get this message: File "C:\12345.pas" not found. Do you want to create 
it?


Probably there has been a mistake when translating this message. Try 
running Lazarus with the English messages.





I think I fixed it in r8981.

Vincent

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


Re: [lazarus] ERROR in LCL: TWinControl.CreateWnd: no parent

2006-03-22 Thread Alexander Todorov
On 3/22/06, Marc Weustink <[EMAIL PROTECTED]> wrote:
> Alexander Todorov wrote:
> > Hello folks,
> > I get this error
> > -
> > ERROR in LCL: TWinControl.CreateWnd: no parent :Tn7XMLDoc
> >
> > This happens when trying to use TDBGrid.Canvas.TextWidth, when the
> > grid is not visible.
> > The object of class Tn7XMLDoc is created before that with Parent TPanel.
> > Should I investigate this further? Is it really a LCL bug or my fault?
>
> Do I understand it correctly that Tn7XMLDoc is created but not yet
> placed on a panel ?
> In that case you cannot use all properties. Delphi has similar behaviour.
>
> Marc

At the time the error occurs the Tn7XMLDoc object is created but its
parent is nil.
So I should not use Canvas.TextWidth if Parent = nil ? Is this the
normal behaviour ?

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


Re: [lazarus] Small Path to "File->Open"

2006-03-22 Thread Vincent Snijders

Júnior Gonçalves schreef:

I Execute File -> Open..
If I try open an file what not exist (Example: C:\12345.pas), I get 
Exception with Message Error:

Invalid argument index in format "".

Solution:

in Main Unit, Line 2159 -

OpenDialog.Options:=OpenDialog.Options+[ofAllowMultiSelect];

Replace To:

OpenDialog.Options:=OpenDialog.Options+[ofAllowMultiSelect,ofFileMustExist];


I get this message: File "C:\12345.pas" not found. Do you want to create it?

Probably there has been a mistake when translating this message. Try running Lazarus 
with the English messages.


Vincent.

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


Re: [lazarus] Using TDataset from another form

2006-03-22 Thread Michael Van Canneyt


On Wed, 22 Mar 2006, Diwakoe wrote:

> Dear all,
>
> I'm using Lazarus-0.9.12-20060207-win32 and successfully creating
> small application, but I have some problem when try to use TDataset
> from another form and I want to attached into Datasource.
>
> Is there any docs or wiki how to do that?

You need to do this in code. It doesn't work yet in designtime.

In the 'OnShow' event of the form, connect the datasource to
the dataset.

Michael.

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


Re: [lazarus] Sharing a project between Delphi 5+ and Lazarus

2006-03-22 Thread Michael Van Canneyt


On Wed, 22 Mar 2006 [EMAIL PROTECTED] wrote:

> >
> > CrossFPC seems dead, we haven't heard from Simon Kissel in ages
> > (at least I haven't).
> >
> > But I'm reasonably well informed. I helped him to create the
> > resources support in the compiler.
> >
> > What do you need to know ?
> >
> > Michael.
> >
> > _
> >  To unsubscribe: mail [EMAIL PROTECTED] with
> > "unsubscribe" as the Subject
> >archives at http://www.lazarus.freepascal.org/mailarchives
> >
> >
> >
> he wrote that there still problems with the CLX license...

I doubt this problem will be solved in the near future, with the current
state of affairs at Borland.

> but there
> will be a new release in the near future...

Aha, a new release ? This is new intel !

Did you hear this in a private communication ?

Michael.

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