How to dynamically change a comboboxpropertydescriptor values ? [message #170477] |
Fri, 04 March 2005 17:44 |
Eclipse User |
|
|
|
Originally posted by: no.mail.please
Hi !
I use a model class in my gef editor which wrapps a SWT.LIST
I have a problem adding items to this list from the propertysheet (I add
them from a TextPropertyDescriptor) : the items are added OK to the
SWT.LIST, the changes are reflected in the view, but the changes are not
reflected in the property descriptor that reflects the SWT.LIST items.
This property descriptor is a simple ComboBoxPropertyDescriptor which
takes as parameter the list returned by SWT.LIST#getItems(). I
initialize it whith an empty array, and then I change this array to
SWT.LIST#getItems() when items are added.
It seems to me that the ComboBox is ReadOnly so the changes are not
reflected, instead of TextPropertyDescriptor that reflects changes in
the model.
Am I right ?
What is the solution for a ComboBoxPropertyDescriptor, as I don't want
to make it "not READ_ONLY" ?
TIA
--
Arnaud
|
|
|
|
Re: How to dynamically change a comboboxpropertydescriptor values ? [message #170612 is a reply to message #170477] |
Sun, 06 March 2005 04:09 |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
BTW, I think out propertysheetentry refreshes on all command stack events.
"Arnaud" <no@mail.please> wrote in message
news:d0a6pf$rrn$1@www.eclipse.org...
> Hi !
>
> I use a model class in my gef editor which wrapps a SWT.LIST
>
> I have a problem adding items to this list from the propertysheet (I add
> them from a TextPropertyDescriptor) : the items are added OK to the
> SWT.LIST, the changes are reflected in the view, but the changes are not
> reflected in the property descriptor that reflects the SWT.LIST items.
> This property descriptor is a simple ComboBoxPropertyDescriptor which
> takes as parameter the list returned by SWT.LIST#getItems(). I initialize
> it whith an empty array, and then I change this array to
> SWT.LIST#getItems() when items are added.
>
> It seems to me that the ComboBox is ReadOnly so the changes are not
> reflected, instead of TextPropertyDescriptor that reflects changes in the
> model.
>
> Am I right ?
>
> What is the solution for a ComboBoxPropertyDescriptor, as I don't want to
> make it "not READ_ONLY" ?
>
> TIA
>
> --
> Arnaud
|
|
|
Re: How to dynamically change a comboboxpropertydescriptor values ? [message #170673 is a reply to message #170477] |
Sun, 06 March 2005 05:43 |
Eclipse User |
|
|
|
Originally posted by: huangjun.cs.umb.edu
And, do you write your own ComboBoxPropertyDescriptor instread?
Otherwise, your modification to the array parameter will not reflect into
the combox of coz...
"Arnaud" <no@mail.please> wrote in message
news:d0a6pf$rrn$1@www.eclipse.org...
> Hi !
>
> I use a model class in my gef editor which wrapps a SWT.LIST
>
> I have a problem adding items to this list from the propertysheet (I add
> them from a TextPropertyDescriptor) : the items are added OK to the
> SWT.LIST, the changes are reflected in the view, but the changes are not
> reflected in the property descriptor that reflects the SWT.LIST items.
> This property descriptor is a simple ComboBoxPropertyDescriptor which
> takes as parameter the list returned by SWT.LIST#getItems(). I
> initialize it whith an empty array, and then I change this array to
> SWT.LIST#getItems() when items are added.
>
> It seems to me that the ComboBox is ReadOnly so the changes are not
> reflected, instead of TextPropertyDescriptor that reflects changes in
> the model.
>
> Am I right ?
>
> What is the solution for a ComboBoxPropertyDescriptor, as I don't want
> to make it "not READ_ONLY" ?
>
> TIA
>
> --
> Arnaud
|
|
|
Re: How to dynamically change a comboboxpropertydescriptor values ? [message #170728 is a reply to message #170673] |
Mon, 07 March 2005 07:47 |
Eclipse User |
|
|
|
Originally posted by: no.mail.please
hunj a écrit :
> And, do you write your own ComboBoxPropertyDescriptor instread?
> Otherwise, your modification to the array parameter will not reflect into
> the combox of coz...
Yes, I wrote my own combobox actually, that reflects changes in the
array and as two buttons for other actions.
I'll try to restart this piece of code from the beginning, I certainly
missed something.
--
Arnaud
|
|
|
Powered by
FUDForum. Page generated in 0.03306 seconds