[Lazarus] HTTP and POP3 client components

2012-12-03 Thread Michael Schnell

Hi,

Sorry for being a nuisance again :-[ 

We need to do a command line program to run n Linux (PC, later ARM), 
that  reads a mail via POP3 and then does some communication towards 
some HTTP server (reading some pages and setting a value with some cgi 
program running there.)


I do know that decent HTTP and POP3 components are available with Indy, 
but I am afraid of trying to use Indy on Lazarus/ARM/Linux.


As we already successfully did an FTP client program on Lazarus with 
lnet, I decided to try to use lnet, here again.


So I installed the latest lnet package and found that in fact a HTTP 
client component is available.


Up till now, I failed to find a decent documentation, so I was not able 
to read a page from a web server (in fact I would need a proxy for some 
environments, but - at least on Linux - I suppose there is a system wide 
proxy definition that might automatically apply.


In fact connect seems to work, but what now ?

Seemingly lnet does not provide a POP3 client component out of the box. 
So what to do ?


Thanks for any pointers,
-Michael

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


Re: [Lazarus] HTTP and POP3 client components

2012-12-03 Thread Stephane Carre
Did you have look at synapse ? http://synapse.ararat.cz/doku.php
Works fine under Linux and Windows, 32 and 64 bit, both with Lazarus and Delphi.
Stephane

- Original Message -
From: Michael Schnell mschn...@lumino.de
To: Lazarus mailing list lazarus@lists.lazarus.freepascal.org
Sent: Monday, 3 December, 2012 11:59:34 AM
Subject: [Lazarus] HTTP and POP3 client components

Hi,

Sorry for being a nuisance again :-[ 

We need to do a command line program to run n Linux (PC, later ARM), 
that  reads a mail via POP3 and then does some communication towards 
some HTTP server (reading some pages and setting a value with some cgi 
program running there.)

I do know that decent HTTP and POP3 components are available with Indy, 
but I am afraid of trying to use Indy on Lazarus/ARM/Linux.

As we already successfully did an FTP client program on Lazarus with 
lnet, I decided to try to use lnet, here again.

So I installed the latest lnet package and found that in fact a HTTP 
client component is available.

Up till now, I failed to find a decent documentation, so I was not able 
to read a page from a web server (in fact I would need a proxy for some 
environments, but - at least on Linux - I suppose there is a system wide 
proxy definition that might automatically apply.

In fact connect seems to work, but what now ?

Seemingly lnet does not provide a POP3 client component out of the box. 
So what to do ?

Thanks for any pointers,
-Michael

--
___
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] Lazarus 1.0.4 Release

2012-12-03 Thread Reinier Olislagers
On 2-12-2012 10:12, Mattias Gaertner wrote:
 The Lazarus team is glad to announce the release of Lazarus 1.0.4.
 
Perhaps it would be nice if somebody posted the same announcement in the
Announcements section on the forum

Thanks,
Reinier


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


Re: [Lazarus] HTTP and POP3 client components

2012-12-03 Thread Antonio Fortuny



Le 03/12/2012 11:59, Michael Schnell a écrit :

Hi,

Sorry for being a nuisance again :-[ 

We need to do a command line program to run n Linux (PC, later ARM),
that  reads a mail via POP3 and then does some communication towards
some HTTP server (reading some pages and setting a value with some cgi
program running there.)

I do know that decent HTTP and POP3 components are available with Indy,
but I am afraid of trying to use Indy on Lazarus/ARM/Linux.
I currently use Indy 10 (10.5.8) successfully with 
Win32-Win64-WinCE(Arm)-Linux64 with Lazarus (1.1) and Delphi (5, 2007), 
all platforms talking to each other over TCP/IP. Pretty simple to use (a 
little more difficult to compile for Lazarus)

Blocking sockets with timeouts


As we already successfully did an FTP client program on Lazarus with
lnet, I decided to try to use lnet, here again.

So I installed the latest lnet package and found that in fact a HTTP
client component is available.

Up till now, I failed to find a decent documentation, so I was not able
to read a page from a web server (in fact I would need a proxy for some
environments, but - at least on Linux - I suppose there is a system wide
proxy definition that might automatically apply.

In fact connect seems to work, but what now ?

Seemingly lnet does not provide a POP3 client component out of the box.
So what to do ?

Thanks for any pointers,
-Michael

--
___
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] from hfiandor 03 dic 2012 help needed

2012-12-03 Thread Héctor F . Fiandor Rosario
Dear fellows,

I have a unit for rea/write routines, without a form (not needed).

Now I have to prepare a file with information from a BD table. In other units 
with form it´s easy to fix a table control, and work with this table, but I 
don´t know how to do with my read/write unit.

thanks in advance for your contribution,

yours,

Ing. Héctor F. Fiandor Rosario
hfian...@infomed.sld.cu



--

Este mensaje le ha llegado mediante el servicio de correo electronico 
que ofrece Infomed para respaldar el cumplimiento de las misiones del Sistem
a Nacional de Salud. La persona que envia este correo asume el compromiso de
 usar el servicio a tales fines y cumplir con las regulaciones establecidas


Infomed: http://www.sld.cu/


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


Re: [Lazarus] Lazarus 1.0.4 Release

2012-12-03 Thread Mattias Gaertner
On Mon, 03 Dec 2012 14:12:33 +0100
Reinier Olislagers reinierolislag...@gmail.com wrote:

 On 2-12-2012 10:12, Mattias Gaertner wrote:
  The Lazarus team is glad to announce the release of Lazarus 1.0.4.
  
 Perhaps it would be nice if somebody posted the same announcement in the
 Announcements section on the forum

http://www.lazarus.freepascal.org/index.php/topic,19090.html

Mattias

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


Re: [Lazarus] from hfiandor 03 dic 2012 help needed

2012-12-03 Thread Reinier Olislagers
On 3-12-2012 21:53, Héctor F. Fiandor Rosario wrote:
 Dear fellows,
  
 I have a unit for rea/write routines, without a form (not needed).
As mentioned before, please don't reply to an existing thread but start
a new thread.

Thanks,
Reinier


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


[Lazarus] GDB - cannot perform pointer math on incomplete types

2012-12-03 Thread David Emerson
This error message has often befuddled me when debugging.
I've got a dynamic array, usually a type that I've created, e.g.
type longint_arr = array of longint
I'm using the Watch List and want to inspect one of the elements of such an 
array, e.g. f_list[0]. But I get this error, which I guess comes from GDB.
Is there any way I can coerce it into giving me f_list[0], or even 
f_list[1]?

Thanks,
David



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


Re: [Lazarus] GDB - cannot perform pointer math on incomplete types

2012-12-03 Thread Martin

On 04/12/2012 01:54, David Emerson wrote:

This error message has often befuddled me when debugging.
I've got a dynamic array, usually a type that I've created, e.g.
type longint_arr = array of longint
I'm using the Watch List and want to inspect one of the elements of such an
array, e.g. f_list[0]. But I get this error, which I guess comes from GDB.
Is there any way I can coerce it into giving me f_list[0], or even
f_list[1]?



I would need a complete example
Also Laz/fpc version...

Sometimes this message appears, if you declare an array without a type name.
So instead of
  type TMyArray = array of integer; var Foo: TMyArray;
you do:
  var Foo: array of integer;

If the type of the element is named, then do
  ^integer(Foo)[1]
Nested Array
  ^^integer(Foo)[1][2]

If it is a static array array[3..5] then the pointer type cast still 
starts at index 0 (so you must subtract the low bound from all indices)


It may also happen with nested arrays, and (unnamed (inline in var 
declared) records)

  var Foo: array of record ... end;

You may also try switching between stabs and dwarf (project options / 
/linking)


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


Re: [Lazarus] GDB - cannot perform pointer math on incomplete types

2012-12-03 Thread Martin

On 04/12/2012 02:04, Martin wrote:

On 04/12/2012 01:54, David Emerson wrote:

This error message has often befuddled me when debugging.
I've got a dynamic array, usually a type that I've created, e.g.
type longint_arr = array of longint
I'm using the Watch List and want to inspect one of the elements of 
such an
array, e.g. f_list[0]. But I get this error, which I guess comes from 
GDB.

Is there any way I can coerce it into giving me f_list[0], or even
f_list[1]?



I would need a complete example
Also Laz/fpc version...


Or supply a log: 
http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#Log_info_for_debug_session


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


Re: [Lazarus] GDB - cannot perform pointer math on incomplete types

2012-12-03 Thread David Emerson
 Original Message 
 From: Martin laza...@mfriebe.de
 
 On 04/12/2012 01:54, David Emerson wrote:
  This error message has often befuddled me when debugging.
  I've got a dynamic array, usually a type that I've created, e.g.
  type longint_arr = array of longint
  I'm using the Watch List and want to inspect one of the elements of 
such an
  array, e.g. f_list[0]. But I get this error, which I guess comes from 
GDB.
  Is there any way I can coerce it into giving me f_list[0], or even
  f_list[1]?
 
 
 I would need a complete example
 Also Laz/fpc version...
 
 Sometimes this message appears, if you declare an array without a type 
name.
 So instead of
type TMyArray = array of integer; var Foo: TMyArray;
 you do:
var Foo: array of integer;
 
 If the type of the element is named, then do
^integer(Foo)[1]
 Nested Array
^^integer(Foo)[1][2]
 
 If it is a static array array[3..5] then the pointer type cast still 
 starts at index 0 (so you must subtract the low bound from all indices)
 
 It may also happen with nested arrays, and (unnamed (inline in var 
 declared) records)
var Foo: array of record ... end;
 
 You may also try switching between stabs and dwarf (project options / 
 /linking)
 

Thanks much!! The first suggestion ^integer(foo)[1] works great!



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


Re: [Lazarus] GDB - cannot perform pointer math on incomplete types

2012-12-03 Thread Martin

On 04/12/2012 02:31, David Emerson wrote:

Thanks much!! The first suggestion ^integer(foo)[1] works great!




Still if you can get me the log + unit source ?

because the IDE in many cases tries to work those out. So I wonder what 
happens behind the curtains...


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


Re: [Lazarus] GDB - cannot perform pointer math on incomplete types

2012-12-03 Thread David Emerson
Martin wrote:
 
 Still if you can get me the log + unit source ?
 
 because the IDE in many cases tries to work those out. So I wonder what 
 happens behind the curtains...

Hmm I am working on it ... can't really share the sources  :(  but I am 
trying to build a miniature version to reproduce it. In the meantime:

The watch item I created looks like this:
tsrl_ag_cp(f_ag).f_curve.f_cps.f_list[0]
and after your suggestion, was fixed like this:
^pointer(tsrl_ag_cp(f_ag).f_curve.f_cps.f_list)[0]

SELF is a class with field f_ag : tsrl_ag
tsrl_ag_cp descends from tsrl_ag
tsrl_ag_cp has field f_curve : tsrl_curve
tsrl_curve has field f_cps : tsrl_ag_cp_list
tsrl_ag_cp_list descends from t_ordered_ag_list
t_ordered_ag_list = specialize gt_unsorted_pointer_list tsrl_ag
generic gt_unsorted_pointer_list _class = class 
(t_unsorted_pointer_list)
t_unsorted_pointer_list is a class with field f_list : ptr_array
and type ptr_array = array of pointer

So as you can see it is a little complicated :-)



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


Re: [Lazarus] GDB - cannot perform pointer math on incomplete types

2012-12-03 Thread Martin

On 04/12/2012 03:11, David Emerson wrote:

Martin wrote:

Still if you can get me the log + unit source ?

because the IDE in many cases tries to work those out. So I wonder what
happens behind the curtains...

Hmm I am working on it ... can't really share the sources  :(  but I am
trying to build a miniature version to reproduce it. In the meantime:

The watch item I created looks like this:
tsrl_ag_cp(f_ag).f_curve.f_cps.f_list[0]
and after your suggestion, was fixed like this:
^pointer(tsrl_ag_cp(f_ag).f_curve.f_cps.f_list)[0]

SELF is a class with field f_ag : tsrl_ag
tsrl_ag_cp descends from tsrl_ag
tsrl_ag_cp has field f_curve : tsrl_curve
tsrl_curve has field f_cps : tsrl_ag_cp_list
tsrl_ag_cp_list descends from t_ordered_ag_list
t_ordered_ag_list = specialize gt_unsorted_pointer_list tsrl_ag
generic gt_unsorted_pointer_list _class = class
(t_unsorted_pointer_list)
t_unsorted_pointer_list is a class with field f_list : ptr_array
and type ptr_array = array of pointer

So as you can see it is a little complicated :-)


Ok there are 2 possible bits in there.

1) maybe fpc does some odd debug info with generics. Never tested. Unknown

2) The type cast to the class. GDB can get the hick ups, because classes 
are pointers, and gdb half-knows it


try
   ^tsrl_ag_cp(f_ag).f_curve.f_cps.f_list[0]


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


Re: [Lazarus] GDB - cannot perform pointer math on incomplete types

2012-12-03 Thread David Emerson
 Still if you can get me the log + unit source ?
 
 because the IDE in many cases tries to work those out. So I wonder what 
 happens behind the curtains...

I just constructed this program, which allows me to reproduce the issue. I 
put a breakpoint on the writeln.
Watch List items:
tsrl_ag_cp(cf.f_ag).f_curve.f_cps.f_list[0] -- gives GDB error
^tsrl_ag_cp(tsrl_ag_cp(cf.f_ag).f_curve.f_cps.f_list)[0] -- succeeds

I'll see how much of this I can cut out and still reproduce :)

program dumdum;

{$mode objfpc}

uses classes;

type
  ptr_array = array of pointer;
  tsrl_ag = class (tobject);

  t_list_frame = class (tobject)
f_list : ptr_array;
end;

  t_unsorted_pointer_list = class (t_list_frame)
procedure add (p : pointer);
end;

  generic gt_unsorted_pointer_list _class = class 
(t_unsorted_pointer_list)
end;

  t_ordered_ag_list = specialize gt_unsorted_pointer_list tsrl_ag;

  tsrl_ag_cp_list = class (t_ordered_ag_list);

  tsrl_shape = class
f_ag : tsrl_ag;
end;

  tsrl_crowsfoot_icon = tsrl_shape;

  tsrl_curve = class (tsrl_shape)
f_cps : tsrl_ag_cp_list;
end;

  tsrl_ag_cp = class (tsrl_ag)
f_curve : tsrl_curve;
end;

procedure t_unsorted_pointer_list.add (p : pointer);
  var l : longint;
  begin
l := length(f_list);
setlength (f_list, l+1);
f_list[l] := p;
  end;

var
  cf : tsrl_crowsfoot_icon;
  cf_ag, other_cp : tsrl_ag_cp;
  curve : tsrl_curve;

begin
  cf_ag := tsrl_ag_cp.create;
  other_cp := tsrl_ag_cp.create;
  curve := tsrl_curve.create;
  curve.f_cps := tsrl_ag_cp_list.create;
  curve.f_cps.add(other_cp);
  curve.f_cps.add(cf_ag);
  cf_ag.f_curve := curve;
  cf := tsrl_crowsfoot_icon.create;
  cf.f_ag := cf_ag;
  writeln ('hi');
end.



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


Re: [Lazarus] GDB - cannot perform pointer math on incomplete types

2012-12-03 Thread Martin

On 04/12/2012 03:48, David Emerson wrote:

Still if you can get me the log + unit source ?

because the IDE in many cases tries to work those out. So I wonder what
happens behind the curtains...

I just constructed this program, which allows me to reproduce the issue. I
put a breakpoint on the writeln.
Watch List items:
tsrl_ag_cp(cf.f_ag).f_curve.f_cps.f_list[0] -- gives GDB error
^tsrl_ag_cp(tsrl_ag_cp(cf.f_ag).f_curve.f_cps.f_list)[0] -- succeeds

I'll see how much of this I can cut out and still reproduce :)



Thanks, this is ok.  I can reproduce.
I do not need it any simpler.

Btw with dwarf, both work, but the first returns the address only

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


[Lazarus] New user interface for future major releases of Lazarus

2012-12-03 Thread Felipe Ferreira da Silva
I would like to propose and discuss about a new graphical user 
interface for the next major releases. Nowadays, most of the RAD tools 
use a docked interface(MonoDevelop, Delphi, VS), and in some cases they 
are stylish(like the recent Visual Studio versions). I think that a 
better-looking IDE would not just make the programming task more 
pleasant, but also could attract more people to Pascal.


I know about the existence of AnchorDocking package for a 
docked IDE, but I think that if such feature were built-in, the IDE 
could be improved with appropriated features for a docked app - and 
since the forms would be still undockable, the user could switch back to 
the Delphi7-like interface.


My propose is ask if you guys would mind if I work on some 
projects with a different interface and made in Lazarus(of course) to 
you evaluate. I'm good at create components and customize to give them a 
stylish appearance like in the case of VS. But I would like to know from 
you guys first.



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