[Lazarus] FPDoc Editor vs Lazarus Documentation Tool

2014-12-19 Thread silvioprog
Hello,

What is the most recomended tool to make documentation?:

1. http://wiki.lazarus.freepascal.org/LazDoc;
2. http://wiki.lazarus.freepascal.org/Lazarus_Documentation_Editor.

I'm writting a new component and I want to use a "doc creator" tool
available in own Lazarus.

Thank you!

-- 
Silvio Clécio
My public projects - github.com/silvioprog
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Log4D weirdness

2014-12-19 Thread Mario R. Carro
Hello everyone, I've been debgging a weird problem I was having with a 
little app of mine. I'm using the latest stable Lazarus and FreePascal. 
The same project on Windows runs fine. On Linux (Debian Sid) fires an 
exception when running the finalization code.


I narrowed the problem to the use of Log4D (svn head from SF). Simply 
adding Log4D to the uses list is enough to make the application fail on 
exit.


Long-history-short, the culprit code is this:

constructor TLogLog.Create;
begin
  inherited Create('');
  Appender := ;
  AddAppender(TLogODSAppender.Create(''));
  InternalDebugging := False;
  Level := Log4D.Debug;
end;

There's a LogLog variable that is destroyed in the finalization section 
(and fails). The problem is that the TLogODSAppender created in the ctor 
ends up destroyed inside the AddAppender call. This is the AddAppender code:


procedure TLogLogger.AddAppender(const Appender: ILogAppender);
begin
  LockLogger;
  try
if FAppenders.IndexOf(Appender) = -1 then
begin
  FAppenders.Add(Appender);
  if FHierarchy <> nil then
FHierarchy.FireAppenderEvent(True, Self, Appender);
end;
  finally
UnlockLogger;
  end;
end;

The appender dtor is called inside the call to IndexOf (it seems by the 
stack trace because it's use-count reaches zero). So: The appender is 
destroyed before is adding it to the list and later the TLogLog dtor 
fails when tries to destroy it again.


I already solved the problem, but don't know why. Changing the 
TLogLog.Create code by this one makes the problem disappear:


constructor TLogLog.Create;
var
  Appender: ILogAppender;
begin
  inherited Create('');
  Appender := TLogODSAppender.Create('');
  AddAppender(Appender);
  InternalDebugging := False;
  Level := Log4D.Debug;
end;

Who is at fault here? Log4D? The compiler? Me?
Any hints will be appreciated...

/MRC

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


[Lazarus] Is FPDoc Editor working?

2014-12-19 Thread silvioprog
Hello,

I'm trying to use the FPDoc Editor following this steps below:

. In Lazarus IDE, open the FPDoc Editor from View menu;
. In the Lazarus source code editor, move the cursor to some code element.

However, the "Create help item" button is never enabled for me

How to use it? I saw the (wrong) step by step in this link:
http://wiki.lazarus.freepascal.org/LazDoc.

Thank you!

-- 
Silvio Clécio
My public projects - github.com/silvioprog
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Alternative component palette layout

2014-12-19 Thread Juha Manninen
Did anybody manage to import this palette layout?
I fixed the code already some time ago.

Juha

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


[Lazarus] SQL Editor produces wrong string constant

2014-12-19 Thread John Landmesser

Hi,

Lazarus 1.3 r47221 FPC 2.6.4 x86_64-linux-gtk 2

example SQL-Editor:

SELECT Datum, Zeit FROM Daten
WHERE Datum > '01.01.2014'

After create String constant:
SQL = 'SELECT Datum, Zeit FROM Daten'+LineEnding+
'WHERE Datum > ''01.01.2014''';

This statement will not be executed!
Before and after +LineEnding+ is missing  a blank:
 '   ' +LineEnding+ '   '

simple to fix!!

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