[Lazarus] DBNavigator: why is the refresh button enabled only if the dataset is modifiable?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] DBNavigator: why is the refresh button enabled only if the dataset is modifiable?

Free Pascal - Lazarus mailing list
In lcl/include/dbcustomnavigator.inc, method
TDBCustomNavigator.EditingChanged

CanModify:=Enabled and FDataLink.Active and FDataLink.DataSet.CanModify;
...
Buttons[nbRefresh].Enabled:=CanModify;



Why?

I mean, I have a read only query (specifically a TZReadOnlyQuery) since
I only want to show the data, but another application can change it,
hence a refresh could be needed.

Bye
--
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010)  Fax +34 93 5883007
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] DBNavigator: why is the refresh button enabled only if the dataset is modifiable?

Free Pascal - Lazarus mailing list
On Wed, Oct 16, 2019 at 6:11 PM Luca Olivetti via lazarus
<[hidden email]> wrote:
> In lcl/include/dbcustomnavigator.inc, method
> TDBCustomNavigator.EditingChanged
>
> CanModify:=Enabled and FDataLink.Active and FDataLink.DataSet.CanModify;
> ...
> Buttons[nbRefresh].Enabled:=CanModify;

I don't know DBNavigator well. It has 2 sets of buttons, the "Buttons"
and then "FocusableButtons". What are those?
The same TDBCustomNavigator.EditingChanged method also has:
  FocusableButtons[nbRefresh].Enabled:=Enabled and FDataLink.Active
and not FDataLink.Editing;
Maybe the same conditions would apply to Buttons[nbRefresh] as well.

Juha
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] DBNavigator: why is the refresh button enabled only if the dataset is modifiable?

Free Pascal - Lazarus mailing list
El 16/10/19 a les 19:49, Juha Manninen via lazarus ha escrit:

> On Wed, Oct 16, 2019 at 6:11 PM Luca Olivetti via lazarus
> <[hidden email]> wrote:
>> In lcl/include/dbcustomnavigator.inc, method
>> TDBCustomNavigator.EditingChanged
>>
>> CanModify:=Enabled and FDataLink.Active and FDataLink.DataSet.CanModify;
>> ...
>> Buttons[nbRefresh].Enabled:=CanModify;
>
> I don't know DBNavigator well. It has 2 sets of buttons, the "Buttons"
> and then "FocusableButtons". What are those?
> The same TDBCustomNavigator.EditingChanged method also has:
>    FocusableButtons[nbRefresh].Enabled:=Enabled and FDataLink.Active
> and not FDataLink.Editing;
> Maybe the same conditions would apply to Buttons[nbRefresh] as well.

I don't know either, I just find it strange that the refresh button is
disabled when it's most needed.
And even stranger that I didn't notice until today ;-)
Or maybe I did and forgot about it :-D

Bye
--
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010)  Fax +34 93 5883007
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus