Re: [Lazarus] IDE editor's NoteBook component problems

2009-08-19 Thread Martin Schreiber
On Tuesday 18 August 2009 13:49:43 Michael Van Canneyt wrote:

 If you right-click the tabs, you get a list of available tabs and you can
 switch to the tab you want by selecting it. What more do you need ?
 If I have 100 open files, no matter what the visual control, I will need to
 switch.

I often have more than 100 open files. If somebody is interrested how it is 
done in MSEide:
http://sourceforge.net/project/screenshots.php?group_id=165409ssid=94936

MSEide has the editor tabs on the right. Double clicking on a tab moves it on 
the top of the list, drag and drop by mouse is also possible. The with of the 
tabs can be changed by mouse drag. Ctrl+E or the popup menu item 'Select 
Page' opens a window with alphabetically ordered editor filenames, the size 
of the window is variable and stored in project file:
http://sourceforge.net/project/screenshots.php?group_id=165409ssid=79656

I got no objections from the users up to now so this method seems to be 
accepted.

Martin

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] http://svn2.freepascal.org is out of sync

2009-08-19 Thread Graeme Geldenhuys

Hi,

The backup/mirror repository is out of sync with he primary repository. 
It seems to be stuck at r21274.  For the live of me I couldn't figure 
out why the Git mirror doesn't have the r21283 fix that Mattias 
committed, then when I tried to query the svn2 repository directly using 
svn CLI client it said the commit does not exist.


Looking at the primary svn repository and they are available. Could 
somebody kick the backup (svn2.freepascal.org) repository into gear please.


Regards,
  - Graeme -

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


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] http://svn2.freepascal.org is out of sync

2009-08-19 Thread Graeme Geldenhuys

Vincent Snijders wrote:


Done.


Thanks Vincent. Git mirror is back in sync as well.



Regards,
  - Graeme -

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


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] codetools tooltip showing method visibility

2009-08-19 Thread Graeme Geldenhuys

Mattias Gaertner wrote:

That way I can simply hover the move over a method or property and
see if it is protected or public etc...


Implemented in 21283.



Hi Mattias,

I get an error in the IDE Messages window. And the tooltip doesn't have 
any visibility specified. I'm using Lazarus r21307 under Linux compiled 
with GTK2 widgetset.


See attached screenshot. I don't think you have to worry about the 
duplicated hints in the tooltip. The documentation is currently in fpdoc 
and inline format, which causes the duplicates - I'm not sure if that 
can be improved on. (maybe if fpdoc help exists, do not use inline 
comments in tooltip?).


Anyway, here is the output Lazarus gave in the command line. As far as I 
can see, the HTML tags seem correct. Each opening tag has a 
corresponding closing tag. And BR being the exception, which I believe 
is normal.


--
TCodeHelpManager.GetHint END Hint=HTMLBODYfunction 
TtiObject.IsValid(var AErrorMessage:string):boolean;BR

/home/graemeg/programming/3rdParty/tiOPF2/Source/Core/tiObject.pas(430,17)BR
BR
BTtiObject.IsValid/BBR
Is the Object a valid oneBR
BR
: Is the Object a valid one. Does it adhere to all the business rules 
you defined?BR

BTtiObject.IsValid/BBR
Is the Object a valid oneBR
BR
: Is the Object a valid one. Does it adhere to all the business rules 
you defined?BR

BTtiObject.IsValid/BBR
Is the Object a valid oneBR
BR
: Is the Object a valid one. Does it adhere to all the business rules 
you defined?/BODY/HTML


--


Regards,
  - Graeme -

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

inline: code_tooltip2.png--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] opengl and compiz

2009-08-19 Thread Aleš Katona
Compiz/linux currently is very touchy depending on your card, kernel and distro 
(xorg version).

If you have say Ubuntu 9.04 with kernel .28 and the new xorg and you have intel 
or ati (pre r500, no longer officialy fglrx driver supported) cards you're 
pretty much screwed when it comes to openGL. Compiz itself works, but opengl is 
only up to 1.3 version and has bugged compozing (due to kernel mode setting not 
being in the kernel yet).

All this should change in .30 and .31 kernels and with latest drivers and xorg, 
although I wouldn't hold my breath for openGL 2.0 functionality (on the bright 
side, these changes they are making will be great for all the OSS 3d drivers).

It's one of those big OSS overhauls. So atm. if openGL is fishy and you don't 
have closed source drivers, don't fuss about it much :)

Ales

P.S: for more info, see the phoronix forums and articles

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] IDE editor's NoteBook component problems

2009-08-19 Thread Marc Weustink

Michael Van Canneyt wrote:



On Tue, 18 Aug 2009, Graeme Geldenhuys wrote:


Michael Van Canneyt wrote:


If you right-click the tabs, you get a list of available tabs and you
can switch to the tab you want by selecting it. What more do you need
?


Apparently that is only available to the lucky few that use the GTK2 
widgetset. As far as I know, that open is not available in any other 
widgetset.


As for why I don't like the popup menu. I like to see things instantly 
and just straight to it. The popup is extra mouse clicks. ;-)


Like I said: If you have sufficiently open files, you'll get to a point
where you no longer can show them all.

Happens faster than you think. So your hack will work for another 15 files
or so, and then you're again stuck.


Like I showed when I first discovered the tabs in the windows menu:

http://www.dommelstein.nl/scrap/unit_menu.png

Marc


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] How to query vertical scrollbar width?

2009-08-19 Thread Vincent Snijders

Graeme Geldenhuys schreef:

Hi,

I'm working on some GUI code in the tiOPF project that currently works 
with VCL, LCL and fpGUI.


Is there a cross-platfrom, LCL way to query the width of the current 
widgetset scrollbars? Defaults in Win2000 and WinXP seem to be 15px wide 
for the vertical scrollbar, but I am sure that with custom themes, that 
value might change. So we don't want to hard-code any values.



==
You can detect if the scrollbars are showing using the Win32 API like this:

You can get the size of the scrollbars using Win32 API function
GetSystemMetrics().

  GetSystemMetrics(SM_CYHSCROLL) // Height of horizontal scrollbar
  GetSystemMetrics(SM_CXVSCROLL) // Width of vertical scrollbar
==


I would try:
http://lazarus-ccr.sourceforge.net/docs/lcl/lclintf/getsystemmetrics.html

Vincent

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] codetools tooltip showing method visibility

2009-08-19 Thread Mattias Gärtner

Zitat von Graeme Geldenhuys grae...@opensoft.homeip.net:


Mattias Gaertner wrote:

That way I can simply hover the move over a method or property and
see if it is protected or public etc...


Implemented in 21283.



Hi Mattias,

I get an error in the IDE Messages window. And the tooltip doesn't  
have any visibility specified. I'm using Lazarus r21307 under Linux  
compiled with GTK2 widgetset.


Fixed.


See attached screenshot. I don't think you have to worry about the  
duplicated hints in the tooltip. The documentation is currently in  
fpdoc and inline format, which causes the duplicates - I'm not sure  
if that can be improved on. (maybe if fpdoc help exists, do not use  
inline comments in tooltip?).


Yes, please create a feature report.


Anyway, here is the output Lazarus gave in the command line. As far  
as I can see, the HTML tags seem correct. Each opening tag has a  
corresponding closing tag. And BR being the exception, which I  
believe is normal.


Yes.

Mattias



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] How to query vertical scrollbar width?

2009-08-19 Thread Graeme Geldenhuys

Vincent Snijders wrote:


I would try:
http://lazarus-ccr.sourceforge.net/docs/lcl/lclintf/getsystemmetrics.html




Thanks Vincent, that got me 80% there... :-)

Unfortunately my problems tend to me more difficult than normal. Under 
GTK (I don't know about other GUI toolkits or other themes), the 
scrollbar can sometimes be outside the component. See attached 
screenshot, where I am using the popular GTK ClearLooks theme.


The call:  GetSystemMetrics(SM_CXVSCROLL);  does indeed return the width 
of a Vertical Scrollbar - in my case it is 15 pixels. But what about the 
small gap between the StringGrid and the Vertical Scrollbar?  How do I 
get that value?



Regards,
  - Graeme -

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

inline: system_metrics.png--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] codetools tooltip showing method visibility

2009-08-19 Thread Graeme Geldenhuys

Mattias Gärtner wrote:

I get an error in the IDE Messages window. And the tooltip doesn't


Fixed.


Thanks, those errors are now gone, but the tooltip still doesn't seem to 
display the visibility in all cases. See attached images. In image 2 it 
shows the property as public which is correct, but in image 3 (in 
implementation section) and image 4 (in interface section) the 
visibility is not shown


I'm still trying to figure out if there is some pattern. I'm not sure if 
it is due to the latter two being methods instead of properties.


If you want to test without needing tiOPF source code, the same thing 
happens on the TInterfacedObject class definition. None of the methods 
or property tooltips show the visibility in the tooltip.





Yes, please create a feature report.


Created one.
  http://bugs.freepascal.org/view.php?id=14384


Regards,
  - Graeme -

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

inline: Screenshot-2.pnginline: Screenshot-4.pnginline: Screenshot-3.png--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] local procedure - MultiThreadProc

2009-08-19 Thread Jan Kowalski
I need to call ProcThreadPool.DoParallel with local procedure as a parameter.
Does DoParallel allow local procedures to pass a procedural parameters ?
I get err: Error:
Incompatible type for arg no. 1: Got address of local
procedure(Int64,Pointer,TMultiThreadProcItem);Register, expected
procedure variable type of
procedure(Int64,Pointer,TMultiThreadProcItem);Register


Best regards
Tomek

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] local procedure - MultiThreadProc

2009-08-19 Thread Mattias Gärtner

Zitat von Jan Kowalski bor...@gmail.com:

I need to call ProcThreadPool.DoParallel with local procedure as a  
parameter.

Does DoParallel allow local procedures to pass a procedural parameters ?
I get err: Error:
Incompatible type for arg no. 1: Got address of local
procedure(Int64,Pointer,TMultiThreadProcItem);Register, expected
procedure variable type of
procedure(Int64,Pointer,TMultiThreadProcItem);Register


That would be really helpful.
But I don't know how to define a local procedure type:

type
  TMTLocalProcedure = procedure(Index: PtrInt; Data: Pointer;
Item: Pointer); ?
var
  p: TMTLocalProcedure;

procedure TestWithLocalProc;

  procedure LocalProc(Index: PtrInt; Data: Pointer; Item:  
TMultiThreadProcItem);

  begin

  end;

begin
  p:=...@localproc;
end;


Mattias



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] local procedure - MultiThreadProc

2009-08-19 Thread Martin

Mattias Gärtner wrote:

Zitat von Jan Kowalski bor...@gmail.com:
I need to call ProcThreadPool.DoParallel with local procedure as a 
parameter.

Does DoParallel allow local procedures to pass a procedural parameters ?
I get err: Error:
Incompatible type for arg no. 1: Got address of local
procedure(Int64,Pointer,TMultiThreadProcItem);Register, expected
procedure variable type of
procedure(Int64,Pointer,TMultiThreadProcItem);Register


That would be really helpful.
But I don't know how to define a local procedure type:


I wouldn't be sure it's possible. It makes no sense.

My guess:
A local (nested) procedure has access to the outer(parent or 
grand-parent if recursive) procedures variables (stackframe). Therefore 
a local procedure must expect to be somewhere below this parent.


If it was given as a pointer to some other procedure/object, and then 
called later, this may happen outside the parent. Then no such 
stackframe does exist, and the local procedure can not work.


Martin


type
  TMTLocalProcedure = procedure(Index: PtrInt; Data: Pointer;
Item: Pointer); ?
var
  p: TMTLocalProcedure;

procedure TestWithLocalProc;

  procedure LocalProc(Index: PtrInt; Data: Pointer; Item: 
TMultiThreadProcItem);

  begin

  end;

begin
  p:=...@localproc;
end;


Mattias



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] local procedure - MultiThreadProc

2009-08-19 Thread Vincent Snijders

Martin schreef:

Mattias Gärtner wrote:

Zitat von Jan Kowalski bor...@gmail.com:
I need to call ProcThreadPool.DoParallel with local procedure as a 
parameter.

Does DoParallel allow local procedures to pass a procedural parameters ?
I get err: Error:
Incompatible type for arg no. 1: Got address of local
procedure(Int64,Pointer,TMultiThreadProcItem);Register, expected
procedure variable type of
procedure(Int64,Pointer,TMultiThreadProcItem);Register


That would be really helpful.
But I don't know how to define a local procedure type:


I wouldn't be sure it's possible. It makes no sense.

My guess:
A local (nested) procedure has access to the outer(parent or 
grand-parent if recursive) procedures variables (stackframe). Therefore 
a local procedure must expect to be somewhere below this parent.


If it was given as a pointer to some other procedure/object, and then 
called later, this may happen outside the parent. Then no such 
stackframe does exist, and the local procedure can not work.




And therefore such a local procedure type must be a combination of local scope and 
address: http://wiki.freepascal.org/Mac_Local_Procedure_Parameters


This feature is not yet implemented: 
http://wiki.freepascal.org/Language_related_articles#Ideas_for_new_stuff


Vincent

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] codetools tooltip showing method visibility

2009-08-19 Thread Mattias Gärtner

Zitat von Graeme Geldenhuys grae...@opensoft.homeip.net:


Mattias Gärtner wrote:

I get an error in the IDE Messages window. And the tooltip doesn't


Fixed.


Thanks, those errors are now gone, but the tooltip still doesn't  
seem to display the visibility in all cases. See attached images. In  
image 2 it shows the property as public which is correct, but in  
image 3 (in implementation section) and image 4 (in interface  
section) the visibility is not shown


I'm still trying to figure out if there is some pattern. I'm not  
sure if it is due to the latter two being methods instead of  
properties.


Yes, it was.
Fixed.


Mattias


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] local procedure - MultiThreadProc

2009-08-19 Thread Mattias Gärtner

Zitat von Vincent Snijders vsnijd...@vodafonevast.nl:


Martin schreef:

Mattias Gärtner wrote:

Zitat von Jan Kowalski bor...@gmail.com:
I need to call ProcThreadPool.DoParallel with local procedure  
as a parameter.

Does DoParallel allow local procedures to pass a procedural parameters ?
I get err: Error:
Incompatible type for arg no. 1: Got address of local
procedure(Int64,Pointer,TMultiThreadProcItem);Register, expected
procedure variable type of
procedure(Int64,Pointer,TMultiThreadProcItem);Register


That would be really helpful.
But I don't know how to define a local procedure type:


I wouldn't be sure it's possible. It makes no sense.


It makes enough sense in this case.
For example when you want to execute a loop in parallel, then you  
extract the loop into a procedure. With a local procedure you can keep  
the variables, which would make the process quite easy. If you can not  
use a local procedure, then you must define a record and move the  
local variables there.
Of course nested local procedures creates a whole bunch of problems,  
so maybe the record approach is much safer.
Maybe the extract procedure tool can be extended to do some of the  
monotone work automatically.

I will explain the process in more detail on the wiki.



My guess:
A local (nested) procedure has access to the outer(parent or  
grand-parent if recursive) procedures variables (stackframe).  
Therefore a local procedure must expect to be somewhere below this  
parent.


If it was given as a pointer to some other procedure/object, and  
then called later, this may happen outside the parent. Then no such  
stackframe does exist, and the local procedure can not work.




And therefore such a local procedure type must be a combination of  
local scope and address:  
http://wiki.freepascal.org/Mac_Local_Procedure_Parameters


This feature is not yet implemented:  
http://wiki.freepascal.org/Language_related_articles#Ideas_for_new_stuff


Mattias


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] local procedure - MultiThreadProc

2009-08-19 Thread Martin

Mattias Gärtner wrote:

Zitat von Vincent Snijders vsnijd...@vodafonevast.nl:


Martin schreef:

Mattias Gärtner wrote:

Zitat von Jan Kowalski bor...@gmail.com:
I need to call ProcThreadPool.DoParallel with local procedure as 
a parameter.
Does DoParallel allow local procedures to pass a procedural 
parameters ?

I get err: Error:
Incompatible type for arg no. 1: Got address of local
procedure(Int64,Pointer,TMultiThreadProcItem);Register, expected
procedure variable type of
procedure(Int64,Pointer,TMultiThreadProcItem);Register


That would be really helpful.
But I don't know how to define a local procedure type:


I wouldn't be sure it's possible. It makes no sense.


It makes enough sense in this case.


Sorry badly worded on my behalf.

It makes no sense, should have been: it can not be used the same way 
like normal procedure references, because it is limited to the scope.

the way described on the link by Vincent indeed makes sense

For example when you want to execute a loop in parallel, then you 
extract the loop into a procedure. With a local procedure you can keep 
the variables, which would make the process quite easy. If you can not 
use a local procedure, then you must define a record and move the 
local variables there.
Of course nested local procedures creates a whole bunch of problems, 
so maybe the record approach is much safer.
Maybe the extract procedure tool can be extended to do some of the 
monotone work automatically.

I will explain the process in more detail on the wiki.



My guess:
A local (nested) procedure has access to the outer(parent or 
grand-parent if recursive) procedures variables (stackframe). 
Therefore a local procedure must expect to be somewhere below this 
parent.


If it was given as a pointer to some other procedure/object, and 
then called later, this may happen outside the parent. Then no such 
stackframe does exist, and the local procedure can not work.




And therefore such a local procedure type must be a combination of 
local scope and address: 
http://wiki.freepascal.org/Mac_Local_Procedure_Parameters


This feature is not yet implemented: 
http://wiki.freepascal.org/Language_related_articles#Ideas_for_new_stuff


Mattias


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Jedi Code Formatter - sync with upstream

2009-08-19 Thread Graeme Geldenhuys

Hi,

How often is JCF changes merged/synced from upstream?


What is the correct development procedure for JCF in Lazarus? Because I 
make changes in my JCF code that is included with Lazarus. But last time 
I created a patch and added to Mantis, I was told to rather submit it in 
the upstream JCF project on sourceforge. I don't think this is ideal 
development path.


Couldn't it be committed in Lazarus repository and then pushed from Laz 
repo to JCF repo in SourceForge by whoever has write access to both?


Anyway, I have a few more fixes locally, but ain't sure where it must 
go. Lazarus Mantis bug report or JCF SourceForge project. The problem 
is, I do not track the JCF SourceForge project, so I don't know is such 
bugs have already been fixed or not.


Regards,
  - Graeme -

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


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Jedi Code Formatter - sync with upstream

2009-08-19 Thread Paul Ishenin

Graeme Geldenhuys wrote:

How often is JCF changes merged/synced from upstream?
Depends on changes JCF project have. If it is only some version change 
or another non-functional changes then I see no reason to update lazarus 
copy.
What is the correct development procedure for JCF in Lazarus? Because 
I make changes in my JCF code that is included with Lazarus. But last 
time I created a patch and added to Mantis, I was told to rather 
submit it in the upstream JCF project on sourceforge. I don't think 
this is ideal development path.
Correct is to report your changes to the JCF project. But I see at 
moment Anthony (main JCF developer) does not do anything with his 
project. Therefore if it is something related to FPC you can send your 
patches to me or post them to our tracker to the packages subproject.
Couldn't it be committed in Lazarus repository and then pushed from 
Laz repo to JCF repo in SourceForge by whoever has write access to both?


Anyway, I have a few more fixes locally, but ain't sure where it must 
go. Lazarus Mantis bug report or JCF SourceForge project. The problem 
is, I do not track the JCF SourceForge project, so I don't know is 
such bugs have already been fixed or not.


Best regards,
Paul Ishenin.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] codetools tooltip showing method visibility

2009-08-19 Thread Graeme Geldenhuys

Hans-Peter Diettrich wrote:


This was my experience as well, when working on PasDoc. That's why I 
implemented the editor for PasDoc2 to not touch the source code for 


Interesting idea, but why not simply use fpdoc (included with FPC) 
instead of modifying PasDoc? And for Delphi users, give them a compiled 
binary of lazde to download - this is what I have done for tiOPF - 
though developers still seem to keep adding docs inline. :-(




Regards,
  - Graeme -

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


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Jedi Code Formatter - sync with upstream

2009-08-19 Thread Graeme Geldenhuys

Paul Ishenin wrote:
Correct is to report your changes to the JCF project. But I see at 
moment Anthony (main JCF developer) does not do anything with his 


That was my problem... what if upstream takes forever to commit a 
supplied patch. That means Lazarus stays with a buggy JCF when it 
doesn't have to be.



project. Therefore if it is something related to FPC you can send your 
patches to me or post them to our tracker to the packages subproject.


All my patches will be related to FPC. ;-) That's the only compiler I 
use, and Lazarus is the only IDE I use. Currently the JCF (v2.44) in 
Lazarus produces many inconsistency compared to jcfNotepad.exe version 2.38.


So I run most of my code formatting externally via jcfNotepad, but would 
really like to start using JCF inside Lazarus IDE. And no, I can't setup 
jcfNotepad.exe via Lazarus Tools menu, because I run Lazarus under Linux 
 and jcfNotepad.exe is a Windows app. I tried though ;-)



I'll start committing my patches to Mantis.


Regards,
  - Graeme -

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


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Mantis: Lazarus Packages JCF is missing

2009-08-19 Thread Graeme Geldenhuys

Hi,

Can somebody add JCF (Jedi Code Formatter) as a category in Mantis 
(Lazarus  Packages).  I was told by Paul to submit JCF patches in the 
Packages section of Mantis, but no JCF category exists. Or should I 
place in under the patch category?



Regards,
  - Graeme -

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


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] local procedure - MultiThreadProc

2009-08-19 Thread Florian Klaempfl

Mattias Gärtner schrieb:

Zitat von Vincent Snijders vsnijd...@vodafonevast.nl:


Martin schreef:

Mattias Gärtner wrote:

Zitat von Jan Kowalski bor...@gmail.com:
I need to call ProcThreadPool.DoParallel with local procedure as 
a parameter.
Does DoParallel allow local procedures to pass a procedural 
parameters ?

I get err: Error:
Incompatible type for arg no. 1: Got address of local
procedure(Int64,Pointer,TMultiThreadProcItem);Register, expected
procedure variable type of
procedure(Int64,Pointer,TMultiThreadProcItem);Register


That would be really helpful.
But I don't know how to define a local procedure type:


I wouldn't be sure it's possible. It makes no sense.


It makes enough sense in this case.
For example when you want to execute a loop in parallel, then you 
extract the loop into a procedure. With a local procedure you can keep 
the variables, which would make the process quite easy. If you can not 
use a local procedure, then you must define a record and move the local 
variables there.
Of course nested local procedures creates a whole bunch of problems, so 
maybe the record approach is much safer.
Maybe the extract procedure tool can be extended to do some of the 
monotone work automatically.

I will explain the process in more detail on the wiki.


You can create a thread call for local procedures, it needs some hacking 
though: no type checking is possible, you've to work with pointers and 
pass the context explicitly.


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] codetools tooltip showing method visibility

2009-08-19 Thread waldo kitty

Graeme Geldenhuys wrote:

though developers still seem to keep adding docs inline. :-(


speaking for myself (and i guess there are many like me), i develop on the fly 
and those times that i do write documentation, i do tend to do it as i develop a 
routine... this offers me two items of interest... first being that the doc for 
that routine is written and second to keep me on track with what that routine 
does so i don't wander afield somewhere while working on it... then again, i 
still tend to pull up TP6 and sometimes BP7 for most of my coding because i am 
still trying to learn FPC and Lazarus and their interfaces...



and that last statement brings me to a comment you (Graeme) made the other 
day... i feel the same as you (and no flame intended to anyone) that programmers 
ARE users... they are users of the tools they use to create their tools and 
applications... i am a simple user of FPC, Lazarus and their interfaces and 
the code they generate ;)


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] codetools tooltip showing method visibility

2009-08-19 Thread Vincent Snijders

waldo kitty schreef:


and that last statement brings me to a comment you (Graeme) made the 
other day... i feel the same as you (and no flame intended to anyone) 
that programmers ARE users... they are users of the tools they use to 
create their tools and applications... i am a simple user of FPC, 
Lazarus and their interfaces and the code they generate ;)


And I wonder why we said that programmers are not users.

Vincent

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] codetools tooltip showing method visibility

2009-08-19 Thread Vincent Snijders

Vincent Snijders schreef:

waldo kitty schreef:


and that last statement brings me to a comment you (Graeme) made the 
other day... i feel the same as you (and no flame intended to anyone) 
that programmers ARE users... they are users of the tools they use to 
create their tools and applications... i am a simple user of FPC, 
Lazarus and their interfaces and the code they generate ;)


And I wonder why we said that programmers are not users.



I meant: I wonder who said that programmers are not users.

Vincent

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] local procedure - MultiThreadProc

2009-08-19 Thread Mattias Gaertner
On Wed, 19 Aug 2009 17:33:59 +0200
Florian Klaempfl flor...@freepascal.org wrote:

 Mattias Gärtner schrieb:
  Zitat von Vincent Snijders vsnijd...@vodafonevast.nl:
  
  Martin schreef:
  Mattias Gärtner wrote:
  Zitat von Jan Kowalski bor...@gmail.com:
  I need to call ProcThreadPool.DoParallel with local procedure
  as a parameter.
  Does DoParallel allow local procedures to pass a procedural 
  parameters ?
  I get err: Error:
  Incompatible type for arg no. 1: Got address of local
  procedure(Int64,Pointer,TMultiThreadProcItem);Register,
  expected procedure variable type of
  procedure(Int64,Pointer,TMultiThreadProcItem);Register
 
  That would be really helpful.
  But I don't know how to define a local procedure type:
 
  I wouldn't be sure it's possible. It makes no sense.
  
  It makes enough sense in this case.
  For example when you want to execute a loop in parallel, then you 
  extract the loop into a procedure. With a local procedure you can
  keep the variables, which would make the process quite easy. If you
  can not use a local procedure, then you must define a record and
  move the local variables there.
  Of course nested local procedures creates a whole bunch of
  problems, so maybe the record approach is much safer.
  Maybe the extract procedure tool can be extended to do some of the 
  monotone work automatically.
  I will explain the process in more detail on the wiki.
 
 You can create a thread call for local procedures, it needs some
 hacking though: no type checking is possible, you've to work with
 pointers and pass the context explicitly.

Can you give an example?

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] local procedure - MultiThreadProc

2009-08-19 Thread Florian Klaempfl
Mattias Gaertner schrieb:
 You can create a thread call for local procedures, it needs some
 hacking though: no type checking is possible, you've to work with
 pointers and pass the context explicitly.
 
 Can you give an example?

See http://www.freepascal.org/docs-html/rtl/objects/callpointerlocal.html

and e.g. the comment of Jonas:
(0014130)
Jonas Maebe (manager)
2007-08-13 15:02
at http://bugs.freepascal.org/view.php?id=9432

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] codetools tooltip showing method visibility

2009-08-19 Thread waldo kitty

Vincent Snijders wrote:

Vincent Snijders schreef:

waldo kitty schreef:


and that last statement brings me to a comment you (Graeme) made the 
other day... i feel the same as you (and no flame intended to anyone) 
that programmers ARE users... they are users of the tools they use to 
create their tools and applications... i am a simple user of FPC, 
Lazarus and their interfaces and the code they generate ;)


And I wonder why we said that programmers are not users.



I meant: I wonder who said that programmers are not users.


i don't recall ATM but i do remember reading it sometime back in the last few 
months... Graeme may recall but it is not really here or there in the grand 
scheme of things... i had wanted to reply to Graeme's original message to agree 
with him but didn't and then saw an opportunity to do so in my message :)


i might be able to pull up that message were that was stated as i do keep all 
emails i've ever received... yup... all the way back to 1996 when i first 
started doing live access to the internet as compared to my previous UUCP 
online/offline methods ;)


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus IDE help and Application help formats

2009-08-19 Thread Mattias Gaertner
On Mon, 17 Aug 2009 16:32:25 +0200
Graeme Geldenhuys grae...@opensoft.homeip.net wrote:

 Mattias Gärtner wrote:
  
  Why do you write that?
  a) you don't know it
  b) you don't like it
 
 Clearly I don't know how to use application help, if it exists.
 
 See attached image...
 
 If I write my own LCL based application with Lazarus, as shown in the 
 screenshot. How do I implement help for my application.

See 
http://wiki.lazarus.freepascal.org/Add_Help_to_Your_Application

 
[...]
 Test:
   - Put focus it TEdit and press F1. ---  NOTHING HAPPENS.
   - Click the Help button.   ---  NOTHING HAPPENS

Someone broke the example. I fixed it.

 
 How do I implement help for my application?
 What must the help format be? HLP, CHM, HTML, ???

Your choice. :)
At the moment the LCL provides a help database for URLs and
a viewer that simply starts the default browser. The URLs are html
files in the example, but of course it can be any URL.

The IDEIntf has a class for fpdoc help databases.

The package ChmHelpPkg provides a viewer for chm files by starting and
remote controlling lhelp.


 What help viewer is it going to use?
- I'm running Linux, so no CHM help viewer comes standard.

The chm viewer lhelp is part of lazarus.


[...]


Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus