[fpc-pascal] any generic List class other than those in fgl unit?

2014-10-24 Thread Dennis Poon
The TFPGMap in fgl unit has serious bug in the Find method. I tried but 
cannot fix it.

I am hoping to find a well tested replacement class?
Please kindly let me know.

Dennis
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


[fpc-pascal] fphttpclient and timeout

2014-10-24 Thread Philippe
 

Using basically HTTPClient.Get, I did not find time out
configuration with fphttpclient. Did I missed it? 

If not, is there a
way to implement it ? Using thread? 

If not, is there a similar
library/unit with configurable timeout? 

I appreciate any suggestion!


Philippe ___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] fphttpclient and timeout

2014-10-24 Thread Michael Van Canneyt



On Fri, 24 Oct 2014, Philippe wrote:



Using basically HTTPClient.Get, I did not find time out configuration with 
fphttpclient. Did I missed it?


it does not exist yet.



If not, is there a way to implement it ? Using thread?


that would be one way.



If not, is there a similar library/unit with configurable timeout?


synapse probably has it.

Michael.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] any generic List class other than those in fgl unit?

2014-10-24 Thread Reinier Olislagers
On 24/10/2014 13:32, Dennis Poon wrote:
> The TFPGMap in fgl unit has serious bug in the Find method. I tried but
> cannot fix it.

Why don't you raise a bug in the bugtracker with an example test program
so developers can look into it?

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] fphttpclient and timeout

2014-10-24 Thread silvioprog
On Fri, Oct 24, 2014 at 8:41 AM, Michael Van Canneyt  wrote:
>
> On Fri, 24 Oct 2014, Philippe wrote:
>>
>> Using basically HTTPClient.Get, I did not find time out configuration
>> with fphttpclient. Did I missed it?
>>
>
> it does not exist yet.
>
>
>> If not, is there a way to implement it ? Using thread?
>>
>
> that would be one way.
>
>
>> If not, is there a similar library/unit with configurable timeout?
>>
>
> synapse probably has it.
>
> Michael.



You could implement the timeout directly in the internal FSocket in
TFPHttpClient(*). I implemented that using "GetTick"[1] and "TTimeVal"[2]:

Just suggestions! =)

(*) E.g:

TFPCustomHTTPSocket = class(TInetSocket) // implementing the timout
..
  TFPCustomHTTPClient = Class(TComponent)
  private
...
FSocket : TFPCustomHTTPSocket; // using TFPCustomHTTPSocket instead of
TInetSocket directly because TFPCustomHTTPSocket implements the timeout

[1] -
https://github.com/silvioprog/tcpipcomp/blob/master/src/tcpipbase.pas#L105

[2] -
https://github.com/silvioprog/tcpipcomp/blob/master/src/tcpipclient.pas#L130

--
Silvio Clécio
My public projects - github.com/silvioprog
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] fphttpclient and timeout

2014-10-24 Thread Philippe
 

Em 24.10.2014 09:41, Michael Van Canneyt escreveu: 

> On Fri, 24
Oct 2014, Philippe wrote:
> 
>> Using basically HTTPClient.Get, I did
not find time out configuration with fphttpclient. Did I missed it?
> 
>
it does not exist yet.
> 
>> If not, is there a way to implement it ?
Using thread?
> 
> that would be one way.

 

Links:
--
[1]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] fphttpclient and timeout

2014-10-24 Thread Philippe
 

Em 24.10.2014 09:54, silvioprog escreveu: 

> On Fri, Oct 24, 2014
at 8:41 AM, Michael Van Canneyt wrote: 
> 
>> On
Fri, 24 Oct 2014, Philippe wrote: 
>> 
>>> Using basically
HTTPClient.Get, I did not find time out configuration with fphttpclient.
Did I missed it?
>> 
>> it does not exist yet.
>> 
>>> If not, is there
a way to implement it ? Using thread?
>> 
>> that would be one way.
> 
>
You could implement the timeout directly in the internal FSocket in
TFPHttpClient(*). I implemented that using "GetTick"[1] and
"TTimeVal"[2]: 
> 
> Just suggestions! =) 
> 
> (*) E.g: 
> 
>
TFPCustomHTTPSocket = class(TInetSocket) // implementing the timout 
>
.. 
> 
> TFPCustomHTTPClient = Class(TComponent) 
> private 
> ... 
>
FSocket : TFPCustomHTTPSocket; // using TFPCustomHTTPSocket instead of
TInetSocket directly because TFPCustomHTTPSocket implements the timeout

> 
> [1] -
https://github.com/silvioprog/tcpipcomp/blob/master/src/tcpipbase.pas#L105
[1] 
> 
> [2] -
https://github.com/silvioprog/tcpipcomp/blob/master/src/tcpipclient.pas#L130
[2] 
> --
> Silvio Clécio
> My public projects - github.com/silvioprog
[3]

> Thanks ... may be a bit complicated for me now ... I keep it for
later!

___
fpc-pascal
maillist -
fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
[4]

> 


Links:
--
[1]
https://github.com/silvioprog/tcpipcomp/blob/master/src/tcpipbase.pas#L105
[2]
https://github.com/silvioprog/tcpipcomp/blob/master/src/tcpipclient.pas#L130
[3]
http://github.com/silvioprog
[4]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] any generic List class other than those in fgl unit?

2014-10-24 Thread Dennis Poon



Reinier Olislagers wrote:

On 24/10/2014 13:32, Dennis Poon wrote:

The TFPGMap in fgl unit has serious bug in the Find method. I tried but
cannot fix it.

Why don't you raise a bug in the bugtracker with an example test program
so developers can look into it?


Can you give me a link to report this bug? I have not done this before.

Dennis
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] any generic List class other than those in fgl unit?

2014-10-24 Thread Reinier Olislagers
On 24/10/2014 17:15, Dennis Poon wrote:
> Reinier Olislagers wrote:
>> On 24/10/2014 13:32, Dennis Poon wrote:
>>> The TFPGMap in fgl unit has serious bug in the Find method. I tried but
>>> cannot fix it.
>> Why don't you raise a bug in the bugtracker with an example test program
>> so developers can look into it?
>>
> Can you give me a link to report this bug? I have not done this before.

Is it really so hard to find?
E.g. forum.lazarus.freepascal.org/
top left under free pascal, bugtracker link.

Thanks.



___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] any generic List class other than those in fgl unit?

2014-10-24 Thread waldo kitty

On 10/24/2014 11:18 AM, Reinier Olislagers wrote:

On 24/10/2014 17:15, Dennis Poon wrote:

Can you give me a link to report this bug? I have not done this before.


Is it really so hard to find?
E.g. forum.lazarus.freepascal.org/
top left under free pascal, bugtracker link.

Thanks.


who uses forums when there are much preferred(??) mailing lists? ;) ;) ;)

--
 NOTE: No off-list assistance is given without prior approval.
   Please *keep mailing list traffic on the list* unless
   private contact is specifically requested and granted.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal