Re: [Lazarus] TApplication.UpdateMainForm

2016-02-17 Thread Fabio Luis Girardi
Em 17 de fev de 2016 18:41, "Mattias Gaertner" 
escreveu:

> No.
> Why can't you derive from TForm?
>
>

Because TForm publishes some properties that I want keep in protected
section.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TApplication.UpdateMainForm

2016-02-17 Thread Mattias Gaertner
On Wed, 17 Feb 2016 18:25:47 -0200
Fabio Luis Girardi  wrote:

>[...]
> My question is: The parameter AForm should be of type TCustomForm instead
> of TForm?

No. 
Why can't you derive from TForm?

Mattias


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


[Lazarus] TApplication.UpdateMainForm

2016-02-17 Thread Fabio Luis Girardi
Hi all!!

I'm creating a new form class with some extra features, derived from
TCustomForm. But when I override the procedure CreateWnd to register the
new instance of my form class as the main form of the application, I
receive a warning talking that my form class (TSecureForm) and TForm are
not related. The CreateWnd code is:


procedure TSecureForm.CreateWnd;
begin
  if (Application<>nil) then
Application.UpdateMainForm(TForm(Self));
  inherited CreateWnd;
end;

So, I take a look into TApplication.UpdateMainForm and I see:

procedure TApplication.UpdateMainForm(AForm: TForm);


My question is: The parameter AForm should be of type TCustomForm instead
of TForm?

-- 
The best regards,

Fabio Luis Girardi
PascalSCADA Project
http://sourceforge.net/projects/pascalscada
http://www.pascalscada.com
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Replacing LRT format with RSJ

2016-02-17 Thread Mattias Gaertner
On Wed, 17 Feb 2016 18:03:52 +
Denis Kozlov  wrote:

> It would be useful to have a built-in option to regenerate base PO file
> (and update translated PO files) for a project.
> 
> This could involve:
> 1) Removing all existing LRT, LRJ, RST, RSJ.

This can do that:
Run / Clean up and build

> 2) Forcing project to be recompiled to reprocess resourcestrings and
> produce RSJ

See above.

Mattias

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


Re: [Lazarus] Replacing LRT format with RSJ

2016-02-17 Thread Denis Kozlov
It would be useful to have a built-in option to regenerate base PO file
(and update translated PO files) for a project.

This could involve:
1) Removing all existing LRT, LRJ, RST, RSJ.
2) Forcing project to be recompiled to reprocess resourcestrings and
produce RSJ
3) Forcing forms to be resaved to reprocess LFM and produce LRJ

I have performed these steps manually on several occasions to ensure a
clean regenerated PO file.


On 17 February 2016 at 16:50, Maxim Ganetsky  wrote:

>
> 17.02.2016 18:24, Denis Kozlov пишет:
> > It should be possible to code up an automatic conversion of LRT files
> > directly to RSJ/LSJ, without a need to resave all forms. They both store
> > the same data, but use a different format.
> >
> > Of course, LRT files with already broken strings (as a result of new
> > lines) would be initially mapped 1-to-1 to broken strings in RSJ file,
> > but they will get fixed the next time the form is re-saved.
>
> So users will need to save forms anyway in order to ensure strings
> correctness and to get correct .po files.
>
> Maybe some helper tool that resaves all affected forms in one go can be
> created, though. Don't know how big is demand for it.
>
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Replacing LRT format with RSJ

2016-02-17 Thread Bart
On 2/17/16, Maxim Ganetsky  wrote:

> So users will need to save forms anyway in order to ensure strings
> correctness and to get correct .po files.
>
> Maybe some helper tool that resaves all affected forms in one go can be
> created, though. Don't know how big is demand for it.

Just announce it on the ML and forum, maybe somewhere on the wiki and
just implement.

Bart

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


Re: [Lazarus] Replacing LRT format with RSJ

2016-02-17 Thread Maxim Ganetsky


17.02.2016 18:24, Denis Kozlov пишет:
> It should be possible to code up an automatic conversion of LRT files
> directly to RSJ/LSJ, without a need to resave all forms. They both store
> the same data, but use a different format.
> 
> Of course, LRT files with already broken strings (as a result of new
> lines) would be initially mapped 1-to-1 to broken strings in RSJ file,
> but they will get fixed the next time the form is re-saved.

So users will need to save forms anyway in order to ensure strings
correctness and to get correct .po files.

Maybe some helper tool that resaves all affected forms in one go can be
created, though. Don't know how big is demand for it.

-- 
Best regards,
 Maxim Ganetsky  mailto:gan...@narod.ru

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


Re: [Lazarus] Replacing LRT format with RSJ

2016-02-17 Thread Denis Kozlov
It should be possible to code up an automatic conversion of LRT files
directly to RSJ/LSJ, without a need to resave all forms. They both store
the same data, but use a different format.

Of course, LRT files with already broken strings (as a result of new lines)
would be initially mapped 1-to-1 to broken strings in RSJ file, but they
will get fixed the next time the form is re-saved.

Denis

On 16 February 2016 at 17:41, Maxim Ganetsky  wrote:

>
> 16.02.2016 20:31, Giuliano Colla пишет:
> > To actually provide the benefit to users, it would be nice if the
> > transition process would be made automatic in Lazarus IDE.
> > I.e.: If in Project Options "Enable i18n" and "Create/update .po file
> > when saving" are both ticked,  a "Compile" should check for the presence
> > of  .lrt files and behave accordingly, i.e. remove .lrt files and
> > generate again what required.
> >
> > Is that possible?
>
> Not without forcibly saving all affected forms. I don't think it is
> good, because LFMs can change (e.g. when form created in Linux and saved
> in Windows).
>
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus on my ancient computer?

2016-02-17 Thread Leonardo M . Ramé

El 14/02/16 a las 11:34, Mark Morgan Lloyd escribió:

Sven Barth wrote:

On 14.02.2016 15:14, Bart wrote:

Hi,

This is a bit off-topic.

I have an ancient computer: Intel Celeron 700Mhz, 512MB RAM, 20GB 
IDE HD.

(http://flyingsheep.nl/computer_nostalgie.htm#celeron700)
(Hardware upgrades are not in the picture.)


[snip]


So, do you have tips on which Linux flavour to install on this machine?


I'd suggest ArchLinux. It's a very lightweight distro that's based on a
rolling release (like Gentoo), but uses binary packages instead. I use
it on my two main computers. On one I'm only using Awesome as window
manager and on the other OpenBox. Nothing else.


Alternatively, I run Debian "Lenny" with KDE on a number of machines 
of that sort of spec. For later Debians consider XFCE irrespective of 
system spec.


+1 I run XUbuntu, that comes with XFCE instead of Unity and runs pretty 
well on low end PCs..


Regards,

--
Leonardo M. Ramé
http://leonardorame.blogspot.com

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