Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2003-11

spinedit bug?

10 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mattias Gaertner
to Ken Moffat
The SpinEdit control will not decrease to zero. If I set min value to 0 it seems to be a bug in TWriter. You can't set a default value for

properties of type single. But TWriter ignores this and simply assumes 0 is the default. So, 0 is not saved to the lfm file.

Does 1.9 allow default values for properties of type single?

Mattias

Reply by email

Ken Moffat
to Ken Moffat: The SpinEdit control will not decrease to zero. If I set min value to 0 it else confirm…
Mattias Gaertner wrote 21 lines
On Sat, 08 Nov 2003 21:52:18 -0800 Ken Moffat wrote: >The SpinEdit control will not decrease to zero. If I set min value to 0 >it stops at 1. > > It seems to be a bug in TWriter. You can't set a default value for properties of type single. But TWriter ignores this and simply assumes 0 is the default. So, 0 is not saved to the lfm file. Does 1.9 allow default values for properties of type single? Mattias

Shouldn't I be able to spin it down to zero?
also, when I attempt to set a default below 1 ie, 0.1, I get an "Invalid float" error.

Ken

Reply by email

Ken Moffat
to Ken Moffat: The SpinEdit control will not decrease to zero. If I set min value to 0 it else confirm…
Mattias Gaertner wrote 56 lines
On Sun, 09 Nov 2003 07:54:23 -0800 Ken Moffat wrote: >Mattias Gaertner wrote: > > > >>On Sat, 08 Nov 2003 21:52:18 -0800 >>Ken Moffat wrote: >> >> >> >> >> >>>The SpinEdit control will not decrease to zero. If I set min value to 0 >>>it stops at 1. >>> >>> >>> >>> >>It seems to be a bug in TWriter. You can't set a default value for >>properties of type single. But TWriter ignores this and simply assumes 0 >>is the default. So, 0 is not saved to the lfm file. >> >>Does 1.9 allow default values for properties of type single? >> >> >>Mattias >> >> >> >> >> >Shouldn't I be able to spin it down to zero? > > Yes. Just set the MinValue in the Form.Create event. >also, when I attempt to set a default below 1 ie, 0.1, I get an "Invalid >float" error. > > Hmm. Works for me. What compiler are you using? Mattias

fpc-1.0.11-031022.i386.rpm
fpcsrc-1.0.11-20031022.i386.rpm
lazarus-0.9.0.6-fpc_1.0.11_031022.i386.rpm

which I converted to debian using alien.
Running Libranet Linux partially upgraded to sid.

When I set the minvalue of the spinedit in FormCreate it works fine. Thanks.

Ken

Reply by email

Micha Nelissen
to Ken Moffat: The SpinEdit control will not decrease to zero. If I set min value to 0 it else confirm…
Mattias Gaertner wrote 11 lines
On Sat, 08 Nov 2003 21:52:18 -0800 Ken Moffat wrote: >The SpinEdit control will not decrease to zero. If I set min value to 0 >it stops at 1. It seems to be a bug in TWriter. You can't set a default value for properties of type single. But TWriter ignores this and simply assumes 0 is the default. So, 0 is not saved to the lfm file.

I suggest specifying {stored=true}.

Micha.

Reply by email

Mattias Gaertner
to Ken Moffat: The SpinEdit control will not decrease to zero. If I set min value to 0 it else confirm…
Show quoted text 15 lines
Mattias Gaertner wrote: > On Sat, 08 Nov 2003 21:52:18 -0800 > Ken Moffat wrote: > > >>The SpinEdit control will not decrease to zero. If I set min value to 0 >>it stops at 1. > > > It seems to be a bug in TWriter. You can't set a default value for > properties of type single. But TWriter ignores this and simply assumes 0 > is the default. So, 0 is not saved to the lfm file. I suggest specifying {stored=true}.

Already done.
It seems, TWriter skips a value, if it is the default value. No matter what "stored" says.

Mattias

Reply by email

Florian Klaempfl
to Ken Moffat: The SpinEdit control will not decrease to zero. If I set min value to 0 it else confirm…
Mattias Gaertner wrote 13 lines
On Sat, 08 Nov 2003 21:52:18 -0800 Ken Moffat wrote: >The SpinEdit control will not decrease to zero. If I set min value to 0 >it stops at 1. It seems to be a bug in TWriter. You can't set a default value for properties of type single. But TWriter ignores this and simply assumes 0 is the default. So, 0 is not saved to the lfm file. Does 1.9 allow default values for properties of type single?

No, but delphi doesn't allow it either, iirc? Do we need it?

Reply by email

Mattias Gaertner
to Ken Moffat: The SpinEdit control will not decrease to zero. If I set min value to 0 it else confirm…
Show quoted text 25 lines
Mattias Gaertner wrote: >On Sat, 08 Nov 2003 21:52:18 -0800 >Ken Moffat wrote: > > > >>The SpinEdit control will not decrease to zero. If I set min value to 0 >>it stops at 1. >> >> > >It seems to be a bug in TWriter. You can't set a default value for >properties of type single. But TWriter ignores this and simply assumes 0 >is the default. So, 0 is not saved to the lfm file. > >Does 1.9 allow default values for properties of type single? > > >Mattias > > > Shouldn't I be able to spin it down to zero?

Yes. Just set the MinValue in the Form.Create event.

also, when I attempt to set a default below 1 ie, 0.1, I get an "Invalid float" error.

Hmm. Works for me. What compiler are you using?

Mattias

Reply by email

Mattias Gaertner
to Ken Moffat: The SpinEdit control will not decrease to zero. If I set min value to 0 it else confirm…
Show quoted text 16 lines
Mattias Gaertner wrote: > On Sat, 08 Nov 2003 21:52:18 -0800 > Ken Moffat wrote: > > >>The SpinEdit control will not decrease to zero. If I set min value to 0 >>it stops at 1. > > > It seems to be a bug in TWriter. You can't set a default value for > properties of type single. But TWriter ignores this and simply assumes 0 > is the default. So, 0 is not saved to the lfm file. > > Does 1.9 allow default values for properties of type single? No, but delphi doesn't allow it either, iirc? Do we need it?

Do we need default values for integer properties?

Mattias

Reply by email