Re: [Lazarus] Strange interaction between combox and IniPropStorage

2015-10-06 Thread Juha Manninen
On Tue, Oct 6, 2015 at 4:15 PM, Luca Olivetti  wrote:
> I see that the patch hasn't been merged in 1.4.4.
> Please keep it in mind for 1.4.6

I aded it now here:
  http://wiki.freepascal.org/Lazarus_1.4_fixes_branch

You can add commits there, too, in the "Submitted by others" section.
Often it is difficult to decide what fixes need more time testing in
trunk and which ones are crucial enough to be merged. Usually I add
only fixes that I feel are important, which is very subjective of
course.

Juha

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


Re: [Lazarus] Strange interaction between combox and IniPropStorage

2015-10-06 Thread Luca Olivetti

El 13/08/15 a les 09:24, Luca Olivetti ha escrit:

El 12/08/15 a les 16:37, Luca Olivetti ha escrit:



Definitely a regression: I just had to modify an old program (where this
feature worked) and it doesn't work anymore :-(
At least the workaround seems to do the job.


It's not a regression, it's probably always been there, but I manually
called SaveProperties previously, but since the IniPropstorage does it
automatically, I removed my call.
*However* it calls it when the form is being freed, and in that case the
combobox returns the previous itemindex, not the changed one.
I added a comment and a couple of possible patches in the bugreport.

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


I see that the patch hasn't been merged in 1.4.4.
Please keep it in mind for 1.4.6

Bye
--
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010)  Fax +34 93 5883007

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


Re: [Lazarus] Strange interaction between combox and IniPropStorage

2015-08-14 Thread Flávio Etrusco
On Thu, Aug 13, 2015 at 4:24 AM, Luca Olivetti  wrote:
> El 12/08/15 a les 16:37, Luca Olivetti ha escrit:
>
>>
>> Definitely a regression: I just had to modify an old program (where this
>> feature worked) and it doesn't work anymore :-(
>> At least the workaround seems to do the job.
>
>
> It's not a regression, it's probably always been there, but I manually
> called SaveProperties previously, but since the IniPropstorage does it
> automatically, I removed my call.
> *However* it calls it when the form is being freed, and in that case the
> combobox returns the previous itemindex, not the changed one.
> I added a comment and a couple of possible patches in the bugreport.
>
> http://bugs.freepascal.org/view.php?id=28514

Good job. I would add a comment explaining the need for the
GetItemIndex call, however ;-)
I recall combobox went through various iteations to fix synchronizing
state between the LCL and the underlying widgetset...

Best regards,
Flávio

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


Re: [Lazarus] Strange interaction between combox and IniPropStorage

2015-08-13 Thread Luca Olivetti

El 12/08/15 a les 16:37, Luca Olivetti ha escrit:



Definitely a regression: I just had to modify an old program (where this
feature worked) and it doesn't work anymore :-(
At least the workaround seems to do the job.


It's not a regression, it's probably always been there, but I manually 
called SaveProperties previously, but since the IniPropstorage does it 
automatically, I removed my call.
*However* it calls it when the form is being freed, and in that case the 
combobox returns the previous itemindex, not the changed one.

I added a comment and a couple of possible patches in the bugreport.

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

Bye
--
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010)  Fax +34 93 5883007

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


Re: [Lazarus] Strange interaction between combox and IniPropStorage

2015-08-12 Thread Luca Olivetti

El 11/08/15 a les 12:22, Luca Olivetti ha escrit:

El 11/08/15 a les 12:12, Luca Olivetti ha escrit:

I just found a very strange bug:
when I try to save the ItemIndex of a combobox through a
TIniPropStorage, its value reverts to the value it had when the form was
created.
Every other value (I use TEdit.Text and TSpinEdit.Value) is correctly
saved, it's just the TCombobox.Itemindex that does that *unless* I
reference it before the TIniPropstorage tries to save it.
I attached a sample project in this bug:

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

I suppose it's a regression, since I have used this combination
(combobox and inipropstorage) in many projects and never saw this before.

Note that if you just create a new project and put the combobox and the
inipropstorage on the main form, it works fine, maybe it has something
to do with the ShowModal I'm using to show the form.



Nope, I tried also with a plain Show and it happens just the same (even
tried to set the modalResult of both buttons to mrNone).



Definitely a regression: I just had to modify an old program (where this 
feature worked) and it doesn't work anymore :-(

At least the workaround seems to do the job.

Bye
--
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010)  Fax +34 93 5883007

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


Re: [Lazarus] Strange interaction between combox and IniPropStorage

2015-08-11 Thread Luca Olivetti

El 11/08/15 a les 12:12, Luca Olivetti ha escrit:

I just found a very strange bug:
when I try to save the ItemIndex of a combobox through a
TIniPropStorage, its value reverts to the value it had when the form was
created.
Every other value (I use TEdit.Text and TSpinEdit.Value) is correctly
saved, it's just the TCombobox.Itemindex that does that *unless* I
reference it before the TIniPropstorage tries to save it.
I attached a sample project in this bug:

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

I suppose it's a regression, since I have used this combination
(combobox and inipropstorage) in many projects and never saw this before.

Note that if you just create a new project and put the combobox and the
inipropstorage on the main form, it works fine, maybe it has something
to do with the ShowModal I'm using to show the form.



Nope, I tried also with a plain Show and it happens just the same (even 
tried to set the modalResult of both buttons to mrNone).


Bye
--
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010)  Fax +34 93 5883007

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


[Lazarus] Strange interaction between combox and IniPropStorage

2015-08-11 Thread Luca Olivetti

I just found a very strange bug:
when I try to save the ItemIndex of a combobox through a 
TIniPropStorage, its value reverts to the value it had when the form was 
created.
Every other value (I use TEdit.Text and TSpinEdit.Value) is correctly 
saved, it's just the TCombobox.Itemindex that does that *unless* I 
reference it before the TIniPropstorage tries to save it.

I attached a sample project in this bug:

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

I suppose it's a regression, since I have used this combination 
(combobox and inipropstorage) in many projects and never saw this before.


Note that if you just create a new project and put the combobox and the 
inipropstorage on the main form, it works fine, maybe it has something 
to do with the ShowModal I'm using to show the form.


Bye
--
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010)  Fax +34 93 5883007

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