Re: [Lazarus] using spanish language

2013-01-23 Thread Juha Manninen
On Wed, Jan 23, 2013 at 8:16 AM, Héctor F. Fiandor Rosario
hfian...@infomed.sld.cu wrote:
 I have found that some label.caption are written correctly in spanish, but
 other don´t admit the accents as for example in the word Terminó.

It sounds strange. If there was such bug in TLabel, it would affect
all label captions and not only some of them.
Can you attach a demo application demonstrating it?

Juha

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


Re: [Lazarus] GTK2 threading

2013-01-23 Thread Michael Schnell

On 01/22/2013 06:52 PM, Anton Kavalenka wrote:



But GTK Widgetset uses pure Xlib calls for determining keyboard states.
Xlib thread-safety is not initialized in GTK2 widgetset.


AFAIK: As the GUI and Event-queue related LCL classes (i.e. 
TApplication) are not thread save themselves (e.g. using global 
variables). It does not make sense to attach to the System's Widget set 
in a thread safe way.


To allow for multiple GUI threads a major update of the appropriate LCL 
functions would be necessary, so that multiple threads can create their 
own dedicated TApplication instances.


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


Re: [Lazarus] TOpenGLControl.DepthBits default value

2013-01-23 Thread Kostas Michalopoulos
AFAIK even if you ask for 24 and there is no support for it, you'll get a
16bit buffer anyway.


On Wed, Jan 23, 2013 at 12:21 AM, Michalis Kamburelis 
michalis.ka...@gmail.com wrote:

 Reimar Grabowski wrote:

 Hi,

 the in the topic mentioned property defaults to a value of 16. Is
 there any special reason for it? IMHO the default value should be 24.
 After all it's 2013 and not 1998.

 It's not really a problem, I just want to know the reason why this
 value was chosen.


 Before my patch on 
 http://bugs.freepascal.org/**view.php?id=22170http://bugs.freepascal.org/view.php?id=22170the
  depth bits were hardcoded (16 on WinAPI and 1 on GLX). So I set the
 default value for TOpenGLControl.DepthBits at safe 16.

 The general idea is that TOpenGLControl has safe default values, that are
 guaranteed to work (and be fast) even on really really ancient graphic
 cards or when the system is running under virtual machine (which often
 means you don't get hardware-accelarated 3D until you explicitly
 install/enable something). For the same reason e.g.
 TOpenGLControl.StencilBits is by default 0, even though all modern GPUs can
 give you at least 8-bit stencil buffer.

 Other APIs to get OpenGL context, like GtkGLExt or Glut or low-level
 WinAPI or GLX follow the same convention. The defaults are very
 conservative.

 That said, I would be personally fine with changing this default to 24, if
 others think it's a good idea. A developer can always lower it to 16 when
 that's enough. So, I don't really have a strong preference about it.

 Michalis


 --
 __**_
 Lazarus mailing list
 Lazarus@lists.lazarus.**freepascal.orgLazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.**freepascal.org/mailman/**listinfo/lazarushttp://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

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


[Lazarus] .lrs files

2013-01-23 Thread Antonio Fortuny

Hi folks.

Got a problem: I have a data module in a project with some TMemDataset
All of them have some fields in the FieldDefs list
Now I'm changing some of the datasets but new fields appear as not 
existing when they are referenced somewhere else in the project.
Finally I've seen that the datamodule.lrs file has not been updated 
since last year despite the changes I've done ! And of course the new 
columns are not in the datamodule.lrs file and when the new fields are 
referenced, program crashes


How to force the saving of the .lrs file ?
BTW, it happens some times with TForms

Antonio.


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


Re: [Lazarus] .lrs files

2013-01-23 Thread Antonio Fortuny

Sorry, just miss the environment:

WIn32, Lazarus 1.1 32979 from 2012/01/02, FPC 2.6.1
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] .lrs files

2013-01-23 Thread Mattias Gaertner
On Wed, 23 Jan 2013 11:45:23 +0100
Antonio Fortuny a.fort...@sitasoftware.lu wrote:

 Hi folks.
 
 Got a problem: I have a data module in a project with some TMemDataset
 All of them have some fields in the FieldDefs list
 Now I'm changing some of the datasets but new fields appear as not 
 existing when they are referenced somewhere else in the project.
 Finally I've seen that the datamodule.lrs file has not been updated 
 since last year despite the changes I've done ! And of course the new 
 columns are not in the datamodule.lrs file and when the new fields are 
 referenced, program crashes
 
 How to force the saving of the .lrs file ?

Check the project option Resource type is set to lrs.
Check the file date of the lrs file or simply delete the file. The IDE
will regenerate it on next build.

If this does not work:
Check that there is only one datamodule.lrs in the include path.

 BTW, it happens some times with TForms


Mattias

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


[Lazarus] graphics

2013-01-23 Thread duilio foschi
Hi!

this code

procedure TForm1.DrawBtnClick(Sender: TObject);
{Draw some ellipses on the canvas - random size and color}
var
  i:integer;
  cx,cy:integer;
begin
  with image1, canvas do
  begin
for i:= 1 to 10 do
begin
  cx:=random(width);
  cy:=random(height);
  brush.color:=random(256*256*256);
  ellipse(cx,cy,cx+random(100), cy+random(100));
end;
  end;
end;

will draw 10 ellipses on Image1.

However, I want to do it interactively, like it is done in Photo-Paint.

The ellipse should be contained in a rectangle R whose upper-left
corner is given by the original position of the mouse on screen.

And the bottom-right corner of R will be the final position of the mouse.

During dragging, a temporary ellipse should be shown on screen and the
mouse will be cross-shaped.

Any idea re how to do it ?

An unexpensive well debugged 3th-party library would be the ideal
solution (as I don't plan to work in graphics in the future).

Thank you

Duilio

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


Re: [Lazarus] .lrs files

2013-01-23 Thread Antonio Fortuny


Le 23/01/2013 11:51, Mattias Gaertner a écrit :

Check the project option Resource type is set to lrs.

Where is this located ?

Check the file date of the lrs file or simply delete the file. The IDE
will regenerate it on next build.

does not work


If this does not work:
Check that there is only one datamodule.lrs in the include path.

OK



BTW, it happens some times with TForms


Mattias

--
___
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] .lrs files

2013-01-23 Thread Antonio Fortuny


Check the project option Resource type is set to lrs.

Ok, found it.
The option Save .lrs files in output folder was checked too. It is 
unchecked now and .lrs files are rebuilt
This time I was confused because there are alittle bit too much options. 
But OK. It works


Thanks Mattias, your answer helped

Check the file date of the lrs file or simply delete the file. The IDE
will regenerate it on next build.

If this does not work:
Check that there is only one datamodule.lrs in the include path.


BTW, it happens some times with TForms



Mattias

--
___
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] .lrs files

2013-01-23 Thread Mark Morgan Lloyd

Mattias Gaertner wrote:

On Wed, 23 Jan 2013 11:45:23 +0100
Antonio Fortuny a.fort...@sitasoftware.lu wrote:


Hi folks.

Got a problem: I have a data module in a project with some TMemDataset
All of them have some fields in the FieldDefs list
Now I'm changing some of the datasets but new fields appear as not 
existing when they are referenced somewhere else in the project.
Finally I've seen that the datamodule.lrs file has not been updated 
since last year despite the changes I've done ! And of course the new 
columns are not in the datamodule.lrs file and when the new fields are 
referenced, program crashes


How to force the saving of the .lrs file ?


Check the project option Resource type is set to lrs.
Check the file date of the lrs file or simply delete the file. The IDE
will regenerate it on next build.


Question if I may: should .lrs files be stored in (a local) .svn 
repository? What about .or?


--
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] .lrs files

2013-01-23 Thread Mattias Gaertner
On Wed, 23 Jan 2013 12:01:47 +0100
Antonio Fortuny a.fort...@sitasoftware.lu wrote:

 
 Le 23/01/2013 11:51, Mattias Gaertner a écrit :
  Check the project option Resource type is set to lrs.
 Where is this located ?
  Check the file date of the lrs file or simply delete the file. The IDE
  will regenerate it on next build.
 does not work

Lazarus 1.1 has a search. :)


Mattias

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


Re: [Lazarus] .lrs files

2013-01-23 Thread Mattias Gaertner
On Wed, 23 Jan 2013 11:18:04 +
Mark Morgan Lloyd markmll.laza...@telemetry.co.uk wrote:

 Mattias Gaertner wrote:
[...]
 Question if I may: should .lrs files be stored in (a local) .svn 
 repository?

It depends. If you only use Lazarus to compile the project, you don't
need to store them.

 What about .or?
 
No.

Mattias

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


Re: [Lazarus] graphics

2013-01-23 Thread Mattias Gaertner
On Wed, 23 Jan 2013 11:54:13 +0100
duilio foschi duiliofos...@euplan.com wrote:

 Hi!
 
 this code
 
 procedure TForm1.DrawBtnClick(Sender: TObject);
 {Draw some ellipses on the canvas - random size and color}
 var
   i:integer;
   cx,cy:integer;
 begin
   with image1, canvas do
   begin
 for i:= 1 to 10 do
 begin
   cx:=random(width);
   cy:=random(height);
   brush.color:=random(256*256*256);
   ellipse(cx,cy,cx+random(100), cy+random(100));
 end;
   end;
 end;
 
 will draw 10 ellipses on Image1.
 
 However, I want to do it interactively, like it is done in Photo-Paint.
 
 The ellipse should be contained in a rectangle R whose upper-left
 corner is given by the original position of the mouse on screen.
 
 And the bottom-right corner of R will be the final position of the mouse.
 
 During dragging, a temporary ellipse should be shown on screen and the
 mouse will be cross-shaped.
 
 Any idea re how to do it ?

Hint: TImage has two Canvas. The Picture.Canvas for the permanent
changes, the Canvas during OnPaint for the temporary drawings.

 
 An unexpensive well debugged 3th-party library would be the ideal
 solution (as I don't plan to work in graphics in the future).


Mattias

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


[Lazarus] [PATCH] TFPHTTPClient: implements easy calls for POST/DELETE/etc. and some adjusts.

2013-01-23 Thread silvioprog
Hello,

Please see:

http://bugs.freepascal.org/view.php?id=23731

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] [PATCH] TFPHTTPClient: implements easy calls for POST/DELETE/etc. and some adjusts.

2013-01-23 Thread silvioprog
I'm sorry, the title is: ...easy calls for DELETE/OPTIONS. and some
adjusts.


2013/1/23 silvioprog silviop...@gmail.com

 Hello,

 Please see:

 http://bugs.freepascal.org/view.php?id=23731

 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] [PATCH] TFPHTTPClient: implements easy calls for POST/DELETE/etc. and some adjusts.

2013-01-23 Thread Michael Van Canneyt



On Wed, 23 Jan 2013, silvioprog wrote:


I'm sorry, the title is: ...easy calls for DELETE/OPTIONS. and some adjusts.


2013/1/23 silvioprog silviop...@gmail.com
  Hello,
Please see:

http://bugs.freepascal.org/view.php?id=23731

Thank you!


Applied, thank you very much.

Michael.

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


Re: [Lazarus] .lrs files

2013-01-23 Thread Mark Morgan Lloyd

Mattias Gaertner wrote:

On Wed, 23 Jan 2013 11:18:04 +
Mark Morgan Lloyd markmll.laza...@telemetry.co.uk wrote:


Mattias Gaertner wrote:
[...]
Question if I may: should .lrs files be stored in (a local) .svn 
repository?


It depends. If you only use Lazarus to compile the project, you don't
need to store them.


What about .or?
 
No.


Thanks Mattias, noted.

--
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


[Lazarus] trunk compile error Win XP : Error: identifier idents no member StrikeThrough

2013-01-23 Thread John Landmesser

Hi,

i cannot compile actual lazarus trunk version:

Stops here:

procedure TLazCanvas.AssignFontData(AFont: TFPCustomFont);
begin
  if AFont = nil then Exit;
  Font.FPColor := AFont.FPColor;
  Font.Name := AFont.Name;
  Font.Size := AFont.Size;
  Font.Bold := AFont.Bold;
  Font.Italic := AFont.Italic;
  Font.Underline := AFont.Underline;
  {$IF (FPC_FULLVERSION=20601) or (FPC_FULLVERSION=20701)} //changed 
in 2.6.1 and 2.7; remove when FPC 2.6.2+ only is supported

  Font.StrikeThrough := AFont.StrikeThrough;
  {$ELSE}
  Font.StrikeTrough := AFont.StrikeTrough; //old version with typo
  {$ENDIF}
end;

error message is:

C:\lazarus\lcl\lazcanvas.pas(765,8) Error: identifier idents no member 
StrikeThrough



Lazarus:

Lazarus 1.1 r39792 FPC 2.6.1 i386-win32-win32/win64

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


Re: [Lazarus] trunk compile error Win XP : Error: identifier idents no member StrikeThrough

2013-01-23 Thread Vincent Snijders
2013/1/23 John Landmesser joh...@online.de:
 Hi,

 i cannot compile actual lazarus trunk version:


Is your fpc 2.6.1 version up to date?

Vincent

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


Re: [Lazarus] trunk compile error Win XP : Error: identifier idents no member StrikeThrough

2013-01-23 Thread John Landmesser

Am 23.01.2013 15:56, schrieb Vincent Snijders:

Is your fpc 2.6.1 version up to date?

Vincent



Thanks for this tipp, now it compiles ok!

But:
I had fpc 2.6.1 from 2012 and now i extracted fpc 2.6.1 from a snapshot.

There are differences between 2.6.1 and 2.6.1 ???

I have to keep that in mind!



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


Re: [Lazarus] trunk compile error Win XP : Error: identifier idents no member StrikeThrough

2013-01-23 Thread Reinier Olislagers
On 23-1-2013 16:32, John Landmesser wrote:
 Am 23.01.2013 15:56, schrieb Vincent Snijders:
 I had fpc 2.6.1 from 2012 and now i extracted fpc 2.6.1 from a snapshot.
 
 There are differences between 2.6.1 and 2.6.1 ???
Yes.
And there are differences between 2.7.1 and 2.7.1


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


Re: [Lazarus] TOpenGLControl.DepthBits default value

2013-01-23 Thread Michalis Kamburelis

Kostas Michalopoulos wrote:

AFAIK even if you ask for 24 and there is no support for it, you'll get
a 16bit buffer anyway.



No. This is a required minimal value, at least for GLX and modern 
wglChoosePixelFormatARB. It was *possibly* treated in more relaxed way 
by the old ChoosePixelFormat, but you should not depend on that. Links 
to relevant docs are on 
http://wiki.freepascal.org/Extending_TOpenGLControl .


Michalis


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


Re: [Lazarus] trunk compile error Win XP : Error: identifier idents no member StrikeThrough

2013-01-23 Thread Sven Barth

Am 23.01.2013 16:32, schrieb John Landmesser:

Am 23.01.2013 15:56, schrieb Vincent Snijders:

Is your fpc 2.6.1 version up to date?

Vincent



Thanks for this tipp, now it compiles ok!

But:
I had fpc 2.6.1 from 2012 and now i extracted fpc 2.6.1 from a snapshot.

There are differences between 2.6.1 and 2.6.1 ???

I have to keep that in mind!
2.6.1 as well as 2.7.1 are no constant releases. 2.7.1 is the 
development version where the main development takes place and 2.6.1 is 
the fixes branch (not a fixes release!) to which selected revisions from 
2.7.1 are merged to form 2.6.2 somewhen in the (hopefully not too far) 
future. 2.6.2 will be a stable release again.


Regards,
Sven

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


[Lazarus] TFPHttpClient: download progress (or status).

2013-01-23 Thread silvioprog
Hello,

First, sorry for my various requests. I'm contributing to improves this
beautiful class.

So, how to show a download progress?

I think that the method ReadResponse should have two callbacks, like as
AContentLenght and AContentPosition. What do you think?

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] TFPHttpClient: resume download.

2013-01-23 Thread silvioprog
Hello,

Some times, we need to resume a download. To do this is very easy, enough
read byte by byte and continuing from the last 50KB (Chrome and Firefox
works so).

So, TFPHttpClient allow to read byte by byte of a content?

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] TFPHttpClient: download progress (or status).

2013-01-23 Thread silvioprog
2013/1/23 silvioprog silviop...@gmail.com

 Hello,

 First, sorry for my various requests. I'm contributing to improves this
 beautiful class.

 So, how to show a download progress?

 I think that the method ReadResponse should have two callbacks, like as
 AContentLenght and AContentPosition. What do you think?

 Thank you!


Hm... If you change this internal funcion to a class method ...:

  Function Transfer(LB : Integer) : Integer;
  begin
Result:=FSocket.Read(FBuffer[1],LB);
If Result0 then
  Raise EHTTPClient.Create(SErrReadingSocket);
if (Result0) then
  Stream.Write(FBuffer[1],Result);
  end;

... the progress of download will be possible, getting the currenty stream
size (or position?). :)

ps. i don't tested with chuncked content. :/

-- 
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] TFPHttpClient: download progress (or status).

2013-01-23 Thread silvioprog
2013/1/23 silvioprog silviop...@gmail.com

 2013/1/23 silvioprog silviop...@gmail.com

 Hello,

 First, sorry for my various requests. I'm contributing to improves this
 beautiful class.

 So, how to show a download progress?

 I think that the method ReadResponse should have two callbacks, like as
 AContentLenght and AContentPosition. What do you think?

 Thank you!


 Hm... If you change this internal funcion to a class method ...:

   Function Transfer(LB : Integer) : Integer;
   begin
 Result:=FSocket.Read(FBuffer[1],LB);
 If Result0 then
   Raise EHTTPClient.Create(SErrReadingSocket);
 if (Result0) then
   Stream.Write(FBuffer[1],Result);
   end;

 ... the progress of download will be possible, getting the currenty stream
 size (or position?). :)

 ps. i don't tested with chuncked content. :/


What do you think about implementa this method?:

(...)
public
procedure ReadingResponse(const ASize, APosition: Int64); virtual;
(...)

Called internally by ReadResponse. (triggered by normal and chunked reading)

-- 
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] TFPHttpClient: download progress (or status).

2013-01-23 Thread silvioprog
2013/1/23 silvioprog silviop...@gmail.com

 [...]
 What do you think about implementa this method?:

 (...)
 public
 procedure ReadingResponse(const ASize, APosition: Int64); virtual;
 (...)


Or only:

procedure ReadingResponse(AStream: TStream); virtual;

-- 
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] TFPHttpClient: download progress (or status).

2013-01-23 Thread silvioprog
2013/1/23 silvioprog silviop...@gmail.com

 [...]


I was thinking to myself... an initial idea:

http://pastebin.com/41GTFsws

-- 
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] TOpenGLControl.DepthBits default value

2013-01-23 Thread Reimar Grabowski
On Wed, 23 Jan 2013 00:21:44 +0100
Michalis Kamburelis michalis.ka...@gmail.com wrote:

First of all thanks for the explanation.

 The general idea is that TOpenGLControl has safe default values, that 
 are guaranteed to work (and be fast) even on really really ancient 
 graphic cards or when the system is running under virtual machine (which 
 often means you don't get hardware-accelarated 3D until you explicitly 
 install/enable something).
Well really, really ancient is the correct term and in my experience 3D on 
virtual machines even if supported is not really that useful.

 For the same reason e.g. 
 TOpenGLControl.StencilBits is by default 0, even though all modern GPUs 
 can give you at least 8-bit stencil buffer.
This I think is absolutely correct as the stencil buffer is only used for 
special/advanced stuff that in general not many people need. And if they do 
they should know how to get one.

 That said, I would be personally fine with changing this default to 24, 
 if others think it's a good idea. A developer can always lower it to 16 
 when that's enough. So, I don't really have a strong preference about it.
I think that it would be good for people new to OpenGL to give them the better 
depth buffer precision as default. Z-Fighting and other nasty stuff happens 
much earlier on the lower precision one. Personally I can live with the 16 bit 
default as well. It is just a slight inconvenience that I have to change it for 
every new project.
So I vote for 24 as default.

R.

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


Re: [Lazarus] TFPHttpClient: resume download.

2013-01-23 Thread Michael Van Canneyt



On Wed, 23 Jan 2013, silvioprog wrote:


Hello,

Some times, we need to resume a download. To do this is very easy, enough read 
byte by byte and continuing from the last 50KB (Chrome and Firefox works so).

So, TFPHttpClient allow to read byte by byte of a content?


No.

Michael.

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


Re: [Lazarus] TFPHttpClient: download progress (or status).

2013-01-23 Thread Michael Van Canneyt



On Wed, 23 Jan 2013, silvioprog wrote:


2013/1/23 silvioprog silviop...@gmail.com
  [...]


I was thinking to myself... an initial idea:


Please post a feature request.

I think one event
  TOnProgressEvent = (Sender : TObject; BytesRead,ContentLength : Int64) of object; 
should be enough.


Michael.

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


[Lazarus] Reset of the TComboBox list

2013-01-23 Thread Eric Kom

Hello All,

Please it is possible to reset or reinitialize the values of  the 
TComboBox list after it has been selected?


--
Kind Regards

Eric Kom

System Administrator  Programmer - Metropolitan College
 _
/ You are scrupulously honest, frank, and \
| straightforward. Therefore you have few |
\ friends./
 -
   \
\
.--.
   |o_o |
   |:_/ |
  //   \ \
 (| Kom | )
/'\_   _/`\
\___)=(___/

2 Hennie Van Till, White River, 1240
Tel: 013 750 2255 | Fax: 013 750 0105 | Cell: 078 879 1334
eric...@kom.za.net | eric...@metropolitancollege.co.za
www.kom.za.net | www.kom.za.org | www.erickom.co.za

Key fingerprint: 513E E91A C243 3020 8735 09BB 2DBC 5AD7 A9DA 1EF5


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


Re: [Lazarus] TFPHttpClient: resume download.

2013-01-23 Thread silvioprog
2013/1/23 Michael Van Canneyt mich...@freepascal.org

  On Wed, 23 Jan 2013, silvioprog wrote:

 Hello,

 Some times, we need to resume a download. To do this is very easy, enough
 read byte by byte and continuing from the last 50KB (Chrome and Firefox
 works so).

 So, TFPHttpClient allow to read byte by byte of a content?


 No.

 Michael.


Based on future implementation to TFPHttpClient: download progress (or
status) feature request ...:

(...)
  TOnProgressEvent = (Sender : TObject; BytesRead,ContentLength : Int64) of
object;
(...)

...if the Sender is the Stream, you can resume download, saving current
stream to a file. Would have to implement only one parameter for reading
the stream be launched from the size of the file that has been saved to
disk. (I do not know if the translator was clear in my explanation. :/ )

-- 
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] TFPHttpClient: download progress (or status).

2013-01-23 Thread silvioprog
2013/1/23 Michael Van Canneyt mich...@freepascal.org

  On Wed, 23 Jan 2013, silvioprog wrote:

 2013/1/23 silvioprog silviop...@gmail.com
   [...]

 I was thinking to myself... an initial idea:


 Please post a feature request.

 I think one event
   TOnProgressEvent = (Sender : TObject; BytesRead,ContentLength : Int64)
 of object; should be enough.

 Michael.


Done:

http://bugs.freepascal.org/view.php?id=23734

Depending on how you implement it, i think that i can do a download
resumed.

-- 
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] using spanish language

2013-01-23 Thread Héctor F . Fiandor Rosario
dear Mr. Manninen, thanks very much for your observation,

after my message, I have been working with the appl. and found that redefining 
the label control the problem was solved.

thanks again

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


[Lazarus] property setter

2013-01-23 Thread xrfang
Hi all,

Lazarus auto generated the following code for my class:

procedure TPainter.SetFont(AValue: TFont);
begin
  if FFont=AValue then Exit;
  FFont:=AValue;
end;

My question is, why the if clause needed? Is there any performance benefits?

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


Re: [Lazarus] property setter

2013-01-23 Thread Paul Ishenin

24.01.2013 10:08, xrfang пишет:


procedure TPainter.SetFont(AValue: TFont);
begin
   if FFont=AValue then Exit;
   FFont:=AValue;
end;

My question is, why the if clause needed? Is there any performance
benefits?


Usually setters have more complex code than just FFont:=AValue;

In this case If block protects both code performance and code logic. 
Setters usually should not perform any actions if they are called with 
the same value as property have.


If setter only assigns a value to a field then probably it can be 
replaced with the field in the property declaration.


Best regards,
Paul Ishenin


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


[Lazarus] Bug on library project while accessing string

2013-01-23 Thread Darmawan Sugiarto
hello guys, I got some bug on library project. When I uses Lazarus 0.9.28.2 I 
write this code and work well, then I recompile it use Lazarus 1.0.2 and 1.0.4 
and got this error

Project project_test raised exception class 'External: SIGEGV'.
At address 7C91B1FA


I have 2 project 

    first project is library project...
Here is the code for first project 


function test(_str:string):string; cdecl; export;


implementation

function test(_str:string):string; cdecl; export;
var
  _i,_l,_k,_d:integer;
  _h:string;
  _char:Char;
begin
  if _str'' then
  begin
    _l:=length(_str);
    //SetLength(_h,_l);
    _h:=_str;
    _char:='t';
    _h[1]:=_char;
  end else _h:='';
  Result :=_h;
end;


 Then second project is application project.
I got 1 button to execute function in the library project.
Here is the code.

  function test(_str:string):string; cdecl; external 'project1.dll' name 'TEST';

var
  Form1: TForm1;

implementation

{$R *.lfm}

{ TForm1 }

procedure TForm1.Button1Click(Sender: TObject);
begin
  ShowMessage(test('alex'));
end;   

I got that error when I click the button.
If I delete this selection, It work well
    _h[1]:=_char;


=INTOSOFT
ALEXIO CHAOS
darmawan_sugia...@yahoo.com 
Yahoo Messager
=


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