Hi Wim,

Thanks for the quick answer.
Unfortunately, the simple version is no option for us, since our customers
are used to the graphical version for years now already.

A look in the CDateTime sources revealed to me that there isn't a real
concept of an edit transaction in the widget: the value of the widget gets
changed directly on each selection in the picker or input by the user.
There is no model in the widget nor does the  green hook perform any
"commit" of the value to to such a model (as I had expected).

As a result, there is not possibility to hook into that point of lifecycle
with the current state of the CDateTime API. :(
This makes it pretty much unusable for us presently.

I case you agree with me here, I'd propose to refactor the widget with a
decent model-view approach and some hook in the API that allows for
registering for some sort of edit transaction end (I were willing to adopt
that task).

What do you think?

Best,
 MP



Am Mo., 15. März 2021 um 11:28 Uhr schrieb Wim Jongman <
wim.jong...@gmail.com>:

> Hi Matthias,
>
> It depends on how you use the widget. CDateTime has many faces. When using
> the widget in its simplest form, there is no concept of Enter or OK. So it
> means that databinding has to be different based on the style of the
> widget.
>
> [image: image.png]
>
> Cheers,
>
> Wim
>
>
>
>
> On Mon, Mar 15, 2021 at 10:08 AM Matthias Paul Scholz <
> matthias.paul.sch...@gmail.com> wrote:
>
>> Hi all,
>>
>> For some years we have used the CDateTime widget in our RCP application
>> which works quite good. :)
>>
>> However, we ran in some troubles lately: to get notion about changes the
>> user made in the widget,  we use the databinding proposed by Henno
>> Vermeulen (see https://www.eclipse.org/forums/index.php/t/172877) that
>> binds our application to a selection event in the widget.
>>
>> There's an issue with that approach, however: it seems that such a
>> selection event is triggered always on each selection inside of the widget.
>> For instance, when the user cycles through the months in the calendar drop
>> down or selects another day, each time a separate selection event is fired.
>> This is inconvenient for us, since we need an event only when the user
>> explicitely commits her changes by selecting the ok button (or pressing
>> enter).
>>
>> This has become crucial for us lately since we have a new use case now
>> where a change in the widget triggers an expensive backend operation - and
>> it is a no go when this happens each time the user changes the month in the
>> calendar drop down ...
>>
>> Is there a possibility to listen for or to bind to ok/enter events on the
>> CDateTime widget only?
>>
>> Thanks,
>>   MP
>>
>> _______________________________________________
>> nebula-dev mailing list
>> nebula-dev@eclipse.org
>> To unsubscribe from this list, visit
>> https://www.eclipse.org/mailman/listinfo/nebula-dev
>>
> _______________________________________________
> nebula-dev mailing list
> nebula-dev@eclipse.org
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/nebula-dev
>
_______________________________________________
nebula-dev mailing list
nebula-dev@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/nebula-dev

Reply via email to