Re: [Pharo-dev] GTInspector auto refresh hooks?

2017-08-09 Thread Andrei Chis
On Wed, Aug 9, 2017 at 3:32 PM, Denis Kudriashov 
wrote:

> Actually I found trick:
>
> composite fastTable
>
> title: 'Devices';
> display: [ devices ];
> wantsAutomaticRefresh: true;
>
>  *when: GLMPresentationRefreshRequest do: [myModel update].*
>
>
> Event handler can be executed after actual view update because announcer
> do not ensure delivering order. But in that case new value will be shown at
> next refresh which should be fine.
> What you thing?
>

Interesting trick :). But I think it should work. Like you said in the
worst case the user will see the new data at the next refresh.

Cheers,
Andrei


>
> 2017-08-09 13:47 GMT+02:00 Andrei Chis :
>
>> Hi Denis,
>>
>> The current update mechanism in the inspector is very light, in the sense
>> that it only updates the visual representation of elements and does not
>> recompute them, nor offers any hooks into the update process.
>> Indeed having a way to also recompute the display elements could be
>> useful. We could change the update mechanism to add different kind of
>> update strategies.
>>
>> Cheers,
>> Andrei
>>
>> On Wed, Aug 9, 2017 at 10:58 AM, Denis Kudriashov 
>> wrote:
>>
>>> Hi.
>>>
>>> Is there a way in GTInspector presentation to call some special updating
>>> block before each of auto refresh operation?
>>>
>>> I want something like:
>>>
>>> composite fastTable
>>> title: 'Devices';
>>> display: [ devices ];
>>> wantsAutomaticRefresh: true;
>>>
>>> * beforeUpdateDo: ["rows updating code"]*
>>>
>>> Imaging my presentation shows database table and I want query updated
>>> rows.
>>>
>>> (I activate updating by  GTInspector setEnabledStepRefreshStatus: true).
>>>
>>> Best regards,
>>> Denis
>>>
>>
>>
>


Re: [Pharo-dev] GTInspector auto refresh hooks?

2017-08-09 Thread Denis Kudriashov
Actually I found trick:

composite fastTable

title: 'Devices';
display: [ devices ];
wantsAutomaticRefresh: true;

 *when: GLMPresentationRefreshRequest do: [myModel update].*


Event handler can be executed after actual view update because announcer do
not ensure delivering order. But in that case new value will be shown at
next refresh which should be fine.
What you thing?

2017-08-09 13:47 GMT+02:00 Andrei Chis :

> Hi Denis,
>
> The current update mechanism in the inspector is very light, in the sense
> that it only updates the visual representation of elements and does not
> recompute them, nor offers any hooks into the update process.
> Indeed having a way to also recompute the display elements could be
> useful. We could change the update mechanism to add different kind of
> update strategies.
>
> Cheers,
> Andrei
>
> On Wed, Aug 9, 2017 at 10:58 AM, Denis Kudriashov 
> wrote:
>
>> Hi.
>>
>> Is there a way in GTInspector presentation to call some special updating
>> block before each of auto refresh operation?
>>
>> I want something like:
>>
>> composite fastTable
>> title: 'Devices';
>> display: [ devices ];
>> wantsAutomaticRefresh: true;
>>
>> * beforeUpdateDo: ["rows updating code"]*
>>
>> Imaging my presentation shows database table and I want query updated
>> rows.
>>
>> (I activate updating by  GTInspector setEnabledStepRefreshStatus: true).
>>
>> Best regards,
>> Denis
>>
>
>


Re: [Pharo-dev] GTInspector auto refresh hooks?

2017-08-09 Thread Andrei Chis
Hi Denis,

The current update mechanism in the inspector is very light, in the sense
that it only updates the visual representation of elements and does not
recompute them, nor offers any hooks into the update process.
Indeed having a way to also recompute the display elements could be useful.
We could change the update mechanism to add different kind of update
strategies.

Cheers,
Andrei

On Wed, Aug 9, 2017 at 10:58 AM, Denis Kudriashov 
wrote:

> Hi.
>
> Is there a way in GTInspector presentation to call some special updating
> block before each of auto refresh operation?
>
> I want something like:
>
> composite fastTable
> title: 'Devices';
> display: [ devices ];
> wantsAutomaticRefresh: true;
>
> * beforeUpdateDo: ["rows updating code"]*
>
> Imaging my presentation shows database table and I want query updated rows.
>
> (I activate updating by  GTInspector setEnabledStepRefreshStatus: true).
>
> Best regards,
> Denis
>