Re: [Lazarus] How to use data from stringlist in another form.

2013-03-27 Thread Antonio Fortuny

Le 26/03/2013 15:14, appjaws a écrit :

I have 2 forms, form 1 calls form 2 on a buttonclick process.
Form 2 loads a string list, operations are carried out and the 
stringlist is saved.


on FormMain:
...
implementation
uses
  unit2;

procedure TFrmMain.Button1Click(Sender: TObject);
begin
  if Form1.List.Count = 0 then
Form1.LoadList;
  // do whatever do to to compare
end;
==
on second form:
unit unit2;
{$mode objfpc}{$H+}
interface
uses
  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs;
type
  { TForm1 }
  TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
  private
{ private declarations }
FList: TStringList;
  public
{ public declarations }
procedure LoadList;

property List: TStringList read FList;
  end;

var
  Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
begin
  FList := TStringList.Create;
end;

procedure TForm1.FormDestroy(Sender: TObject);
begin
  FList.Free
end;

procedure TForm1.LoadList;
begin
  FList.LoadFromFile('myfile.txt')
end;

end.

All this compiles and runs.
Do not forget to create Form1 before it is used in MainForm

Antonio.




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


Re: [Lazarus] data matrix with thousands of columns

2013-03-27 Thread Michael Schnell

On 03/26/2013 03:44 PM, Andrea Mauri wrote:
one more thing. my data is more similar to a huge spreadsheet than a 
relational DB


"store":  Do you mean for working with it in "realtime" or for keeping 
it for the next time the program is started ?


When doing a with a 64 bit program it might be possible and appropriate 
just to use an array and have the OS do the dirty work of virtual memory 
management, using a huge swap partition.


Of course loading the data from a file when starting the program and 
storing it before ending might take some time. (BTW: this could be using 
compression.)


-Michael.
.

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


[Lazarus] gtk 3 header

2013-03-27 Thread Marco van de Voort

Was browsing the GTK site a bit, and saw that for recent GTK3 versions there
seem to be Pascal headers?

http://www.gtk.org/language-bindings.php


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


Re: [Lazarus] gtk 3 header

2013-03-27 Thread Mehmet Erol Sanliturk
On Wed, Mar 27, 2013 at 2:14 AM, Marco van de Voort  wrote:

>
> Was browsing the GTK site a bit, and saw that for recent GTK3 versions
> there
> seem to be Pascal headers?
>
> http://www.gtk.org/language-bindings.php
>
>
> --
>


It is a link to :

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

Thank you very much .

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


Re: [Lazarus] data matrix with thousands of columns

2013-03-27 Thread Andrea Mauri

Il 27/03/2013 09:27, Michael Schnell ha scritto:

On 03/26/2013 03:44 PM, Andrea Mauri wrote:

one more thing. my data is more similar to a huge spreadsheet than a
relational DB


"store":  Do you mean for working with it in "realtime" or for keeping
it for the next time the program is started ?


Ok I will explain better.

I have a GUI app.

The user loads samples (the rows), my app performs calculations on 
samples and for every sample give as output thousands of values (the 
columns). Samples could be from tens to hundreds of thousands.

Columns can be tens to thousands.
Every column is an attribute of the sample defined by a unique name.
After calculations the app/user should be able to search for one/more 
samples (or for one/more columns) getting all/some values for the 
sample/column. Briefly I need to be able to rapidly get some values from 
this huge data matrix.


I have two scenarios, both are possible, depending on calculations type:

1. all the columns (the number/type of attributes to be calculated on 
every sample) are defined by the user before performing calculations, so 
I know the total number of columns before starting the calculations. 
Actually I use a sqlite db that I define before calculations started. I 
create as many tables as I need where every table has 200 fields. The 
samples are stored in a table, every sample is a row. The attributes are 
stored in all the other tables (every sample has a row in every 
attributes tables).


2. The number of columns can vary from a sample to another. The number 
of columns/attributes for every sample is known only after calculation 
is performed on that sample. The total number of columns/attributes is 
known only after all samples are examined/calculated.
During calculations I need to modify the number of columns. Using sqlite 
is quite annoying since I need to alter tables when a new column occurs 
also closing all the queries, modifying the insert queries and so on. 
During a calculation process thousands of columns can be created and 
need to be added.


The app can be splitted in 4 different tasks:

1. load of samples (then the user can look at samples, load new samples 
adding to existing ones..);
2. calculations (can take seconds, minutes, hours depending on the 
number of samples in the batch and on the number of attributes to be 
calculated), the user can leave the app working - no interaction, the 
user is just able to stop/pause the process;
2. calculated data analysis (interactive), the user can perform analysis 
on data (charts, data views, data manipulation [average, standard 
deviation...]...) (this should be as fast as possible, data retrieval 
from the db/datasheet fast);
3. save of calculated data to a txt file/spreadsheet... (not necessarily 
all calculated data will be saved by the user).


The user should also be able to delete/remove samples/columns or add 
samples/columns.



When doing a with a 64 bit program it might be possible and appropriate
just to use an array and have the OS do the dirty work of virtual memory
management, using a huge swap partition.


My app is actually compiled both on 32 and 64 bit. Maybe because I am 
old ;) (I started programming when RAM was to be used carefully, 1Mb of 
RAM was typical) but I am inhabited to not put all the data in memory, 
maybe I need to change my mind. Is it an option to not store on files 
but to take everything in memory and let app and os to perform the dirty 
work?



Andrea

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


Re: [Lazarus] data matrix with thousands of columns

2013-03-27 Thread Mark Morgan Lloyd

Andrea Mauri wrote:

Il 27/03/2013 09:27, Michael Schnell ha scritto:

On 03/26/2013 03:44 PM, Andrea Mauri wrote:

one more thing. my data is more similar to a huge spreadsheet than a
relational DB


"store":  Do you mean for working with it in "realtime" or for keeping
it for the next time the program is started ?


Ok I will explain better.

I have a GUI app.

The user loads samples (the rows), my app performs calculations on 
samples and for every sample give as output thousands of values (the 
columns). Samples could be from tens to hundreds of thousands.

Columns can be tens to thousands.
Every column is an attribute of the sample defined by a unique name.
After calculations the app/user should be able to search for one/more 
samples (or for one/more columns) getting all/some values for the 
sample/column. Briefly I need to be able to rapidly get some values from 
this huge data matrix.


I think that there's a risk that any solution that relies on having a 
large number of columns in a database could suddenly stop working if the 
data exceeds some server-specific limit. Granted that this limit has 
expanded over the years but in a pathological case where a very large 
input table (i.e. lots of rows) containing worst-case data was in effect 
rotated by 90 degrees (i.e. lots of columns) it could still be significant.


I think my choice would be to generate an intermediate table, if 
necessary with extra explicit indexes, that allowed the final query to 
extract and process only rows that matched certain criteria, even if 
they were then presented as columns.


However a lot depends on (a) how often the program is started, (b) the 
acceptable latency at startup and (c) whether persistent storage is 
necessary so that e.g. additional clients can inspect the data without 
having to regenerate it themselves. Iff the answers are "seldom", "lots" 
and "no" then using an internal array or some form of sparse matrix 
might be better than using a database.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

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


Re: [Lazarus] gtk 3 header

2013-03-27 Thread Mark Morgan Lloyd

Marco van de Voort wrote:

Was browsing the GTK site a bit, and saw that for recent GTK3 versions there
seem to be Pascal headers?

http://www.gtk.org/language-bindings.php


With the link pointing at http://wiki.lazarus.freepascal.org/GTK2_Interface

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

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


Re: [Lazarus] data matrix with thousands of columns

2013-03-27 Thread Michael Schnell

On 03/27/2013 10:24 AM, Andrea Mauri wrote:
 but I am inhabited to not put all the data in memory, maybe I need to 
change my mind. Is it an option to not store on files but to take 
everything in memory and let app and os to perform the dirty work?


That is the main reason why 64 Bit has been introduced: decently 
handling a huge amount of linearly addressed memory (real and virtual).


-Michael

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


[Lazarus] TAChart : not reading the OnMarkToText event handler from lfm ?

2013-03-27 Thread Lukasz Sokol
Hello TAChart devs,

on Lazarus 0.9.30 r29749 FPC 2.4.2 i386-win32-win32/win64

it seems the TAChart.AxisList[1] (Bottom) is forgetting
to read the OnMarkToText assignment from lfm (excerpt below)

 item
Alignment = calBottom
Marks.AtDataOnly = True
Title.Visible = True
Title.Caption = 'Date'
OnMarkToText = Chart2AxisList1MarkToText
  end

(i.e. when starting Lazarus or reopening a project,
the OnMarkToText event is empty in the Object Inspector,
which leads to a problem if the form is modified,
because the assignment is lost and has to be reinstated by hand)

Shall I bug or is it fixed in later release(s)?

(I guess it's not worth to create example app, try this:
- put a TChart on a form
- add 3 items to AxisList (left, bottom, right) (this is the order I have them 
at)
- in object inspector go to Chart1, AxisList, 1 - Bottom
- change the Title and other properties to it (see above excerpt of lfm)
- add a function to OnMarkToText event
- save project, compile, etc,
- close project/ close lazarus
- reopen project / launch lazarus
- the title and alignment and visibility is preserved, event OnMarkToText is 
NOT.)

Kind Regards

Lukasz


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


Re: [Lazarus] data matrix with thousands of columns

2013-03-27 Thread Mark Morgan Lloyd

Michael Schnell wrote:

On 03/27/2013 10:24 AM, Andrea Mauri wrote:
 but I am inhabited to not put all the data in memory, maybe I need to 
change my mind. Is it an option to not store on files but to take 
everything in memory and let app and os to perform the dirty work?


That is the main reason why 64 Bit has been introduced: decently 
handling a huge amount of linearly addressed memory (real and virtual).


Although I'm worried about the extent to which OS vendors etc. might 
assume that "nobody really needs 64 bit addresses" and partition off 
large chunks for their own use (ditto with 128-bit IP6 addresses) 
http://en.wikipedia.org/wiki/File:China_imperialism_cartoon.jpg


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

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


Re: [Lazarus] embed git version info

2013-03-27 Thread Xiangrong Fang
> How can I embed git version info AUTOMATICALLY while I compile my
program

> > in lazarus, just like {$I %DATE%} ?
>
> Use a pre-compile script (Project Options|Compiler
> Options|Compilation|Execute Before) in combination with a include file.
>

Thanks.

I realized that this may not work for me. Because I need to compile the
project under both Linux and Windows, and then I need 2 scripts in the same
place :-(

Anyway, I tested with the simplest pre-build script:

git describe --always > REVISION.INC


Then in my program I added:

msgs.Lines.Add('GIT HASH: ' + {$I REVISION.INC});

Unfortunately, it does not compile, the error I got is:

unit1.pas(831,50) Error: Identifier not found "c25d546"

It seems that this directive does not load the include file as simple
string??
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] data matrix with thousands of columns

2013-03-27 Thread Reinier Olislagers
On 27-3-2013 10:49, Mark Morgan Lloyd wrote:
> Andrea Mauri wrote:
>> Il 27/03/2013 09:27, Michael Schnell ha scritto:
>>> On 03/26/2013 03:44 PM, Andrea Mauri wrote:
>> Ok I will explain better.
>>
>> I have a GUI app.
>>
>> The user loads samples (the rows), my app performs calculations on
>> samples and for every sample give as output thousands of values (the
>> columns). Samples could be from tens to hundreds of thousands.
>> Columns can be tens to thousands.
>> Every column is an attribute of the sample defined by a unique name.
>> After calculations the app/user should be able to search for one/more
>> samples (or for one/more columns) getting all/some values for the
>> sample/column. Briefly I need to be able to rapidly get some values
>> from this huge data matrix.
> 
> I think that there's a risk that any solution that relies on having a
> large number of columns in a database could suddenly stop working if the
> data exceeds some server-specific limit. Granted that this limit has
> expanded over the years but in a pathological case where a very large
> input table (i.e. lots of rows) containing worst-case data was in effect
> rotated by 90 degrees (i.e. lots of columns) it could still be significant.
> 
> I think my choice would be to generate an intermediate table, if
> necessary with extra explicit indexes, that allowed the final query to
> extract and process only rows that matched certain criteria, even if
> they were then presented as columns.

If using a relational database, I would also propose that solution.
Messing with columns each time is just not what they're designed for.

Additionally, if you ever need to scale it up or store data in a
database server: different dbs have different limits on max number of
columns, performance may suffer when you have a huge amount of columns etc.

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


Re: [Lazarus] embed git version info

2013-03-27 Thread Lukasz Sokol
On 27/03/2013 14:18, Xiangrong Fang wrote:
> > How can I embed git version info AUTOMATICALLY while I compile my 
> program
> 
> > in lazarus, just like {$I %DATE%} ?
> 
> Use a pre-compile script (Project Options|Compiler
> Options|Compilation|Execute Before) in combination with a include file.
> 
> 
> Thanks.
> 
> I realized that this may not work for me. Because I need to compile the 
> project under both Linux and Windows, and then I need 2 scripts in the same 
> place :-(
> 
> Anyway, I tested with the simplest pre-build script:
> 
> git describe --always > REVISION.INC
> 
> 
> Then in my program I added:
> 
> msgs.Lines.Add('GIT HASH: ' + {$I REVISION.INC});  
> 
> Unfortunately, it does not compile, the error I got is:
> 
> unit1.pas(831,50) Error: Identifier not found "c25d546"
> 
> It seems that this directive does not load the include file as simple string??
>  
> 
maybe have your script do :

echo "constgithashfrominc : string = \'" > REVISION.INC
git describe --always >> REVISION.INC
echo "\';" >> REVISION.INC

at the implementation section, under const directive do:

{$I REVISION.INC}

and then 

msgs.Lines.Add('Git HASH: '+constgithashfrominc);


(i.e. so that you are going to have
const githashfrominc : string = 'whatever';
)

Or have it as resource string (it was mentioned on this list once upon a time).

L.



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


Re: [Lazarus] How to use data from stringlist in another form.

2013-03-27 Thread appjaws

On 27/03/13 08:06, Antonio Fortuny wrote:

Le 26/03/2013 15:14, appjaws a écrit :

I have 2 forms, form 1 calls form 2 on a buttonclick process.
Form 2 loads a string list, operations are carried out and the
stringlist is saved.


on FormMain:
...
implementation
uses
   unit2;

procedure TFrmMain.Button1Click(Sender: TObject);
begin
   if Form1.List.Count = 0 then
 Form1.LoadList;
   // do whatever do to to compare
end;
==
on second form:
unit unit2;
{$mode objfpc}{$H+}
interface
uses
   Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs;
type
   { TForm1 }
   TForm1 = class(TForm)
 procedure FormCreate(Sender: TObject);
 procedure FormDestroy(Sender: TObject);
   private
 { private declarations }
 FList: TStringList;
   public
 { public declarations }
 procedure LoadList;

 property List: TStringList read FList;
   end;

var
   Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
begin
   FList := TStringList.Create;
end;

procedure TForm1.FormDestroy(Sender: TObject);
begin
   FList.Free
end;

procedure TForm1.LoadList;
begin
   FList.LoadFromFile('myfile.txt')
end;

end.


Thank you Antonio,
works well with no errors.
Paul


--
---This message has been sent using Thunderbird on kubuntu---

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


Re: [Lazarus] data matrix with thousands of columns

2013-03-27 Thread Max Vlasov
On Wed, Mar 27, 2013 at 1:24 PM, Andrea Mauri wrote:

>
> After calculations the app/user should be able to search for one/more
> samples (or for one/more columns) getting all/some values for the
> sample/column. Briefly I need to be able to rapidly get some values from
> this huge data matrix.
>
>

Andrea, looking at your description I probably have a suggestion, although
we're are more and more drifting from Pascal :)

Once I wanted to extract CIA Factbook data and when noticed there are about
170 columns decided to try Triplestore (Object-Propery-Value) similar to
rdf. Basically the data was contained in a table of Sqlite having very few
columns. Changing to your case this can be

CREATE TABLE [Data] (
... ,
[Row] INTEGER, [Column] INTEGER, [Value] TEXT
...
)

Additional tables were used for naming countries and properties (rows and
columns in this case) and indexes was used for quick querying. Although in
my case 170 was much less than your tens of thousands, this approach can
work. Your I noticed that queries for such table were similar two general
queries, only extra join was usually added. Moving from sql columns helped
a lot in thinking abstractly about the data and queries became more
flexible.

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


Re: [Lazarus] data matrix with thousands of columns

2013-03-27 Thread Andrea Mauri

Il 27/03/2013 16:11, Max Vlasov ha scritto:

CREATE TABLE [Data] (
... ,
[Row] INTEGER, [Column] INTEGER, [Value] TEXT
...
)
As I answered to Leonardo I tried something like this but I have to 
insert millions of entries when application is running and this solution 
will slow enormously the app.




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


Re: [Lazarus] embed git version info

2013-03-27 Thread Graeme Geldenhuys
On 2013-03-27 14:18, Xiangrong Fang wrote:
> 
> I realized that this may not work for me. Because I need to compile the
> project under both Linux and Windows, and then I need 2 scripts in the same
> place :-(

Yeah, compared to MSEide, Lazarus project build settings are a bit
historic or limited.

To get around problems with scripts vs batch files for cross-platform
use, I found it is better to implement my "scripts" as FPC console
applications. Then simply execute the console application where I would
have used a script. I found that creating such console apps are actually
a lot more powerful that batch files or bash scripts, because I have
full use of the Free Pascal RTL, FCL and whatever else I need.


> Anyway, I tested with the simplest pre-build script:
> 
> git describe --always > REVISION.INC

If you run the 'git describe' from the command line, you would see the
output is simply the "version information" (no constant definition or
string quotes). So you need to place it in your source code with an
identifier as the Pascal language requires. So you need to do something
like the following in your code.

const
  cGitRevision = '{$revision.inc}';


Then in your program, use the constant instead.

  msgs.Lines.Add('GIT HASH: ' + cGitRevision);



Regards,
  - Graeme -

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


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


Re: [Lazarus] Limit to the number of forms in a project?

2013-03-27 Thread K. P.
Maybe something to do with form auto-creation (Project Oprions -> Forms -> 
AutoCreate)?Are your forms created at run- or design-time? Cheers,Kai
 > Date: Wed, 27 Mar 2013 08:12:55 +0200
> From: dgcoven...@gmail.com
> To: laza...@lazarus.freepascal.org
> Subject: [Lazarus] Limit to the number of forms in a project?
> 
> I needed a dialog box to allow users to select which database to
> access in my project.
> 
> The project already has 6 forms.
> 
> But when I added a form and click 'Run', the Project appears to
> compile but doesn't run in the debugger. If I run the compiled project
> from the command line, it runs but the 7th Form does not appear.
> 
> Odd.
> 
> Lazarus 1.1 r40644 FPC 2.6.0 x86_64-linux-gtk 2,
> 
> The same behaviour is observed in Lazarus running on an XP guest
> running on a Virtualbox VM Lazarus 1.0.7 r40363 FPC 2.6.0
> i386-win32-win32/win64.
> 
> --
> ___
> 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] embed git version info

2013-03-27 Thread Sven Barth
Am 27.03.2013 16:26 schrieb "Graeme Geldenhuys" :
> > Anyway, I tested with the simplest pre-build script:
> >
> > git describe --always > REVISION.INC
>
> If you run the 'git describe' from the command line, you would see the
> output is simply the "version information" (no constant definition or
> string quotes). So you need to place it in your source code with an
> identifier as the Pascal language requires. So you need to do something
> like the following in your code.
>
> const
>   cGitRevision = '{$revision.inc}';

This won't work, because the string takes precedance over the directive.

But you could use the data2inc tool that cones with FPC to convert the
returned data to a include file with constant.

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


Re: [Lazarus] Debugging fixed strings in UTF8 encoding

2013-03-27 Thread Martin

On 27/03/2013 04:08, Ernest V Miller wrote:

Hello!

As we know, Lazarus is UTF8 friendly. When I want to see a value of a
string var in cyrillic, I should convert it to UTF8, else I only get
"?" in Watches window.
For this code

  function TesterClass.quickTest : Boolean;
 var
   utf8, ansi : string;
   stf : string[50];
 begin
ansi := Utf8ToAnsi('Кукла');
utf8 := AnsiToUtf8(ansi);
<>
 end;

I see value of utf8 in russian. And I am absolutely happy. But as soon as I
want to use fixed strings, the only way for me to see my native language
when debugging is to declare an additional string var as you can see below:



Currently the only way would be to allow the user to specify how to 
interpret a watch, that is the user would set in the watches properties, 
if he wants utf8 or whatever encoding.


You can add a feature request, but currently that would have very low 
priority. (or "patches welcome")


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


Re: [Lazarus] How to send Email from Lazarus program under Linux x86-64

2013-03-27 Thread Alejandro Gonzalo
What about webmail like Gmail?  Anyway to use openurl to go to the webpage with 
the To, Subject, and perhaps Body already filled in?
 
A. G.
 


 From: Donald Ziesig 
To: lazarus@lists.lazarus.freepascal.org 
Sent: Tuesday, March 26, 2013 11:27 AM
Subject: Re: [Lazarus] How to send Email from Lazarus program under Linux x86-64
  
Just a word of thanks to all who helped me with this.  Somehow I kept getting 
really old code from all of the links and none of it would compile in 64-bit 
mode, let alone run.

I finally found the synapse svn website which had a massive tarball with almost 
everything from the beginning to really up-to-date code.  The latest code 
compiled and started sending email immediately.

Again, thanks to all who recognized that I was not getting the latest and 
pointed me in the right direction.

Don Ziesig

END OF THREAD!


--
___
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] Limit to the number of forms in a project?

2013-03-27 Thread Dave Coventry
Hi Kai,

On 27 March 2013 18:57, K. P.  wrote:
> Maybe something to do with form auto-creation (Project Oprions -> Forms ->
> AutoCreate)?

Yes, I'd assume that, too.

> Are your forms created at run- or design-time?

They are created at design time.

I suppose that I should actually be creating them at run time.

According to the last post by Juha in this thread:
http://www.lazarus.freepascal.org/index.php/topic,20139.msg115782.html#msg115782

creating the form at run time is preferable, anyway.

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


Re: [Lazarus] gtk 3 header

2013-03-27 Thread Marco van de Voort
On Wed, Mar 27, 2013 at 09:53:05AM +, Mark Morgan Lloyd wrote:
> > Was browsing the GTK site a bit, and saw that for recent GTK3 versions there
> > seem to be Pascal headers?
> > 
> > http://www.gtk.org/language-bindings.php
> 
> With the link pointing at http://wiki.lazarus.freepascal.org/GTK2_Interface

The link of "pascal", yes. But I'm intrigued why GTK3.4+3.6 are ticked for
Pascal and 3.0 and 3.2 not :)

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


Re: [Lazarus] gtk 3 header

2013-03-27 Thread Mark Morgan Lloyd

Marco van de Voort wrote:

On Wed, Mar 27, 2013 at 09:53:05AM +, Mark Morgan Lloyd wrote:

Was browsing the GTK site a bit, and saw that for recent GTK3 versions there
seem to be Pascal headers?

http://www.gtk.org/language-bindings.php

With the link pointing at http://wiki.lazarus.freepascal.org/GTK2_Interface


The link of "pascal", yes. But I'm intrigued why GTK3.4+3.6 are ticked for
Pascal and 3.0 and 3.2 not :)


Perhaps backwards compatibility was broken in 3.0 and 3.2, so older 
headers couldn't be used. But if anybody knows the answer I'm sure we're 
all ears :-)


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

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


Re: [Lazarus] embed git version info

2013-03-27 Thread Graeme Geldenhuys
On 2013-03-27 17:59, Sven Barth wrote:
>>
>> const
>>   cGitRevision = '{$revision.inc}';
> 
> This won't work, because the string takes precedance over the directive.

Probably why my original version build script generates the whole line
with identifier.

What about the following...

 const
   cGitRevision =  + {$revision.inc} + ;

Or are expressions not allowed in constant declarations either? Anyway,
I think we gave enough hints for the original poster to find a suitable
solution. I was never pro to spoon-feeding programmers. ;-)


Regards,
  - Graeme -

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


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


Re: [Lazarus] gtk 3 header

2013-03-27 Thread Andrew Haines
Thats because the files were generated with the introspection files from those 
two versions. It's pretty easy to generate any version needed for the bindings 
using the gir2pas program in the Lazarus CCR

Regards,
Andrew Haines

Marco van de Voort  wrote:

>On Wed, Mar 27, 2013 at 09:53:05AM +, Mark Morgan Lloyd wrote:
>> > Was browsing the GTK site a bit, and saw that for recent GTK3
>versions there
>> > seem to be Pascal headers?
>> > 
>> > http://www.gtk.org/language-bindings.php
>> 
>> With the link pointing at
>http://wiki.lazarus.freepascal.org/GTK2_Interface
>
>The link of "pascal", yes. But I'm intrigued why GTK3.4+3.6 are ticked
>for
>Pascal and 3.0 and 3.2 not :)
>
>--
>___
>Lazarus mailing list
>Lazarus@lists.lazarus.freepascal.org
>http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TAChart : not reading the OnMarkToText event handler from lfm ?

2013-03-27 Thread Alexander Klenin
On Wed, Mar 27, 2013 at 5:17 PM, Lukasz Sokol  wrote:
> on Lazarus 0.9.30 r29749 FPC 2.4.2 i386-win32-win32/win64
>
> it seems the TAChart.AxisList[1] (Bottom) is forgetting
> to read the OnMarkToText assignment from lfm (excerpt below)

> Shall I bug or is it fixed in later release(s)?

It should be.


--
Alexander S. Klenin

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


Re: [Lazarus] Limit to the number of forms in a project?

2013-03-27 Thread Hans-Peter Diettrich

Dave Coventry schrieb:

Hi Kai,

On 27 March 2013 18:57, K. P.  wrote:

Maybe something to do with form auto-creation (Project Oprions -> Forms ->
AutoCreate)?


Yes, I'd assume that, too.


Are your forms created at run- or design-time?


They are created at design time.

I suppose that I should actually be creating them at run time.


I think that the right question is about automatic form creation (on app 
start) or on demand. I'd let the first form be auto-created, and in its 
FormCreate handler it creates the other form, before using it or its 
components.


The shared components (list...) also better are moved into a common 
unit, where they can be created during program initialization. This 
initialization can reside either in the unit initialization section, or 
in a routine called from a splash screen, or in the main form creation 
handler.


DoDi


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


Re: [Lazarus] Debugging fixed strings in UTF8 encoding

2013-03-27 Thread Ernest V Miller
As you could see in my previous examples, Lazarus shows the content of
variable string correctly,  no matter how the symbols are encoded.
So there is no need in special encoding options in Watches.
The point is that when IDE evaluates the string content, there is a
difference for it whether the string has variable of fixed length.
After all, strings are ordered sequences of characters and should be
recognized very very similar.
I think it is a bug, and it seems to me that it can be fixed with minimal
changes.

Martin  wrote 28.03.2013 03:13:01:


> Currently the only way would be to allow the user to specify how to
> interpret a watch, that is the user would set in the watches properties,
> if he wants utf8 or whatever encoding.
>
> You can add a feature request, but currently that would have very low
> priority. (or "patches welcome")
>
> --
> ___
> 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] embed git version info

2013-03-27 Thread Xiangrong Fang
2013/3/27 Lukasz Sokol 

> On 27/03/2013 14:18, Xiangrong Fang wrote:
> > > How can I embed git version info AUTOMATICALLY while I compile my
> program
> >
> > > in lazarus, just like {$I %DATE%} ?
> >
> > Use a pre-compile script (Project Options|Compiler
> > Options|Compilation|Execute Before) in combination with a include
> file.
>

I thought {$I revision.inc} is similar as {$I %DAT%}, but apparently they
have different semantic.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus