|
|
Re: Using JFace data binding with an EMF List which maby be null [message #1430125 is a reply to message #1429804] |
Wed, 24 September 2014 04:06 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
Justin,
Comments below.
On 23/09/2014 9:41 PM, Justin Weir wrote:
> Hi,
>
> I am using JFace data binding to bind an EMF list to another
> observable list. The problem I'm having (I think) is that the list is
> null before any items are added.
I doubt that's a problem. The getter for a multi-valued feature always
returns a list. Internally, the field will be null until the first time
the getter is called, but no one can see that via the API...
> Is there an easy way to do the databinding so that it creates the list
> when the first element is being added to it?
How is the list accessed that anyone would ever see null?
> Is there a way to null out the list when the last item is removed?
No, because you can't ever know who else has asked for the list and is
still referencing it. The list itself is the state of the model instance.
>
> Thanks in advance for any help.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03762 seconds