Re: [Lazarus] Date value "0"

2015-05-26 Thread Sven Barth
Am 26.05.2015 15:28 schrieb "Michael Schnell" :
>
> On 05/26/2015 01:30 PM, Juha Manninen wrote:
>>
>> Is there some convention how to show a date value "0"?
>> By default it shows year 1899. The patch changed it to "?".
>>
>
> Both funny, as DateTimeToStr(2.0) is "1-1-00" ;-)

Why should that be funny? TDateTime(0.0) is defined as "12/30/1899 12:00
am". Now add two days and we are at "1/1/1900 12:00 am", so all is well...

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


Re: [Lazarus] Date value "0"

2015-05-26 Thread Juha Manninen
I changed it to "Never" as suggested by wp. It is a good word in this context.

Juha

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


Re: [Lazarus] AlignTop/AlignBottom issue

2015-05-26 Thread Giuliano Colla

Il 26/05/2015 14:50, Mattias Gaertner ha scritto:

It works like this:
http://wiki.lazarus.freepascal.org/Autosize_/_Layout#Order_of_controls_with_same_Align


The reason of my request is that it doesn't appear to work like this. 
Quoting the #Align paragraph:


First all controls with alTop are put to the top of the client area. 
If there are several controls with alTop the last added/moved will be 
put topmost.


Then all controls with alBottom are put to the bottom of the client 
area. Otherwise it works analog to alTop. 


This scheme provides a predictable order, although different from 
Delphi's one which places the last added/moved at the bottom for alTop. 
It makes it possible to lay out components as desired.


What happens with the sample program I've posted in the bugtracker is 
that with an order of the commands 1-2-3-4-5-6-7 (executed one by one, 
with a click event), the resulting order of the components is 
4-3-5-2-6-1-7, which appears rather crazy.


The "Order of controls with same Align" should apply when several 
controls are added/moved simultaneously, not when they're moved one by one.


Giuliano



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


Re: [Lazarus] Date value "0"

2015-05-26 Thread Juha Manninen
Amazing! Nobody actually looked at the Mantis report nor the patch I
referred to, but still answered the mail.
The question is about LastUsed date of a Lazarus package link, shown
in one of the IDE's dialog windows.
Value "0" is wrong in this context because nobody created Lazarus
packages nor links between them at year 1899.
I leave it as "?", I guess there is no convention for such situations.

... but people please pay a little more attention before answering ...

Juha

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


Re: [Lazarus] Date value "0"

2015-05-26 Thread Michael Schnell

On 05/26/2015 03:30 PM, Mark Morgan Lloyd wrote:



If it were something like Anno Domini 0, which quite simply never 
existed, then it could be displayed as invalid.


It's funny, but AFAIK, you are right. By definition, before Year 1 there 
was Year -1 and not Year 0.


Why TDateTime seemingly uses +2 = 1-1- as a reference is still 
another riddle.


-Michael

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


[Lazarus] Indy 10 install in Lazarus 1.4.0

2015-05-26 Thread dickmaley
I had trouble getting Indy 10 to install properly in Lazarus 1.4.0. 
Eventually it worked.  I wish to share what I learned.

Follow the instructions at 
http://www.indyproject.org/sockets/download/svn.en.aspx
   to download the
indy 10 source and demos.I recommend that you download the subversion files
to a location other than your Lazarus components directory.  This way if you
upgrade Lazarus it is not going to blow away your Indy code.

The Indy 10 source has a *.lpk (/lib/indylaz.lpk) file for installing Indy.
DO NOT USE indylaz.lpk!  THIS FILE DOES NOT WORK.

In the same directory create a new *.lpk file.  I created a new file 
"indylaz201505251520.lpk"
   and its
contents are:  indylaz201505251520.lpk
  .

If you currently have Indy installed, uninstall it.

In Lazarus open the *.lpk file you created above.

 

Press Compile.  It should compile fine.  If it does not then you have other
problems.

If it compiled fine, press “use/install”.  In the following dialog press
Yes.

 

Lazarus should recompile and restart.  Your palette should now have all the
Indy components.

Dick Maley



--
View this message in context: 
http://free-pascal-lazarus.989080.n3.nabble.com/Indy-10-install-in-Lazarus-1-4-0-tp4042380.html
Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com.--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Date value "0"

2015-05-26 Thread Mark Morgan Lloyd

Giuliano Colla wrote:

Il 26/05/2015 13:30, Juha Manninen ha scritto:

Regarding issue
   http://bugs.freepascal.org/view.php?id=27735

Is there some convention how to show a date value "0"?
By default it shows year 1899. The patch changed it to "?".




Delphi for value 0 shows 12/30/1899 12:00 am:


Which is an entirely valid date, so should be displayed as such; it 
could entirely plausibly be a default starting point for e.g. 
astronomical calculations.


If it were something like Anno Domini 0, which quite simply never 
existed, then it could be displayed as invalid.


--
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] Date value "0"

2015-05-26 Thread Michael Schnell

On 05/26/2015 01:30 PM, Juha Manninen wrote:

Is there some convention how to show a date value "0"?
By default it shows year 1899. The patch changed it to "?".



Both funny, as DateTimeToStr(2.0) is "1-1-00" ;-)

-Michael

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


Re: [Lazarus] AlignTop/AlignBottom issue

2015-05-26 Thread Mattias Gaertner
On Mon, 25 May 2015 19:13:27 +0200
Giuliano Colla  wrote:

> AlignTop and AlignBottom do not appear to behave as they should.
> 
> When you have several controls contained in another control, you would 
> expect that each AlignTop or AlignBottom would stack the control in the 
> first free position: with AlignBottom on top of the stack of the other 
> bottom aligned components, with AlignTop at the bottom of the stack of 
> the other top aligned components.

It works like this:
http://wiki.lazarus.freepascal.org/Autosize_/_Layout#Order_of_controls_with_same_Align

When you drop (or move) a control with alTop in the designer, the
control is inserted at the current mouse position. It is *not* moved to
the free bottom/top position. This is Delphi compatible.

When you add controls at runtime, keep in mind that the initial
control's Left/Top is 0,0. Contrary to the VCL the LCL can (and often
does) delay updating the layout (DisableAutoSize/EnableAutoSize).
For example all changes in FormCreate are delayed and the layout
is computed from the final property values. On the other hand
ButtonClick has no delay (aka you have to add the
Disable/EnableAutoSize yourself), so inserting alTop controls may have
different results.

If you want a specific order, use Disable/EnableAutoSize and set the
"Top" properties.

Mattias

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


Re: [Lazarus] Date value "0"

2015-05-26 Thread Giuliano Colla

Il 26/05/2015 13:30, Juha Manninen ha scritto:

Regarding issue
   http://bugs.freepascal.org/view.php?id=27735

Is there some convention how to show a date value "0"?
By default it shows year 1899. The patch changed it to "?".




Delphi for value 0 shows 12/30/1899 12:00 am:
 
http://docs.embarcadero.com/products/rad_studio/delphiAndcpp2009/HelpUpdate2/EN/html/delphivclwin32/System_TDateTime.html

Changing the old Delphi compatible default may force a number of users 
to modify user manuals/user instructions, messages etc. Is it really a 
wise move?


Giuliano


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


Re: [Lazarus] AlignTop/AlignBottom issue

2015-05-26 Thread Giuliano Colla

Il 25/05/2015 22:45, Maxim Ganetsky ha scritto:

Should I open an issue in the bugtracker, with the usual small example
to demonstrate the issue?


I guess it won't harm. 


Done:

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

Giuliano


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


[Lazarus] Date value "0"

2015-05-26 Thread Juha Manninen
Regarding issue
  http://bugs.freepascal.org/view.php?id=27735

Is there some convention how to show a date value "0"?
By default it shows year 1899. The patch changed it to "?".

Juha

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